Fix overflow for large stack sizes in storeInterfacePattern (#146)

Co-authored-by: Julia Dijkstra <julia.dijkstra@technolution.nl>
This commit is contained in:
Julia 2025-02-10 22:16:29 +01:00 committed by GitHub
parent 0633b32698
commit 792d589047
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,6 +116,7 @@ object DriverBlockInterface extends DriverSidedTileEntity {
throw new IllegalArgumentException("Invalid index!")
val stackNBT = nbt.getCompoundTagAt(index)
val stack = ItemStack.loadItemStackFromNBT(stackNBT)
stack.stackSize = 1;
DatabaseAccess.withDatabase(node, args.checkString(2), database => {
val slot = args.optSlot(database.data, 3, 0)
database.setStackInSlot(slot, stack)