mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-20 15:57:49 +01:00
Support icon amount > 1 for API calls
This commit is contained in:
parent
0c0ec27233
commit
8293f8b642
@ -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);
|
||||
}
|
||||
|
||||
|
@ -197,8 +197,6 @@ 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.setCount(1);
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
@ -197,8 +197,6 @@ 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.setCount(1);
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
@ -197,8 +197,6 @@ 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.setCount(1);
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
@ -197,8 +197,6 @@ 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.setCount(1);
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
@ -199,8 +199,6 @@ 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.setCount(1);
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
@ -178,14 +178,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
NBTTagCompound display = newItem.getTag().getCompound("display");
|
||||
|
||||
if (!newItem.getTag().hasKey("display")) {
|
||||
newItem.getTag().set("display", display);
|
||||
newItem.getTag().set("display", display);
|
||||
}
|
||||
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
|
||||
|
||||
display.set("Lore", tagList);
|
||||
newItem.count = 0;
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
||||
|
@ -178,14 +178,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
NBTTagCompound display = newItem.getTag().getCompound("display");
|
||||
|
||||
if (!newItem.getTag().hasKey("display")) {
|
||||
newItem.getTag().set("display", display);
|
||||
newItem.getTag().set("display", display);
|
||||
}
|
||||
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
|
||||
|
||||
display.set("Lore", tagList);
|
||||
newItem.count = 0;
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
||||
|
@ -178,14 +178,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
NBTTagCompound display = newItem.getTag().getCompound("display");
|
||||
|
||||
if (!newItem.getTag().hasKey("display")) {
|
||||
newItem.getTag().set("display", display);
|
||||
newItem.getTag().set("display", display);
|
||||
}
|
||||
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
|
||||
|
||||
display.set("Lore", tagList);
|
||||
newItem.count = 0;
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
||||
|
@ -215,14 +215,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
NBTTagCompound display = newItem.getTag().getCompound("display");
|
||||
|
||||
if (!newItem.getTag().hasKey("display")) {
|
||||
newItem.getTag().set("display", display);
|
||||
newItem.getTag().set("display", display);
|
||||
}
|
||||
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
|
||||
|
||||
display.set("Lore", tagList);
|
||||
newItem.count = 0;
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
||||
|
@ -216,14 +216,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
NBTTagCompound display = newItem.getTag().getCompound("display");
|
||||
|
||||
if (!newItem.getTag().hasKey("display")) {
|
||||
newItem.getTag().set("display", display);
|
||||
newItem.getTag().set("display", display);
|
||||
}
|
||||
|
||||
NBTTagList tagList = new NBTTagList();
|
||||
tagList.add(new NBTTagString(ItemUtils.ANTISTACK_LORE)); // Antistack lore
|
||||
|
||||
display.set("Lore", tagList);
|
||||
newItem.count = 0;
|
||||
|
||||
setItemStack(newItem);
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user