Fixed furnace BurnTime overflow with high BurnTime fuels - #990
Open
playfuldoggo wants to merge 5 commits into
Open
Fixed furnace BurnTime overflow with high BurnTime fuels#990playfuldoggo wants to merge 5 commits into
playfuldoggo wants to merge 5 commits into
Conversation
Nikolay-Sitnikov
requested changes
Sep 1, 2026
Nikolay-Sitnikov
requested changes
Sep 8, 2026
Comment on lines
+42
to
+43
| private void hodgepodge$readBurnTime(TileEntityFurnace instance, int value, | ||
| @Local(argsOnly = true) NBTTagCompound compound) { |
Contributor
There was a problem hiding this comment.
You shouldn't need this @Local(argsOnly = true) annotation. @Redirect will use the method's arguments for any extra parameters you declare on the injected method, so just adding a plain old NBTTagCompound compound parameter would link it to the first parameter of the containing method.
Suggested change
| private void hodgepodge$readBurnTime(TileEntityFurnace instance, int value, | |
| @Local(argsOnly = true) NBTTagCompound compound) { | |
| private void hodgepodge$readBurnTime(TileEntityFurnace instance, int value, NBTTagCompound compound) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes this bug for vanilla furnaces GTNewHorizons/Et-Futurum-Requiem#113
(original issue)
Changes the "BurnTime" component in the Furnace tile entity to use an Integer tag instead of a Short tag to prevent BurnTime overflow.
The write uses a Redirect injector, but the read is more complicated because I can't cleanly change the return signature of getShort. It injects itself at the return of the readNBT, allowing it to overwrite the short-casted version of BurnTime. It also has a check for if the Integer version of the BurnTime tag has been made, as to not overwrite the BurnTime with 0 when updating the pack.
I can use more direct ways to change the readNBT part to use an Integer, but this seemed like the best option to me?
alexdoru please tell me how i'm wrong :)
Todo
Fix this bug in all other BurnTime implementations, I know that at least Natura nether furnaces still use shorts too. (outside of this repo's scope)
Checklist