Skip to content

Commit 5323722

Browse files
committed
attempt to fix ruby rod.
1 parent a239432 commit 5323722

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

  • common/src/main/java/generations/gg/generations/core/generationscore/common/world/item/legends

common/src/main/java/generations/gg/generations/core/generationscore/common/world/item/legends/RubyRodItem.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ public static ObjectArrayList<ItemStack> sanitizeList(ObjectArrayList<ItemStack>
4242

4343
if (currentCount < 9) {
4444
int allowableCount = Math.min(stackCount, 9 - currentCount);
45-
ItemStack cappedStack = itemStack.copy();
46-
cappedStack.setCount(allowableCount);
4745

48-
sanitizedList.add(cappedStack);
49-
currentShards.put(shardType, (byte) (currentCount + allowableCount)); // Update currentShards in place
46+
if (allowableCount > 0) {
47+
ItemStack cappedStack = itemStack.copy();
48+
cappedStack.setCount(allowableCount);
49+
50+
sanitizedList.add(cappedStack);
51+
currentShards.put(shardType, (byte) (currentCount + allowableCount));
52+
}
5053
}
5154
}
5255
}

0 commit comments

Comments
 (0)