
API calls returning ItemStack information crash the game
glyphscribe opened this issue ยท 3 comments
((Thanks so much for this very handy mod!))
Describe the bug
Requests to the colony4cc API that would return item information crash the server -- singleplayer will crash the game, multiplayer will crash the server.
Confirmed against getRequests()
and getVisitorInfo()
where those would return data. Empty responses do not crash the game. Other methods with non-inventory responses do not crash the game.
To Reproduce
To reproduce, call either of the named methods when item data exists.
Expected behavior
getRequests()
or getVisitorInfo()
returning a table containing, among other things, ItemStack information without a crash.
Versions:
- Minecraft: Forge 1.19.2-43.1.52
- Minecolonies: 1.19.2-1.0.1124
- Colony4cc: 1.19.1-2.3.1
Stack Trace:
---- Minecraft Crash Report ----
// Daisy, daisy...
Time: 2022-11-26 23:43:54
Description: Exception in server tick loop
java.lang.NoSuchMethodError: 'java.util.Map dan200.computercraft.shared.peripheral.generic.data.ItemData.fill(java.util.Map, net.minecraft.world.item.ItemStack)'
at nz.co.mirality.colony4cc.LuaConversion$MinecraftConverter.convertStack(LuaConversion.java:130) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.LuaConversion$MinecraftConverter.convert(LuaConversion.java:81) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.LuaConversion.convert(LuaConversion.java:41) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.LuaConversion$CollectionConverter.convert(LuaConversion.java:62) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.LuaConversion.convert(LuaConversion.java:41) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.LuaConversion$CollectionConverter.lambda$convert$0(LuaConversion.java:55) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at java.util.HashMap.forEach(Unknown Source) ~[?:?] {re:mixin}
at nz.co.mirality.colony4cc.LuaConversion$CollectionConverter.convert(LuaConversion.java:55) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.LuaConversion.convert(LuaConversion.java:41) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.LuaConversion$CollectionConverter.convert(LuaConversion.java:62) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.LuaConversion.convert(LuaConversion.java:41) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.peripheral.ColonyPeripheral.getRequests(ColonyPeripheral.java:528) ~[Colony4ComputerCraft-1.19.1-2.3.1.jar%23179!/:2.3.1] {re:classloading}
at nz.co.mirality.colony4cc.peripheral.ColonyPeripheral$cc$getRequests86.apply(CC generated method) ~[?:?] {re:classloading,re:classloading,re:classloading,re:classloading}
at dan200.computercraft.core.asm.PeripheralMethod.lambda$static$0(PeripheralMethod.java:21) ~[cc-tweaked-1.19.2-1.101.1.jar%23172!/:1.101.1] {re:classloading}
at dan200.computercraft.core.computer.LuaContext.lambda$issueMainThreadTask$0(LuaContext.java:32) ~[cc-tweaked-1.19.2-1.101.1.jar%23172!/:1.101.1] {re:classloading}
at dan200.computercraft.core.computer.mainthread.MainThreadExecutor.execute(MainThreadExecutor.java:146) ~[cc-tweaked-1.19.2-1.101.1.jar%23172!/:1.101.1] {re:classloading}
at dan200.computercraft.core.computer.mainthread.MainThread.tick(MainThread.java:144) ~[cc-tweaked-1.19.2-1.101.1.jar%23172!/:1.101.1] {re:classloading}
at dan200.computercraft.shared.computer.core.ServerContext.tick(ServerContext.java:148) ~[cc-tweaked-1.19.2-1.101.1.jar%23172!/:1.101.1] {re:classloading}
at dan200.computercraft.shared.CommonHooks.onServerTick(CommonHooks.java:56) ~[cc-tweaked-1.19.2-1.101.1.jar%23172!/:1.101.1] {re:classloading}
at dan200.computercraft.shared.__CommonHooks_onServerTick_ServerTickEvent.invoke(.dynamic) ~[cc-tweaked-1.19.2-1.101.1.jar%23172!/:1.101.1] {re:classloading,pl:eventbus:B}
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2379!/:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2379!/:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2379!/:?] {}
at net.minecraftforge.event.ForgeEventFactory.onPreServerTick(ForgeEventFactory.java:835) ~[forge-1.19.2-43.1.52-universal.jar%23305!/:?] {re:classloading}
at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:804) ~[client-1.19.2-20220805.130853-srg.jar%23300!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:84) ~[client-1.19.2-20220805.130853-srg.jar%23300!/:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[client-1.19.2-20220805.130853-srg.jar%23300!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[client-1.19.2-20220805.130853-srg.jar%23300!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:A}
at java.lang.Thread.run(Unknown Source) [?:?] {}
That error means that you're using too new a version of CC:Tweaked. 1.100.9 will definitely work; several newer versions probably will too. What version are you currently using?