summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemFishingRod.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-03-01 08:32:46 +1100
committermd_5 <git@md-5.net>2016-03-01 09:32:45 +1100
commitaa008dff0f9bedbe88e1fe79831776b0a52eb90a (patch)
treecb520e0f4cc5d683fb9b7fb95de37480a7443dfb /nms-patches/ItemFishingRod.patch
parente1ebe524a78e27f6a2829ed4574fded3779094e1 (diff)
downloadcraftbukkit-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/ItemFishingRod.patch')
-rw-r--r--nms-patches/ItemFishingRod.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/nms-patches/ItemFishingRod.patch b/nms-patches/ItemFishingRod.patch
index 90910268..06921408 100644
--- a/nms-patches/ItemFishingRod.patch
+++ b/nms-patches/ItemFishingRod.patch
@@ -8,9 +8,9 @@
public class ItemFishingRod extends Item {
public ItemFishingRod() {
-@@ -15,9 +17,18 @@
+@@ -17,9 +19,18 @@
itemstack.damage(i, entityhuman);
- entityhuman.bw();
+ entityhuman.a(enumhand);
} else {
+ // CraftBukkit start
+ EntityFishingHook hook = new EntityFishingHook(world, entityhuman);
@@ -18,13 +18,13 @@
+ world.getServer().getPluginManager().callEvent(playerFishEvent);
+
+ if (playerFishEvent.isCancelled()) {
-+ return itemstack;
++ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack);
+ }
+ // CraftBukkit end
- world.makeSound(entityhuman, "random.bow", 0.5F, 0.4F / (ItemFishingRod.g.nextFloat() * 0.4F + 0.8F));
+ world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.H, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.i.nextFloat() * 0.4F + 0.8F));
if (!world.isClientSide) {
- world.addEntity(new EntityFishingHook(world, entityhuman));
+ world.addEntity(hook); // CraftBukkit - moved creation up
}
- entityhuman.bw();
+ entityhuman.a(enumhand);