diff options
author | md_5 <git@md-5.net> | 2016-03-01 08:32:46 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-03-01 09:32:45 +1100 |
commit | aa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch) | |
tree | cb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/EntityExperienceOrb.patch | |
parent | e1ebe524a78e27f6a2829ed4574fded3779094e1 (diff) | |
download | craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.gz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.lz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.tar.xz craftbukkit-aa008dff0f9bedbe88e1fe79831776b0a52eb90a.zip |
Update to Minecraft 1.9
Diffstat (limited to 'nms-patches/EntityExperienceOrb.patch')
-rw-r--r-- | nms-patches/EntityExperienceOrb.patch | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/nms-patches/EntityExperienceOrb.patch b/nms-patches/EntityExperienceOrb.patch index b01b0c7f..c63e7c19 100644 --- a/nms-patches/EntityExperienceOrb.patch +++ b/nms-patches/EntityExperienceOrb.patch @@ -14,8 +14,8 @@ public int a; @@ -34,6 +40,7 @@ - public void t_() { - super.t_(); + public void m() { + super.m(); + EntityHuman prevTarget = this.targetPlayer;// CraftBukkit - store old target if (this.c > 0) { --this.c; @@ -35,7 +35,7 @@ + + if (!cancelled && targetPlayer != null) { double d1 = (this.targetPlayer.locX - this.locX) / d0; - double d2 = (this.targetPlayer.locY + (double) this.targetPlayer.getHeadHeight() - this.locY) / d0; + double d2 = (this.targetPlayer.locY + (double) this.targetPlayer.getHeadHeight() / 2.0D - this.locY) / d0; double d3 = (this.targetPlayer.locZ - this.locZ) / d0; @@ -77,6 +94,8 @@ this.motY += d2 / d4 * d5 * 0.1D; @@ -46,16 +46,16 @@ } this.move(this.motX, this.motY, this.motZ); -@@ -141,7 +160,7 @@ - entityhuman.bp = 2; - this.world.makeSound(entityhuman, "random.orb", 0.1F, 0.5F * ((this.random.nextFloat() - this.random.nextFloat()) * 0.7F + 1.8F)); - entityhuman.receive(this, 1); -- entityhuman.giveExp(this.value); -+ entityhuman.giveExp(CraftEventFactory.callPlayerExpChangeEvent(entityhuman, this.value).getAmount()); // CraftBukkit - this.value -> event.getAmount() - this.die(); - } +@@ -151,7 +170,7 @@ + } -@@ -153,6 +172,24 @@ + if (this.value > 0) { +- entityhuman.giveExp(this.value); ++ entityhuman.giveExp(CraftEventFactory.callPlayerExpChangeEvent(entityhuman, this.value).getAmount()); // CraftBukkit - this.value -> event.getAmount() + } + + this.die(); +@@ -173,6 +192,24 @@ } public static int getOrbValue(int i) { |