KubeJS (Old)

KubeJS (Old)

3M Downloads

BlockContainerJS getInventory errors Fabric 1.18

TheQKnight opened this issue ยท 1 comments

commented

When using the getInventory method, KJs throws an error

[16:24:22] [Server thread/INFO]: [STDERR]: java.lang.NoClassDefFoundError: dev/latvian/mods/kubejs/world/fabric/BlockContainerJSImpl
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.kubejs.world.BlockContainerJS.getInventoryFromBlockEntity(BlockContainerJS.java)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.kubejs.world.BlockContainerJS.getInventory(BlockContainerJS.java:322)
[16:24:22] [Server thread/INFO]: [STDERR]:      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[16:24:22] [Server thread/INFO]: [STDERR]:      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[16:24:22] [Server thread/INFO]: [STDERR]:      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[16:24:22] [Server thread/INFO]: [STDERR]:      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.MemberBox.invoke(MemberBox.java:121)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.NativeJavaMethod.call(NativeJavaMethod.java:205)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.Interpreter.interpretLoop(Interpreter.java:1641)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.Interpreter.interpret(Interpreter.java:979)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.InterpretedFunction.call(InterpretedFunction.java:95)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.ContextFactory.doTopCall(ContextFactory.java:334)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.ScriptRuntime.doTopCall(ScriptRuntime.java:2856)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.InterpretedFunction.call(InterpretedFunction.java:93)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.ArrowFunction.call(ArrowFunction.java:41)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:131)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.InterfaceAdapter.lambda$invoke$0(InterfaceAdapter.java:90)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.Context.call(Context.java:366)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.ContextFactory.call(ContextFactory.java:441)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.InterfaceAdapter.invoke(InterfaceAdapter.java:90)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.rhino.jdk18.VMBridge_jdk18.lambda$newInterfaceProxy$0(VMBridge_jdk18.java:109)
[16:24:22] [Server thread/INFO]: [STDERR]:      at jdk.proxy2/jdk.proxy2.$Proxy76.onEvent(Unknown Source)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.kubejs.event.EventsJS.postToHandlers(EventsJS.java:58)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.kubejs.event.EventJS.post(EventJS.java:32)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.kubejs.world.WorldEventJS.post(WorldEventJS.java:34)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.latvian.mods.kubejs.block.KubeJSBlockEventHandler.rightClick(KubeJSBlockEventHandler.java:77)
[16:24:22] [Server thread/INFO]: [STDERR]:      at dev.architectury.event.fabric.EventHandlerImpl.lambda$registerCommon$20(EventHandlerImpl.java:77)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.fabricmc.fabric.api.event.player.UseBlockCallback.lambda$static$0(UseBlockCallback.java:41)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_3225.handler$bkp000$interactBlock(class_3225.java:2085)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_3225.method_14262(class_3225.java)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_3244.method_12046(class_3244.java:1057)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_2885.method_12547(class_2885.java:30)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_2885.method_11054(class_2885.java:8)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_2600.method_11072(class_2600.java:21)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_3738.run(class_3738.java:18)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_1255.method_18859(class_1255.java:151)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_4093.method_18859(class_4093.java:23)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:780)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:162)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_1255.method_16075(class_1255.java:125)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:762)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:756)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.class_1255.method_18857(class_1255.java:134)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:741)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.handler$zdh000$modifiedRunLoop(MinecraftServer.java:2865)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:663)
[16:24:22] [Server thread/INFO]: [STDERR]:      at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
[16:24:22] [Server thread/INFO]: [STDERR]:      at java.base/java.lang.Thread.run(Thread.java:833)
[16:24:22] [Server thread/INFO]: [STDERR]: Caused by: java.lang.ClassNotFoundException: dev.latvian.mods.kubejs.world.fabric.BlockContainerJSImpl
commented

Block entity inventories haven't been implemented yet on Fabric due to a lack of a functional, standardised transfer and lookup API up until recently. While Fabric API now has that, we still need to wait for Architectury to implement this so we can just fully move to that (tracking architectury/architectury-api#147 for this)