BlockEntity Slot Crash
EvanHsieh0415 opened this issue · 2 comments
Minecraft Version
1.20.1
KubeJS Version
2001.6.3-Build.47
Rhino Version
2001.2.2-build.6
Architectury Version
9.1.12
Forge/Fabric Version
Forge 47.1.47
Describe your issue
event.create("test:block_entity_2")
.textureAll("minecraft:block/redstone_block")
.blockEntity((entityInfo) => {
entityInfo.inventory(1, 1);
entityInfo.rightClickOpensInventory();
entityInfo.serverTick(1, 0, (entity) => {
entity.inventory.insertItem("stick", false);
})
})
Crash when placing items into slots that should not be there
Crash report/logs
iirc mr crayfish backpack mod has a functionality that let's its backpacks have a customizable number of slots
the screen of the backpack will change to make it work
maybe you could take a look at it idk
see here: https://github.com/MrCrayfish/Backpacked/blob/multiloader/1.20.X/common/src/main/java/com/mrcrayfish/backpacked/client/gui/screen/inventory/BackpackScreen.java#L119-L142