[BUG] TinkersConstruct.zs null pointer exception
luxidoptera opened this issue · 1 comments
Description of the Bug
Noticed an error with the Tinker's Construct crafttweaker script; normally this wouldn't be a big deal but I think it may be interfering with the script file as a greater whole/preventing it from functioning as intended. The error is as follows, from latest.log:
[14:02:43] [Client thread/INFO] [net.minecraft.client.gui.GuiNewChat]: [CHAT] §cERROR: TinkersConstruct.zs:13: Could not resolve <liquid : electrumflux>
[14:02:43] [Client thread/INFO] [net.minecraft.client.gui.GuiNewChat]: [CHAT] §cERROR: TinkersConstruct.zs:14: Could not resolve <liquid : electrumflux>
[14:02:43] [Client thread/INFO] [net.minecraft.client.gui.GuiNewChat]: [CHAT] §cERROR: TinkersConstruct.zs:17: Could not resolve <liquid : elvenelementium>
[14:02:43] [Client thread/INFO] [net.minecraft.client.gui.GuiNewChat]: [CHAT] §cERROR: [crafttweaker]: Error executing {[0:crafttweaker]: TinkersConstruct.zs}: null, caused by java.lang.NullPointerException
It appears it's having trouble with fluxed electrum and elementium, because fluxed electrum does not exist in the pack and "elvenelementium" is the wrong name for liquid Elementium (it's actually just elementium), but I'm not sure if that's related to the following null pointer exception; that which seems to be preventing the script file from properly loading and applying its changes.
I'm not certain but I think this may have to do with the use of double-slash commenting instead of the typical hash commenting, as the error happens roughly at the point at which double-slash commenting starts to be used. (Will report back if changing double-slash comments to hash comments fixes the issue.) Update: Nope, this was not the source of the issue.
I noticed this because of my attempts to fix a couple common smeltery casting oversights in mod packs, namely the ability to cast Psimetal and Resonant Ender in basins (which should both be possible as Psi itself has psimetal blocks and Actually Additions, included in the pack, has enderpearl blocks). Normally these scripts should work, I know this as I have an identical script change in a different modpack that works fine, but here they just don't load at all.
I'm still troubleshooting this issue myself, and will report back if I find a solution.
Expected Behaviour
Expected behavior here would be changes to TinkersConstruct.zs applying in game. IE my fix to make psimetal blocks castable in basins, should work but doesn't.
Modpack Version
1.6.1
Screenshots
No response
Log
Relevant portion included in error description.
Extra Info
Alongside several other irrelevant changes (that I admittedly don't remember) the relevant change is a small modification to TinkersConstruct.zs as written:
# I completely forgot I had to fix this in enigmatica too- makes psimetal basin castable, since it'll otherwise clog the smeltery.
mods.tconstruct.Casting.addBasinRecipe(<psi:psi_decorative:1>, null, <liquid:psimetal>, 1296);
# Makes enderpearl blocks from Actually Additions interact with the smeltery As They Should
mods.tconstruct.Casting.addBasinRecipe(<actuallyadditions:block_misc:6>, null, <liquid:ender>, 1000);
mods.tconstruct.Melting.addRecipe(<liquid:ender> * 1000,<actuallyadditions:block_misc:6>);
I've fixed the issue! It seems to have just been the fact that a few recipes were pointing to nonexistent materials.
Correcting "elvenelementium" to simply "elementium" and removing the fluxed electrum references altogether has fixed the issue and made the .zs work as intended, including my own changes.