Support icon amount > 1 for API calls

This commit is contained in:
filoghost 2019-10-17 16:21:20 +02:00
parent 0c0ec27233
commit 8293f8b642
12 changed files with 12 additions and 27 deletions

View File

@ -221,9 +221,8 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
NBTTagList tagList = new NBTTagList();
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.count = 0;
setItemStack(newItem);
}

View File

@ -198,8 +198,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.setCount(1);
setItemStack(newItem);
}

View File

@ -198,8 +198,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.setCount(1);
setItemStack(newItem);
}

View File

@ -198,8 +198,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.setCount(1);
setItemStack(newItem);
}

View File

@ -198,8 +198,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.setCount(1);
setItemStack(newItem);
}

View File

@ -200,8 +200,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.setCount(1);
setItemStack(newItem);
}

View File

@ -183,9 +183,8 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
NBTTagList tagList = new NBTTagList();
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.count = 0;
setItemStack(newItem);
}

View File

@ -183,9 +183,8 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
NBTTagList tagList = new NBTTagList();
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.count = 0;
setItemStack(newItem);
}

View File

@ -183,9 +183,8 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
NBTTagList tagList = new NBTTagList();
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.count = 0;
setItemStack(newItem);
}

View File

@ -220,9 +220,8 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
NBTTagList tagList = new NBTTagList();
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.count = 0;
setItemStack(newItem);
}

View File

@ -221,9 +221,8 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
NBTTagList tagList = new NBTTagList();
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
display.set("Lore", tagList);
newItem.count = 0;
setItemStack(newItem);
}

View File

@ -50,6 +50,7 @@ public class CraftItemLine extends CraftTouchableLine implements ItemLine {
@Override
public void setItemStack(ItemStack itemStack) {
Validator.notNull(itemStack, "itemStack");
Validator.isTrue(0 < itemStack.getAmount() && itemStack.getAmount() <= 64, "Item must have amount between 1 and 64");
this.itemStack = itemStack;
if (nmsItem != null) {