diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-11-06 06:05:28 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-11-13 16:09:52 -0600 |
commit | 7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7 (patch) | |
tree | 843902ff94d82e86f40d7e0af1ac838fee859e75 /src/main/java/net/minecraft/server/EntityExperienceOrb.java | |
parent | a0c3b4f9d1b403fa64230f22b5dd3222181ba646 (diff) | |
download | craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.gz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.lz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.xz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.zip |
Update CraftBukkit to Minecraft 1.4.4.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityExperienceOrb.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityExperienceOrb.java | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java index 235cac9a..a733b6a8 100644 --- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java +++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java @@ -53,7 +53,7 @@ public class EntityExperienceOrb extends Entity { this.motY = 0.20000000298023224D; this.motX = (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F); this.motZ = (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F); - this.world.makeSound(this, "random.fizz", 0.4F, 2.0F + this.random.nextFloat() * 0.4F); + this.makeSound("random.fizz", 0.4F, 2.0F + this.random.nextFloat() * 0.4F); } this.i(this.locX, (this.boundingBox.b + this.boundingBox.e) / 2.0D, this.locZ); @@ -123,13 +123,17 @@ public class EntityExperienceOrb extends Entity { } public boolean damageEntity(DamageSource damagesource, int i) { - this.K(); - this.d -= i; - if (this.d <= 0) { - this.die(); - } + if (this.isInvulnerable()) { + return false; + } else { + this.K(); + this.d -= i; + if (this.d <= 0) { + this.die(); + } - return false; + return false; + } } public void b(NBTTagCompound nbttagcompound) { @@ -144,11 +148,11 @@ public class EntityExperienceOrb extends Entity { this.value = nbttagcompound.getShort("Value"); } - public void b_(EntityHuman entityhuman) { + public void c_(EntityHuman entityhuman) { if (!this.world.isStatic) { - if (this.c == 0 && entityhuman.bU == 0) { - entityhuman.bU = 2; - this.world.makeSound(this, "random.orb", 0.1F, 0.5F * ((this.random.nextFloat() - this.random.nextFloat()) * 0.7F + 1.8F)); + if (this.c == 0 && entityhuman.bR == 0) { + entityhuman.bR = 2; + this.makeSound("random.orb", 0.1F, 0.5F * ((this.random.nextFloat() - this.random.nextFloat()) * 0.7F + 1.8F)); entityhuman.receive(this, 1); entityhuman.giveExp(CraftEventFactory.callPlayerExpChangeEvent(entityhuman, this.value).getAmount()); // CraftBukkit - this.value to event.getAmount() this.die(); |