Commands not working, reason unknown
hoolatehip opened this issue · 1 comments
Attempting to use LootTweaker to add some items to particular loot tables. The scripts are not working and I'm getting error messages instead. I don't know if the source of the problem is a bad script or another mod.
Script:
import loottweaker.LootTweaker;
import loottweaker.vanilla.loot.LootTable;
import loottweaker.vanilla.loot.LootPool;
val dungeon = Loottweaker.getTable("minecraft:chests/simple_dungeon").addPool("mystag", 0, 1, 0, 2);
val corridor = Loottweaker.getTable("minecraft:chests/stronghold_corridor").addPool("mystag", 0, 1, 0, 2);
val cross = Loottweaker.getTable("minecraft:chests/stronghold_crossing").addPool("mystag", 0, 1, 0, 2);
[similar lines omitted]
dungeon.addItemEntry(mysticalagriculture:stone_essence, 1);
dungeon.addItemEntry(mysticalagriculture:dirt_essence, 1);
dungeon.addItemEntry(mysticalagriculture:wood_essence, 1);
[similar lines omitted]
Relevant section of Log
[10:01:32] [Client thread/INFO]: [CHAT] §cERROR: Loot table adjustments.zs:5 > could not find Loottweaker
[10:01:32] [Client thread/INFO]: [CHAT] §cERROR: Loot table adjustments.zs:5 > any values not yet supported
[10:01:32] [Client thread/INFO]: [CHAT] §cERROR: Loot table adjustments.zs:6 > could not find Loottweaker
[10:01:32] [Client thread/INFO]: [CHAT] §cERROR: Loot table adjustments.zs:6 > any values not yet supported
[similar lines omitted]
[10:01:32] [Client thread/INFO]: [CHAT] §cERROR: [crafttweaker]: Error executing {[0:crafttweaker]: Loot table adjustments.zs}: Bad type on operand stack
Exception Details:
Location:
Loot_table_adjustments.script()V @23: invokestatic
Reason:
Type 'stanhebben/zenscript/value/IAny' (current frame, stack[4]) is not assignable to 'java/lang/String'
Current Frame:
bci: @23
flags: { }
locals: { }
stack: { null, '[Lstanhebben/zenscript/value/IAny;', '[Lstanhebben/zenscript/value/IAny;', integer, 'stanhebben/zenscript/value/IAny' }
Bytecode:
[omitted]
Stackmap Table:
full_frame(@20 {},{Null,Object[#164],Object[#164],Integer,Object[#166]})
[pages and pages of similar strings omitted]
at ZenMain.run(Loot_table_adjustments)
at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:240)
at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:105)
at crafttweaker.mc1120.events.CommonEventHandler.registerRecipes(CommonEventHandler.java:71)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1104_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:144)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:857)
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:636)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:747)
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:535)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:378)
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:498)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
Modlist:
modlist.txt
Version Info:
LootTweaker: 0.3.1
CraftTweaker2: 4.1.20.674
Forge: 14.23.5.2860
Minecraft: 1.12.2