[1.18.2] Using stack_list throws ClassCastException
Partonetrain opened this issue ยท 0 comments
Hello again, I'm having an issue with stack_list preventing gates from loading.
[14Nov2022 18:27:40.484] [Server thread/ERROR] [Gateways to Eternity/]: Underlying Exception:
java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class net.minecraft.core.NonNullList (java.util.ArrayList is in module java.base of loader 'bootstrap'; net.minecraft.core.NonNullList is in module [email protected] of loader 'TRANSFORMER' @46b2dcc5)
at shadows.gateways.gate.Reward$StackListReward.read(Reward.java:195) ~[GatewaysToEternity-1.18.2-2.2.0.jar%23103!/:2.2.0]
at shadows.placebo.json.SerializerBuilder$Serializer.read(SerializerBuilder.java:155) ~[Placebo-1.18.2-6.6.6.jar%23131!/:6.6.6]
at shadows.gateways.gate.Reward.read(Reward.java:93) ~[GatewaysToEternity-1.18.2-2.2.0.jar%23103!/:2.2.0]
at shadows.gateways.gate.Reward$Serializer.deserialize(Reward.java:130) ~[GatewaysToEternity-1.18.2-2.2.0.jar%23103!/:2.2.0]
at shadows.gateways.gate.Reward$Serializer.deserialize(Reward.java:121) ~[GatewaysToEternity-1.18.2-2.2.0.jar%23103!/:2.2.0]
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69) ~[gson-2.8.9.jar%2335!/:?]
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:41) ~[gson-2.8.9.jar%2335!/:?]
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82) ~[gson-2.8.9.jar%2335!/:?]
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) ~[gson-2.8.9.jar%2335!/:?]
at com.google.gson.Gson.fromJson(Gson.java:963) ~[gson-2.8.9.jar%2335!/:?]
at com.google.gson.Gson.fromJson(Gson.java:1034) ~[gson-2.8.9.jar%2335!/:?]
at shadows.gateways.gate.Gateway.read(Gateway.java:109) ~[GatewaysToEternity-1.18.2-2.2.0.jar%23103!/:2.2.0]
at shadows.placebo.json.SerializerBuilder$Serializer.read(SerializerBuilder.java:155) ~[Placebo-1.18.2-6.6.6.jar%23131!/:6.6.6]
at shadows.placebo.json.PlaceboJsonReloadListener.lambda$apply$0(PlaceboJsonReloadListener.java:100) ~[Placebo-1.18.2-6.6.6.jar%23131!/:6.6.6]
at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
at shadows.placebo.json.PlaceboJsonReloadListener.apply(PlaceboJsonReloadListener.java:88) ~[Placebo-1.18.2-6.6.6.jar%23131!/:6.6.6]
at shadows.placebo.json.PlaceboJsonReloadListener.m_5787_(PlaceboJsonReloadListener.java:50) ~[Placebo-1.18.2-6.6.6.jar%23131!/:6.6.6]
at net.minecraft.server.packs.resources.SimplePreparableReloadListener.m_10789_(SimplePreparableReloadListener.java:13) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
at net.minecraft.server.packs.resources.SimpleReloadInstance.m_143940_(SimpleReloadInstance.java:69) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:799) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:164) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:782) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:776) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:140) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_129861_(MinecraftServer.java:1340) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.commands.ReloadCommand.m_138235_(ReloadCommand.java:22) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.commands.ReloadCommand.m_138228_(ReloadCommand.java:53) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[brigadier-1.0.18.jar%2333!/:?]
at net.minecraft.commands.Commands.m_82117_(Commands.java:234) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_9957_(ServerGamePacketListenerImpl.java:1150) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_143628_(ServerGamePacketListenerImpl.java:1129) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7388_(ServerGamePacketListenerImpl.java:1115) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.m_5797_(ServerboundChatPacket.java:30) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.m_5797_(ServerboundChatPacket.java:7) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.network.protocol.PacketUtils.m_131356_(PacketUtils.java:22) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:157) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:799) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:164) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:131) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:782) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:776) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:116) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:761) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:689) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261) ~[client-1.18.2-20220404.173914-srg.jar%23160!/:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
the relevant JSON:
"rewards": [{
"type": "stack_list",
"stacks": [
{
"item": "minecraft:nether_wart",
"count": 8
},
{
"item": "quark:soul_bead",
"count": 8
}
]
}],
Using any other reward type, and the JSON file in question is valid.