@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user