Skip to content

Commit

Permalink
Fix overflow for large stack sizes in storeInterfacePattern (#146)
Browse files Browse the repository at this point in the history
Co-authored-by: Julia Dijkstra <[email protected]>
  • Loading branch information
Vlamonster and Julia Dijkstra authored Feb 10, 2025
1 parent 0633b32 commit 792d589
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 792d589

Please sign in to comment.