diff options
author | feildmaster <admin@feildmaster.com> | 2013-01-01 23:59:47 -0600 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2013-01-01 23:59:47 -0600 |
commit | baaf8e1d864da19e374211b4c2dd1aa49d564561 (patch) | |
tree | 398bf5844aa52265a2fec5894820f7d174f79328 /src/main/java/net/minecraft/server/EntityFishingHook.java | |
parent | fb0be1fc0acfa85a5b25786a6df5b494a936dbb2 (diff) | |
download | craftbukkit-baaf8e1d864da19e374211b4c2dd1aa49d564561.tar craftbukkit-baaf8e1d864da19e374211b4c2dd1aa49d564561.tar.gz craftbukkit-baaf8e1d864da19e374211b4c2dd1aa49d564561.tar.lz craftbukkit-baaf8e1d864da19e374211b4c2dd1aa49d564561.tar.xz craftbukkit-baaf8e1d864da19e374211b4c2dd1aa49d564561.zip |
Implement fishing experience. Adds BUKKIT-3348
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityFishingHook.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityFishingHook.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java index 36c46cfc..4e722876 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -333,6 +333,7 @@ public class EntityFishingHook extends Entity { EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.RAW_FISH)); // CraftBukkit start PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), entityitem.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_FISH); + playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1); this.world.getServer().getPluginManager().callEvent(playerFishEvent); if (playerFishEvent.isCancelled()) { @@ -353,7 +354,8 @@ public class EntityFishingHook extends Entity { entityitem.motZ = d7 * d9; this.world.addEntity(entityitem); this.owner.a(StatisticList.B, 1); - 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() + this.owner.world.addEntity(new EntityExperienceOrb(this.owner.world, this.owner.locX, this.owner.locY + 0.5D, this.owner.locZ + 0.5D, playerFishEvent.getExpToDrop())); b0 = 1; } |