Issue enabling mob spawners for stage
BrewingCoder opened this issue ยท 3 comments
script:
//Dimensions, Allow Overworld and Mining Dimension Only
mods.DimensionStages.addDimensionStage("ch1",6);
//Mob Spawning Control. Chapter one is lightweight. We'll only have Zombies and Spiders
mods.MobStages.addStage("ch1","minecraft:zombie");
mods.MobStages.addStage("ch1","minecraft:spider");
//Allow Skelly spawners to work in Ch1 if they find one
mods.MobStages.toggleSpawner("minecraft:skeleton",true,0);
Crafttweaker log:
[INITIALIZATION][SERVER][INFO] [crafttweaker | SIDE_SERVER]: Loading Script: {[0:crafttweaker]: stage_chapter_1.zs}
[INITIALIZATION][SERVER][INFO] Dimension 6 has been added to stage ch1
[INITIALIZATION][SERVER][INFO] Adding minecraft:zombie to stage.ch1
[INITIALIZATION][SERVER][INFO] Adding minecraft:spider to stage.ch1
[INITIALIZATION][SERVER][INFO] Toggling spawners for minecraft:skeleton to true Dimension: 0
[INITIALIZATION][SERVER][ERROR] [crafttweaker]: Error executing {[0:crafttweaker]: stage_chapter_1.zs}: null
java.lang.NullPointerException
at net.darkhax.mobstages.compat.crt.ActionOverlookSpawners.apply(ActionOverlookSpawners.java:37)
at crafttweaker.runtime.CrTTweaker.apply(CrTTweaker.java:43)
at crafttweaker.CraftTweakerAPI.apply(CraftTweakerAPI.java:131)
at net.darkhax.mobstages.compat.crt.MobStagesCrT.toggleSpawner(MobStagesCrT.java:57)
at Stage_chapter_1.__script__(stage_chapter_1.zs:10)
at __ZenMain__.run(Stage_chapter_1)
at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:147)
at crafttweaker.runtime.CrTTweaker.load(CrTTweaker.java:54)
at crafttweaker.CrafttweakerImplementationAPI.load(CrafttweakerImplementationAPI.java:115)
at crafttweaker.mc1120.events.CommonEventHandler.registerRecipes(CommonEventHandler.java:50)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_310_CommonEventHandler_registerRecipes_Register.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:143)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:179)
at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:746)
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:622)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:717)
at net.minecraftforge.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:107)
at net.minecraftforge.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:337)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:219)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:484)
at java.lang.Thread.run(Thread.java:748)
[INITIALIZATION][SERVER][INFO] [crafttweaker | SIDE_SERVER]: Loading Script: {[0:crafttweaker]: stage_chapter_2.zs}
[INITIALIZATION][SERVER][INFO] Dimension -1 has been added to stage ch2
[INITIALIZATION][SERVER][INFO] Adding minecraft:creeper to stage.ch2
[INITIALIZATION][SERVER][INFO] Adding minecraft:skeleton to stage.ch2
This follows the syntax shown in the example scripts; though I'm not sure why it doesn't have a stage parameter.
Hello, sorry for the late response this issue kind of slipped through my notice. I believe the issue you are having is that you have not staged the skeleton's stage yet. The spawner toggle method does not have a stage parameter because it is meant to be used in conjunction with the other one. I will put out a fix on my end that makes this issue more clear in the future.
I have fixed this issue by giving a more descriptive error message. The fix is live in this version. Currently waiting for Curse to approve the file. https://minecraft.curseforge.com/projects/mob-stages/files/2539439