You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Combination crafting does not work with very high energy values #21
This is a bug I've encountered on the normal mod version aswell, but if an item made with combination crafting requires a very large amount of energy in total to craft (i assume the limit is 2.147 billion), the item will never finish crafting, it will just forever keep using energy. Using Integrated Dynamics to read the nbt of the crafting core quickly, it is possible to see that the 'Progress' value constantly switches between negative and positive numbers, which I assume is because of the integer limit.
Can you post an example of a script that adds such a recipe, and describe the setup: for example, how are you supplying power? I'm wondering if this is just an overflow as you transfer too much power at once.
from what im understanding its just subtracting the progress value which increases every tick by the energy that the recipe consumed from the total recipe energy cost, until it reaches 0, but since progress isnt a long it will overflow at over 2b and thus if the total energy cost is over that limit it can never subtract enough to bring it to 0 and finish, and if it was a long it could do that, right?
Activity
eutro commentedon Dec 16, 2021
Can you post an example of a script that adds such a recipe, and describe the setup: for example, how are you supplying power? I'm wondering if this is just an overflow as you transfer too much power at once.
eutro commentedon Dec 16, 2021
Yeah, no, looks like it's just that recipes support cost up to long limit
ExtendedCrafting/src/main/java/com/blakebr0/extendedcrafting/crafting/CombinationRecipe.java
Line 16 in 7a1f8c3
but the tile is only storing its own power as int
ExtendedCrafting/src/main/java/com/blakebr0/extendedcrafting/tile/TileCraftingCore.java
Line 40 in 7a1f8c3
In Cucumber
In Forge
DerCommander323 commentedon Dec 17, 2021
wouldnt it just be that this variable has to be changed to a long?
ExtendedCrafting/src/main/java/com/blakebr0/extendedcrafting/tile/TileCraftingCore.java
Line 42 in 7a1f8c3
since further down at
ExtendedCrafting/src/main/java/com/blakebr0/extendedcrafting/tile/TileCraftingCore.java
Line 147 in 7a1f8c3
from what im understanding its just subtracting the progress value which increases every tick by the energy that the recipe consumed from the total recipe energy cost, until it reaches 0, but since progress isnt a long it will overflow at over 2b and thus if the total energy cost is over that limit it can never subtract enough to bring it to 0 and finish, and if it was a long it could do that, right?
[ci skip] update build script version to 1685741895 (#21)