.setBurnTime() doesn't work client side
Shadowdragon019 opened this issue ยท 2 comments
Issue description
Functionally .setBurnTick() works fine, but when going JEI it doesn't update
Steps to reproduce
Make a script where you change the burn time of an item, for example:
<item:minecraft:crafting_table>.setBurnTime(0);
Script used
https://gist.github.com/Shadowdragon019/16eb722a4d2f5d4642f9bcc4218277d3
The crafttweaker.log file
https://gist.github.com/Shadowdragon019/cd47e87b172ef1c6ced79bfbc434fc7f
Minecraft version
1.18
Modloader
Forge
Modloader version
40.1.19
CraftTweaker version
9.1.133
Other relevant information
No response
The latest.log file
https://gist.github.com/Shadowdragon019/0d5acfcb15b026c6ad7e33720c5e1a78
Just tested, this is JEI showing the wrong info.
If you used:
<item:minecraft:crafting_table>.setBurnTime(0);
println(<item:minecraft:crafting_table>.burnTime);
you'll notice that it will print:
server:
[02:43:49.576][INFO]: Setting burn time of: <item:minecraft:crafting_table> to 0 for type smelting
[02:43:49.577][INFO]: 0
client:
[02:44:43.221][INFO]: Setting burn time of: <item:minecraft:crafting_table> to 0 for type smelting
[02:44:43.222][INFO]: 0
and you can't actually use the item as a fuel anymore.
The issue is that the furnace fuel event is fired whenever an item is checked if it is fuel or not and JEI caches that value after firing it once (presumably before the client receives and runs it's scripts)