Skip to content

Combination crafting does not work with very high energy values #21

Open

Description

@DerCommander323

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.

Activity

  1. eutro commented on Dec 16, 2021

    @eutro
    Member

    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.

  2. eutro commented on Dec 16, 2021

    @eutro
    Member

    Yeah, no, looks like it's just that recipes support cost up to long limit

    but the tile is only storing its own power as int

    private final EnergyStorageCustom energy = new EnergyStorageCustom(ModConfig.confCraftingCoreRFCapacity);

    In Cucumber

    In Forge

  3. DerCommander323 commented on Dec 17, 2021

    @DerCommander323
    Author

    wouldnt it just be that this variable has to be changed to a long?

    since further down at

    long difference = recipe.getCost() - this.progress;

    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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions