@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/ItemStack.java
|
||||
+++ b/net/minecraft/server/ItemStack.java
|
||||
@@ -5,6 +5,19 @@
|
||||
import java.text.DecimalFormat;
|
||||
@@ -6,6 +6,19 @@
|
||||
import java.util.Random;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import java.util.List;
|
||||
@@ -20,7 +20,7 @@
|
||||
public final class ItemStack {
|
||||
|
||||
public static final DecimalFormat a = new DecimalFormat("#.##");
|
||||
@@ -46,10 +59,20 @@
|
||||
@@ -47,10 +60,20 @@
|
||||
this.k = false;
|
||||
this.item = item;
|
||||
this.count = i;
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -84,11 +107,131 @@
|
||||
@@ -85,11 +108,131 @@
|
||||
}
|
||||
|
||||
public EnumInteractionResult placeItem(EntityHuman entityhuman, World world, BlockPosition blockposition, EnumHand enumhand, EnumDirection enumdirection, float f, float f1, float f2) {
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
return enuminteractionresult;
|
||||
}
|
||||
@@ -112,7 +255,7 @@
|
||||
@@ -114,7 +257,7 @@
|
||||
nbttagcompound.setByte("Count", (byte) this.count);
|
||||
nbttagcompound.setShort("Damage", (short) this.damage);
|
||||
if (this.tag != null) {
|
||||
@@ -186,7 +186,7 @@
|
||||
}
|
||||
|
||||
return nbttagcompound;
|
||||
@@ -121,13 +264,18 @@
|
||||
@@ -123,13 +266,18 @@
|
||||
public void c(NBTTagCompound nbttagcompound) {
|
||||
this.item = Item.d(nbttagcompound.getString("id"));
|
||||
this.count = nbttagcompound.getByte("Count");
|
||||
@@ -206,7 +206,7 @@
|
||||
if (this.item != null) {
|
||||
this.item.a(this.tag);
|
||||
}
|
||||
@@ -164,11 +312,30 @@
|
||||
@@ -166,11 +314,30 @@
|
||||
}
|
||||
|
||||
public void setData(int i) {
|
||||
@@ -239,7 +239,7 @@
|
||||
}
|
||||
|
||||
public int j() {
|
||||
@@ -216,6 +383,12 @@
|
||||
@@ -218,6 +385,12 @@
|
||||
this.count = 0;
|
||||
}
|
||||
|
||||
@@ -252,8 +252,8 @@
|
||||
this.damage = 0;
|
||||
}
|
||||
|
||||
@@ -513,6 +686,7 @@
|
||||
|
||||
@@ -518,6 +691,7 @@
|
||||
@Deprecated
|
||||
public void setItem(Item item) {
|
||||
this.item = item;
|
||||
+ this.setData(this.getData()); // CraftBukkit - Set data again to ensure it is filtered properly
|
||||
|
||||
Reference in New Issue
Block a user