george8188625 / Create-Diesel-Generators

Source code of Create Diesel Generators mod
https://www.curseforge.com/minecraft/mc-mods/create-diesel-generators
MIT License
22 stars 36 forks source link

Distilleries stop working on a save/load if they are full of fluid. #56

Closed gamma-delta closed 11 months ago

gamma-delta commented 11 months ago

The bug is here: https://github.com/george8188625/Create-Diesel-Generators/blob/1.19.2/src/main/java/com/jesz/createdieselgenerators/blocks/entity/DistillationTankBlockEntity.java#L129

Because currentRecipe isn't saved/loaded with NBT, when the block is loaded from disc currentRecipe is null. But, because the heat is saved, when it loads it never recalculates the recipe.

I think recalculating the recipe in either a markDirty override (not sure what your mappings call it) or at the end of the read method would fix this.

george8188625 commented 11 months ago

I'm gonna fix that