mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-26 12:15:13 +01:00
Fix for an index problem with the display item handler.
This commit is contained in:
parent
d94ddbb2dc
commit
8d405d20ce
@ -67,7 +67,8 @@ public class DisplayItemHandler {
|
||||
NBTItem nbtItem = NmsManager.getNbt().of(i.getItemStack());
|
||||
int inum = nbtItem.has("num") ? nbtItem.getNBTObject("num").asInt() + 1 : 0;
|
||||
|
||||
if (inum >= list.size()) inum = 0;
|
||||
int size = list.size();
|
||||
if (inum > size || inum <= 0) inum = 1;
|
||||
|
||||
ItemStack is = list.get(inum - 1);
|
||||
if (kitBlockData.isItemOverride()) {
|
||||
|
Loading…
Reference in New Issue
Block a user