ContentTweaker

ContentTweaker

27M Downloads

[1.12.2] Tried to create an item but instead got an error

BlazeRabbit opened this issue ยท 1 comments

commented

The code:
var fan = VanillaFactory.createItem("fan");
fan.maxStackSize = 1;
fan.register();

The error:
ERROR: [crafttweaker]: Error executing {[0:crafttweaker]:
ContentTweaker\items.zs}: ALL REGISTERING MUST HAPPEN BEFORE
REGISTRY EVENT, caused by
com.teamacronymcoders.base.exeptions.TooLateExeption: ALL
REGISTERING MUST HAPPEN BEFORE REGISTRY EVENT

I'm really new into ContentTweaker so I couldn't really fix the problem. As I see, It says that registering (fan.maxStackSize = 1;) happens after registry event. (fan.register();) But it actually isn't. I don't know how to fix it.

commented

I fixed that. I looked into the issus here and found the same issue. And it seems I didn't include that #loader contenttweaker into the script.