ContentTweaker

ContentTweaker

27M Downloads

CreativeTab not working properly with mods

aleshkanet opened this issue ยท 0 comments

commented

Logfile

[PREINITIALIZATION][CLIENT][INFO] Loading scripts
[PREINITIALIZATION][CLIENT][INFO] [contenttweaker | SIDE_CLIENT]: Loading Script: {[0:contenttweaker]: hello.zs}
[PREINITIALIZATION][CLIENT][ERROR] hello.zs:12: Could not resolve <bibliocraft : compass>
[PREINITIALIZATION][CLIENT][ERROR] hello.zs:12 > 3 methods available but none matches the parameters (string, any)
This is usually an error in your script, not in the mod
createCreativeTab(string, ZenTypeNative: crafttweaker.item.IItemStack)
createCreativeTab(string, ZenTypeNative: mods.contenttweaker.Item)
createCreativeTab(string, ZenTypeNative: mods.contenttweaker.Block)
[PREINITIALIZATION][CLIENT][ERROR] hello.zs:13 > any values not yet supported
[PREINITIALIZATION][CLIENT][ERROR] [contenttweaker]: Error executing {[0:contenttweaker]: hello.zs}: null
java.lang.NullPointerException
	at com.teamacronymcoders.contenttweaker.modules.vanilla.VanillaFactory.createCreativeTab(VanillaFactory.java:46)
	at Hello.__script__(hello.zs:9)
	at __ZenMain__.run(Hello)
	at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:149)
	at com.teamacronymcoders.contenttweaker.ContentTweaker.afterModuleHandlerInit(ContentTweaker.java:45)
	at com.teamacronymcoders.base.BaseModFoundation.preInit(BaseModFoundation.java:108)
	at com.teamacronymcoders.contenttweaker.ContentTweaker.preInit(ContentTweaker.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:606)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:253)
	at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:231)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
	at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
	at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
	at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
	at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
	at com.google.common.eventbus.EventBus.post(EventBus.java:217)
	at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:148)
	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:602)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:270)
	at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:466)
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377)
	at net.minecraft.client.main.Main.main(SourceFile:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Building registry
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Successfully built item registry
[INITIALIZATION][CLIENT][INFO] Loading scripts
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Skipping file {[0:contenttweaker]: hello.zs} as we are currently loading with a different loader
[SERVER_STARTED][CLIENT][INFO] Fixed the RecipeBook

Code

#loader contenttweaker
import mods.contenttweaker.CreativeTab;
import mods.contenttweaker.VanillaFactory;

val zsTab = VanillaFactory.createCreativeTab("contenttweaker", <item:minecraft:iron_ingot>); // OK
zsTab.register();

val test1Tab = VanillaFactory.createCreativeTab("bibliotab", <item:bibliocraft:compass>); // NPE
test1Tab.register();

val test2Tab = VanillaFactory.createCreativeTab("bibliotabbbbb", <bibliocraft:compass>); // Could not resolve
test2Tab.register();