CraftTweaker

CraftTweaker

151M Downloads

NPE while applying actions

PrincessRTFM opened this issue ยท 5 comments

commented

Issue Description:

When loading an overhaul-style script I'm working on to move large amounts of crafts to Artisan Worktables, I got a NullPointerException during "applying actions" and no effects from the script were found in-game.

What happens:

An error is written to the log, the script has no effects at all in-game; no recipes are added, no recipes are removed.

What you expected to happen:

A significant number of recipes would be moved from vanilla crafting to Artisan Worktables.

Script used

https://pastebin.com/gKp8Djrc

crafttweaker.log file

https://paste.ee/p/4TEGo


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2816
  • Crafttweaker: 1.12-4.1.17
  • Using a server: no

Your most recent log file where the issue was present:

latest.log is too big for pastebin, split into part 1 and part 2

commented

Just realised I forgot to include the library file that defines the ITEM and ANY globals: https://pastebin.com/UibJ7M7g

commented

That was it. I went over every line using the ANY and ITEM library maps I set up and found several references that were never defined. Problem solved.

commented

Be careful about using ANY as name, since any is a reserved keyword

commented

Pretty sure I found the problem - I was trying to use ANY.paneGlass which wasn't defined. Testing now, if that was it I'll close the issue as a case of PEBKAC.

commented

It is? I didn't know that, alright. I should... ugh, I have so many lines using it that I have to change now...