java.lang.NullPointerException error after crafting with custom recipe
GigaOpica opened this issue ยท 4 comments
Issue description
Recipe is supposed to make an iron grit from an iron ingot and damage the hammer, the iron grit is made but the hammer dissapears and gives the error, it is supposed to take 1 damage. Both modded items are from Immersive Engineering if thats important
Steps to reproduce
No response
Script used
The crafttweaker.log file
Minecraft version
1.12
Modloader
Forge
Modloader version
14.23.5.2860
CraftTweaker version
4.1.20.698
Other relevant information
the error is at the bottom of the log
The latest.log file
Use either .reuse()
or .transformDamage()
, not both.
recipes.addShapeless("hammercrushiron",<immersiveengineering:metal:18>,[<immersiveengineering:tool>.anyDamage().transformDamage(), <minecraft:iron_ingot>]);
When i do .transformDamage() it just disappears but when i do .reuse() it doesnt damage it. I used this video as tutorial and it worked fine for him. Is it something with immersive engineering because he used thermal foundation and it was fine.
https://www.youtube.com/watch?v=u-j57wF8nw0&list=PLJB-Y_FDFQZ7zVl-64Eb3hvhtUdLC20fq&index=5
IE's hammer already returns the damaged hammer whenever you use it in a crafting grid, so you don't even need transformDamage() in this case.
recipes.addShapeless("hammercrushiron",<immersiveengineering:metal:18>,[<immersiveengineering:tool>.anyDamage(), <minecraft:iron_ingot>]);
The reason why transformDamage does not work is because it by default increases the item's meta value by 1, which is how many mods did damage up to 1.12. IE on the other hand uses an NBT tag for tracking damage, CrT thinks the item only is single use.
Tip: Join the discord for faster responses ๐