From 889a5eca6e2f9aef1a381f4a93a6b2a8717645c6 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Mon, 13 Apr 2015 11:25:13 +0100 Subject: SPIGOT-782: Don't drop exp if a plugin sets it to zero --- nms-patches/EntityFishingHook.patch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'nms-patches/EntityFishingHook.patch') diff --git a/nms-patches/EntityFishingHook.patch b/nms-patches/EntityFishingHook.patch index 99516880..b923ace6 100644 --- a/nms-patches/EntityFishingHook.patch +++ b/nms-patches/EntityFishingHook.patch @@ -1,5 +1,5 @@ ---- /home/matt/mc-dev-private//net/minecraft/server/EntityFishingHook.java 2015-02-26 22:40:22.543608140 +0000 -+++ src/main/java/net/minecraft/server/EntityFishingHook.java 2015-02-26 22:40:22.543608140 +0000 +--- /home/matt/mc-dev-private//net/minecraft/server/EntityFishingHook.java 2015-04-13 11:24:54.120016726 +0100 ++++ src/main/java/net/minecraft/server/EntityFishingHook.java 2015-04-13 11:24:54.120016726 +0100 @@ -3,6 +3,12 @@ import java.util.Arrays; import java.util.List; @@ -53,13 +53,15 @@ double d5 = this.owner.locX - this.locX; double d6 = this.owner.locY - this.locY; double d7 = this.owner.locZ - this.locZ; -@@ -403,14 +428,33 @@ +@@ -403,14 +428,35 @@ entityitem.motY = d6 * d9 + (double) MathHelper.sqrt(d8) * 0.08D; entityitem.motZ = d7 * d9; this.world.addEntity(entityitem); - this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, this.random.nextInt(6) + 1)); -+ // CraftBukkit - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop() ++ // CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop() ++ if (playerFishEvent.getExpToDrop() > 0) { + this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop())); ++ } // CraftBukkit end b0 = 1; } -- cgit v1.2.3