mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Fix ArrayIndexOutOfBoundsException in Flower Bag. (#3073)
Can't have i set to -1 and then access an ArrayList using that as the index immediately afterwards.
This commit is contained in:
1 parent
3d7dc85f5d
commit
74c1bb464f
1 file changed
+1
-1
@@ -87,7 +87,7 @@ public class ContainerFlowerBag extends Container {
|
||||
} else {
|
||||
Block b = Block.getBlockFromItem(itemstack.getItem());
|
||||
int i = b instanceof BlockModFlower ? ((BlockModFlower) b).color.getId() : -1;
|
||||
if(i < 16) {
|
||||
if(i >= 0 && i < 16) {
|
||||
Slot slot1 = inventorySlots.get(i);
|
||||
if(slot1.isItemValid(itemstack) && !mergeItemStack(itemstack1, i, i + 1, true))
|
||||
return ItemStack.EMPTY;
|
||||
|
||||
Reference in new issue
Block a user