TerraFirmaCraft

TerraFirmaCraft

2M Downloads

TFC Crafttweakers: ItemRegistry.registerItemHeat not adding heatCapacity

Opened this issue ยท 3 comments

commented

Describe the bug
Make sure to include:

  1. 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 through ItemRegistry.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.

  2. 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.

  3. 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!
  1. If they would help to explain the issue, include screenshots
    2020-02-19_22 48 09

To Reproduce
Attention to detail is important!

  1. Add this script to your ./scripts directory (must have crafttweakers installed)
    tfc_extras.zs.zip
  2. Launch Game
  3. Open World and observe error

Meta Info

  • TFC Version: 0.29.1.116
  • CraftTweaker2 (1.12.2) : 4.1.20
commented

Should be noted, that is doesn't matter if you have forgeability true or false.

commented

Closing this issue. Issue was storing <minecraft:hardered_clay> in a variable. So the data was stale when creating the heating recipe.

commented

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.