Strange NPE in script
Bulldog83 opened this issue ยท 3 comments
Issue Description:
I have a strage NPE in this script, and I can't undestand why. Builders is an global variables declared in Init.zs script, "ore_tool_saw" has delared in Variables.zs.
This script, with Artisan Worktables using, works fine.
Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):
https://gist.github.com/Bulldog83/89ebac8f5570dc1628b76e6196d147cb
crafttweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):
https://gist.github.com/Bulldog83/42e362d8ce2edb9f2b787c3c05df7dc2#file-just-error
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2
- Forge: 14.23.4.2705
- Crafttweaker: 4.1.9
- Using a server: Yes
- If yes, does the client have the exact same scripts? Yes.
- Lines 16, 21, 25: no method call.
- Hiding a method with a field is bad practice, why do you even declare them as functions in the first place?
This is for my convenience. To avoid using in each separate file "import mods.artisanworktables.builder.RecipeBuilder;" and RecipeBuilder.get ("type of table");
I don't hide method with a field, it returns RecipeBuilder object with type wich me needs.
And thanks, issue were in lines 16, 21 and 25. :)