mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
SPIGOT-782: Don't drop exp if a plugin sets it to zero
This commit is contained in:
parent
35d953bac8
commit
889a5eca6e
1 changed files with 6 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue