diff options
author | Erik Broes <erikbroes@grum.nl> | 2012-01-14 21:03:48 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2012-01-15 10:52:37 +0100 |
commit | 61ec751ca11f5bff9ec2dd1644982d5628270004 (patch) | |
tree | 8829269e1c5807b55566d367bec5ee630d5dfb1d /src/main/java/net/minecraft/server/EntityItem.java | |
parent | 6495eee0c9fddcce2c2aa9bf9c45118abea180c1 (diff) | |
download | craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.tar craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.tar.gz craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.tar.lz craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.tar.xz craftbukkit-61ec751ca11f5bff9ec2dd1644982d5628270004.zip |
Update for 1.1_01 renames.
We know these updates (can) break plugins bypassing Bukkit. They are needed for
smooth updates however. There will be another one right before before 1.1-R1.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityItem.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityItem.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java index 40c148ca..78b9899d 100644 --- a/src/main/java/net/minecraft/server/EntityItem.java +++ b/src/main/java/net/minecraft/server/EntityItem.java @@ -9,7 +9,7 @@ public class EntityItem extends Entity { public ItemStack itemStack; private int e; - public int b = 0; + public int age = 0; public int pickupDelay; private int f = 5; public float d = (float) (Math.random() * 3.141592653589793D * 2.0D); @@ -84,11 +84,11 @@ public class EntityItem extends Entity { } ++this.e; - ++this.b; - if (this.b >= 6000) { + ++this.age; + if (this.age >= 6000) { // CraftBukkit start - if(CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { - this.b = 0; + if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { + this.age = 0; return; } // CraftBukkit end @@ -116,13 +116,13 @@ public class EntityItem extends Entity { public void b(NBTTagCompound nbttagcompound) { nbttagcompound.setShort("Health", (short) ((byte) this.f)); - nbttagcompound.setShort("Age", (short) this.b); + nbttagcompound.setShort("Age", (short) this.age); nbttagcompound.setCompound("Item", this.itemStack.b(new NBTTagCompound())); } public void a(NBTTagCompound nbttagcompound) { this.f = nbttagcompound.getShort("Health") & 255; - this.b = nbttagcompound.getShort("Age"); + this.age = nbttagcompound.getShort("Age"); NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Item"); this.itemStack = ItemStack.a(nbttagcompound1); @@ -179,7 +179,7 @@ public class EntityItem extends Entity { } } - public String ad() { + public String getLocalizedName() { return LocaleI18n.a("item." + this.itemStack.k()); } } |