diff options
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) { |