Skip to content

Instantly share code, notes, and snippets.

@Daomephsta
Created September 20, 2018 03:25
Show Gist options
  • Save Daomephsta/3835afc1282a26c0f9547f07e65e6c5d to your computer and use it in GitHub Desktop.
Save Daomephsta/3835afc1282a26c0f9547f07e65e6c5d to your computer and use it in GitHub Desktop.
ZenExpansion issue
[PREINITIALIZATION][CLIENT][INFO] Current loaders after merging: [[preinit]]
[PREINITIALIZATION][CLIENT][INFO] Loading scripts for loader with names [preinit]
[PREINITIALIZATION][CLIENT][INFO] [preinit | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: test.zs} as we are currently loading with a different loader
[PREINITIALIZATION][CLIENT][INFO] Completed script loading in: 3ms
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Building registry
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Successfully built item registry
[INITIALIZATION][CLIENT][INFO] Current loaders after merging: [[preinit], [recipeevent | crafttweaker]]
[INITIALIZATION][CLIENT][INFO] Loading scripts for loader with names [crafttweaker | recipeevent]
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: test.zs}
[INITIALIZATION][CLIENT][ERROR] test.zs:8 > No such member in loottweaker.vanilla.loot.ModConditions: hasStage
[INITIALIZATION][CLIENT][ERROR] [crafttweaker]: Error executing {[0:crafttweaker]: test.zs}: Bad type on operand stack
Exception Details:
Location:
Test.__script__()V @68: invokestatic
Reason:
Type 'stanhebben/zenscript/value/IAny' (current frame, stack[12]) is not assignable to 'java/lang/String'
Current Frame:
bci: @68
flags: { }
locals: { top, 'leviathan143/loottweaker/common/zenscript/ZenLootTableWrapper', top, 'leviathan143/loottweaker/common/zenscript/ZenLootPoolWrapper' }
stack: { 'leviathan143/loottweaker/common/zenscript/ZenLootPoolWrapper', 'crafttweaker/api/item/IItemStack', integer, integer, '[Lleviathan143/loottweaker/common/zenscript/ZenLootFunctionWrapper;', '[Lleviathan143/loottweaker/common/zenscript/ZenLootConditionWrapper;', '[Lleviathan143/loottweaker/common/zenscript/ZenLootConditionWrapper;', integer, null, '[Lstanhebben/zenscript/value/IAny;', '[Lstanhebben/zenscript/value/IAny;', integer, 'stanhebben/zenscript/value/IAny' }
Bytecode:
0x0000000: 120b b800 114c 2b12 13b6 0019 4e2d 121b
0x0000010: 121c b800 2212 23b9 0029 0200 122a 1223
0x0000020: 121c bd00 2c12 23bd 002e 5912 1c01 1223
0x0000030: bd00 3059 121c 1232 59c7 0008 5701 a700
0x0000040: 06b8 0038 b800 3e53 b900 4202 0012 2eb9
0x0000050: 0046 0200 5301 b600 4cb1
Stackmap Table:
full_frame(@65,{Top,Object[#21],Top,Object[#72]},{Object[#72],Object[#37],Integer,Integer,Object[#78],Object[#80],Object[#80],Integer,Null,Object[#82],Object[#82],Integer,Object[#84]})
full_frame(@68,{Top,Object[#21],Top,Object[#72]},{Object[#72],Object[#37],Integer,Integer,Object[#78],Object[#80],Object[#80],Integer,Null,Object[#82],Object[#82],Integer,Object[#48]})
java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
Test.__script__()V @68: invokestatic
Reason:
Type 'stanhebben/zenscript/value/IAny' (current frame, stack[12]) is not assignable to 'java/lang/String'
Current Frame:
bci: @68
flags: { }
locals: { top, 'leviathan143/loottweaker/common/zenscript/ZenLootTableWrapper', top, 'leviathan143/loottweaker/common/zenscript/ZenLootPoolWrapper' }
stack: { 'leviathan143/loottweaker/common/zenscript/ZenLootPoolWrapper', 'crafttweaker/api/item/IItemStack', integer, integer, '[Lleviathan143/loottweaker/common/zenscript/ZenLootFunctionWrapper;', '[Lleviathan143/loottweaker/common/zenscript/ZenLootConditionWrapper;', '[Lleviathan143/loottweaker/common/zenscript/ZenLootConditionWrapper;', integer, null, '[Lstanhebben/zenscript/value/IAny;', '[Lstanhebben/zenscript/value/IAny;', integer, 'stanhebben/zenscript/value/IAny' }
Bytecode:
0x0000000: 120b b800 114c 2b12 13b6 0019 4e2d 121b
0x0000010: 121c b800 2212 23b9 0029 0200 122a 1223
0x0000020: 121c bd00 2c12 23bd 002e 5912 1c01 1223
0x0000030: bd00 3059 121c 1232 59c7 0008 5701 a700
0x0000040: 06b8 0038 b800 3e53 b900 4202 0012 2eb9
0x0000050: 0046 0200 5301 b600 4cb1
Stackmap Table:
full_frame(@65,{Top,Object[#21],Top,Object[#72]},{Object[#72],Object[#37],Integer,Integer,Object[#78],Object[#80],Object[#80],Integer,Null,Object[#82],Object[#82],Integer,Object[#84]})
full_frame(@68,{Top,Object[#21],Top,Object[#72]},{Object[#72],Object[#37],Integer,Integer,Object[#78],Object[#80],Object[#80],Integer,Null,Object[#82],Object[#82],Integer,Object[#48]})
at __ZenMain__.run(Test)
at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:212)
at crafttweaker.runtime.CrTTweaker.loadScript(CrTTweaker.java:100)
at crafttweaker.mc1120.events.CommonEventHandler.registerRecipes(CommonEventHandler.java:68)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_75_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:764)
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:623)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:742)
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336)
at net.minecraft.client.Minecraft.init(Minecraft.java:571)
at net.minecraft.client.Minecraft.run(Minecraft.java:411)
at net.minecraft.client.main.Main.main(Main.java:118)
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)
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.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:25)
[INITIALIZATION][CLIENT][INFO] Completed script loading in: 426ms
[SERVER_STARTED][CLIENT][INFO] Fixed the RecipeBook
import loottweaker.vanilla.loot.LootTables;
import loottweaker.vanilla.loot.LootTable;
import loottweaker.vanilla.loot.LootPool;
import loottweaker.vanilla.loot.ModConditions;
import loottweaker.vanilla.loot.Conditions;
val pig = LootTables.getTable("minecraft:entities/pig");
val main = pig.getPool("main");
main.addItemEntryHelper(<minecraft:apple> * 1, 20, 1, [], [modConditions.hasStage("apple" as string)]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment