@@ -8,14 +8,19 @@
|
||||
public class ItemFishingRod extends Item {
|
||||
|
||||
public ItemFishingRod() {
|
||||
@@ -19,9 +21,18 @@
|
||||
@@ -19,7 +21,6 @@
|
||||
itemstack.damage(i, entityhuman);
|
||||
entityhuman.a(enumhand);
|
||||
} else {
|
||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F));
|
||||
if (!world.isClientSide) {
|
||||
+ // CraftBukkit start
|
||||
EntityFishingHook entityfishinghook = new EntityFishingHook(world, entityhuman);
|
||||
int j = EnchantmentManager.c(itemstack);
|
||||
@@ -34,6 +35,17 @@
|
||||
entityfishinghook.b(k);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.Fish) entityfishinghook.getBukkitEntity(), PlayerFishEvent.State.FISHING);
|
||||
+ world.getServer().getPluginManager().callEvent(playerFishEvent);
|
||||
+
|
||||
@@ -25,6 +30,7 @@
|
||||
+ }
|
||||
+ world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.I, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.j.nextFloat() * 0.4F + 0.8F));
|
||||
+ // CraftBukkit end
|
||||
|
||||
+
|
||||
world.addEntity(entityfishinghook);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user