TFC Crafttweakers: ItemRegistry.registerItemHeat not adding heatCapacity
Opened this issue ยท 3 comments
Describe the bug
Make sure to include:
-
What did you expect to happen?
In craftweaker zenscript,Heating.addRecipe
is erroring when trying to use items that have used crafttweaker to add their heat capacity throughItemRegistry.registerItemHeat
. Stating that both input and output need items with heat capacity. I have already used ItemRegistry.registerItemHeat to add heat to both items involved. -
What actually happened instead (i.e. what was the bug)
When you launch the game you get an error (see screenshot) and the heating recipe was not added. -
If it was a crash, upload the full log file (
latest.log
)
Ill supply both crafttweaker.log and latest.log as it seems like they are both relevant.
extract from crafttweaker.log:
[INITIALIZATION][CLIENT][INFO] Registered heat capacity for <minecraft:clay>
[INITIALIZATION][CLIENT][INFO] Registered heat capacity for <minecraft:hardened_clay>
[INITIALIZATION][CLIENT][ERROR] [crafttweaker]: Error executing {[0:crafttweaker]: tfc_extras.zs}: Input and output must have heating capabilities!
To Reproduce
Attention to detail is important!
- Add this script to your ./scripts directory (must have crafttweakers installed)
tfc_extras.zs.zip - Launch Game
- Open World and observe error
Meta Info
- TFC Version: 0.29.1.116
- CraftTweaker2 (1.12.2) : 4.1.20
Should be noted, that is doesn't matter if you have forgeability true
or false
.
Closing this issue. Issue was storing <minecraft:hardered_clay>
in a variable. So the data was stale when creating the heating recipe.
Still, this is interesting. This is mostly certainly because when you declare a variable in crafttweaker, they construct the itemstack and use it for every recipe removal/addition, so, when you define a new capability using our CT Method, since the itemstack isn't re-constructed it never gets a chance of attaching the capability.