@@ -22,21 +22,20 @@
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||
@@ -30,7 +36,7 @@
|
||||
@Override
|
||||
@@ -36,12 +42,23 @@
|
||||
entityhuman.a(enumhand);
|
||||
world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_FISHING_BOBBER_RETRIEVE, SoundCategory.NEUTRAL, 1.0F, 0.4F / (ItemFishingRod.i.nextFloat() * 0.4F + 0.8F));
|
||||
} else {
|
||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.i.nextFloat() * 0.4F + 0.8F));
|
||||
+ // world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.i.nextFloat() * 0.4F + 0.8F));
|
||||
if (!world.isClientSide) {
|
||||
EntityFishingHook entityfishinghook = new EntityFishingHook(world, entityhuman);
|
||||
int j = EnchantmentManager.c(itemstack);
|
||||
@@ -45,6 +51,17 @@
|
||||
entityfishinghook.b(k);
|
||||
}
|
||||
i = EnchantmentManager.c(itemstack);
|
||||
int j = EnchantmentManager.b(itemstack);
|
||||
|
||||
- world.addEntity(new EntityFishingHook(entityhuman, world, j, i));
|
||||
+ // CraftBukkit start
|
||||
+ EntityFishingHook entityfishinghook = new EntityFishingHook(entityhuman, world, j, i);
|
||||
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.FishHook) entityfishinghook.getBukkitEntity(), PlayerFishEvent.State.FISHING);
|
||||
+ world.getServer().getPluginManager().callEvent(playerFishEvent);
|
||||
+
|
||||
@@ -45,8 +44,8 @@
|
||||
+ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack);
|
||||
+ }
|
||||
+ world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemFishingRod.i.nextFloat() * 0.4F + 0.8F));
|
||||
+ world.addEntity(entityfishinghook);
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
world.addEntity(entityfishinghook);
|
||||
}
|
||||
|
||||
entityhuman.a(enumhand);
|
||||
|
||||
Reference in New Issue
Block a user