CompactStorage

CompactStorage

11M Downloads

got 288 items but max is 256

TheGreatSardini opened this issue ยท 1 comments

commented

Describe the bug
When breaking a maxed chest or barrel with items in it, it gives the error "got 288 items but max is 256" in the log and crashes out of the game.
I'm running on my client, not on a server.

To Reproduce
Minecraft 1.21, Fabric API 0.100.7 (latest as of today), Architectury v13.0.6
expand to max
place item in slot 256 or greater (I was using emeralds)
close and break (errors with or without the retaining upgrade

Expected behavior
Not crash the game.

Screenshots
image

Log files
[19:04:41] [Server thread/ERROR]: Failed to handle packet net.minecraft.class_2846@7abb6cf6, suppressing error
java.lang.IllegalArgumentException: Got 288 items, but maximum is 256
at net.minecraft.class_9288.(class_9288.java:33) ~[client-intermediary.jar:?]
at net.minecraft.class_9288.(class_9288.java:40) ~[client-intermediary.jar:?]
at net.minecraft.class_9288.method_57493(class_9288.java:69) ~[client-intermediary.jar:?]
at net.minecraft.class_2624.method_57567(class_2624.java:169) ~[client-intermediary.jar:?]
at net.minecraft.class_2621.method_57567(class_2621.java:106) ~[client-intermediary.jar:?]
at com.witchica.compactstorage.common.block.entity.CompactBarrelBlockEntity.method_57567(CompactBarrelBlockEntity.java:162) ~[compact_storage-1.21-fabric-8.0.74.jar:?]
at net.minecraft.class_2586.method_57590(class_2586.java:327) ~[client-intermediary.jar:?]
at com.witchica.compactstorage.common.block.entity.CompactBarrelBlockEntity.method_38240(CompactBarrelBlockEntity.java:157) ~[compact_storage-1.21-fabric-8.0.74.jar:?]
at com.witchica.compactstorage.common.util.CompactStorageUtil.dropContents(CompactStorageUtil.java:90) ~[compact_storage-1.21-fabric-8.0.74.jar:?]
at com.witchica.compactstorage.common.block.CompactBarrelBlock.method_9576(CompactBarrelBlock.java:167) ~[compact_storage-1.21-fabric-8.0.74.jar:?]
at net.minecraft.class_3225.method_14266(class_3225.java:266) ~[client-intermediary.jar:?]
at net.minecraft.class_3225.method_21717(class_3225.java:235) ~[client-intermediary.jar:?]
at net.minecraft.class_3225.method_14263(class_3225.java:165) ~[client-intermediary.jar:?]
at net.minecraft.class_3244.method_12066(class_3244.java:1102) ~[client-intermediary.jar:?]
at net.minecraft.class_2846.method_12361(class_2846.java:50) ~[client-intermediary.jar:?]
at net.minecraft.class_2846.method_11054(class_2846.java:10) ~[client-intermediary.jar:?]
at net.minecraft.class_2600.method_11072(class_2600.java:27) ~[client-intermediary.jar:?]
at net.minecraft.class_3738.run(class_3738.java:18) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_18859(class_1255.java:162) ~[client-intermediary.jar:?]
at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:864) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:173) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_16075(class_1255.java:136) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:846) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:840) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_18857(class_1255.java:145) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_18857(MinecraftServer.java:810) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:815) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:702) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281) ~[client-intermediary.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[19:04:53] [Server thread/ERROR]: Failed to handle packet net.minecraft.class_2846@3758b877, suppressing error
java.lang.IllegalArgumentException: Got 288 items, but maximum is 256
at net.minecraft.class_9288.(class_9288.java:33) ~[client-intermediary.jar:?]
at net.minecraft.class_9288.(class_9288.java:40) ~[client-intermediary.jar:?]
at net.minecraft.class_9288.method_57493(class_9288.java:69) ~[client-intermediary.jar:?]
at net.minecraft.class_2624.method_57567(class_2624.java:169) ~[client-intermediary.jar:?]
at net.minecraft.class_2621.method_57567(class_2621.java:106) ~[client-intermediary.jar:?]
at com.witchica.compactstorage.common.block.entity.CompactBarrelBlockEntity.method_57567(CompactBarrelBlockEntity.java:162) ~[compact_storage-1.21-fabric-8.0.74.jar:?]
at net.minecraft.class_2586.method_57590(class_2586.java:327) ~[client-intermediary.jar:?]
at com.witchica.compactstorage.common.block.entity.CompactBarrelBlockEntity.method_38240(CompactBarrelBlockEntity.java:157) ~[compact_storage-1.21-fabric-8.0.74.jar:?]
at com.witchica.compactstorage.common.util.CompactStorageUtil.dropContents(CompactStorageUtil.java:90) ~[compact_storage-1.21-fabric-8.0.74.jar:?]
at com.witchica.compactstorage.common.block.CompactBarrelBlock.method_9576(CompactBarrelBlock.java:167) ~[compact_storage-1.21-fabric-8.0.74.jar:?]
at net.minecraft.class_3225.method_14266(class_3225.java:266) ~[client-intermediary.jar:?]
at net.minecraft.class_3225.method_21717(class_3225.java:235) ~[client-intermediary.jar:?]
at net.minecraft.class_3225.method_14263(class_3225.java:165) ~[client-intermediary.jar:?]
at net.minecraft.class_3244.method_12066(class_3244.java:1102) ~[client-intermediary.jar:?]
at net.minecraft.class_2846.method_12361(class_2846.java:50) ~[client-intermediary.jar:?]
at net.minecraft.class_2846.method_11054(class_2846.java:10) ~[client-intermediary.jar:?]
at net.minecraft.class_2600.method_11072(class_2600.java:27) ~[client-intermediary.jar:?]
at net.minecraft.class_3738.run(class_3738.java:18) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_18859(class_1255.java:162) ~[client-intermediary.jar:?]
at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:864) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:173) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_16075(class_1255.java:136) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:846) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:840) ~[client-intermediary.jar:?]
at net.minecraft.class_1255.method_18857(class_1255.java:145) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_18857(MinecraftServer.java:810) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:815) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:702) ~[client-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:281) ~[client-intermediary.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

Additional context
seems like the fix is to not expand it past 256 slots.

commented

duplicate of #175