@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/item/ItemFishingRod.java
|
||||
+++ b/net/minecraft/world/item/ItemFishingRod.java
|
||||
@@ -12,6 +12,11 @@
|
||||
@@ -13,6 +13,11 @@
|
||||
import net.minecraft.world.level.World;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
|
||||
@@ -12,19 +12,20 @@
|
||||
public class ItemFishingRod extends Item {
|
||||
|
||||
public ItemFishingRod(Item.Info item_info) {
|
||||
@@ -32,12 +37,23 @@
|
||||
@@ -33,13 +38,24 @@
|
||||
world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_RETRIEVE, SoundCategory.NEUTRAL, 1.0F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
|
||||
entityhuman.gameEvent(GameEvent.ITEM_INTERACT_FINISH);
|
||||
} else {
|
||||
- world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
|
||||
+ // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
|
||||
if (!world.isClientSide) {
|
||||
i = EnchantmentManager.getFishingSpeedBonus(itemstack);
|
||||
int j = EnchantmentManager.getFishingLuckBonus(itemstack);
|
||||
if (world instanceof WorldServer) {
|
||||
WorldServer worldserver = (WorldServer) world;
|
||||
int j = (int) (EnchantmentManager.getFishingTimeReduction(worldserver, itemstack, entityhuman) * 20.0F);
|
||||
int k = EnchantmentManager.getFishingLuckBonus(worldserver, itemstack, entityhuman);
|
||||
|
||||
- world.addFreshEntity(new EntityFishingHook(entityhuman, world, j, i));
|
||||
- world.addFreshEntity(new EntityFishingHook(entityhuman, world, k, j));
|
||||
+ // CraftBukkit start
|
||||
+ EntityFishingHook entityfishinghook = new EntityFishingHook(entityhuman, world, j, i);
|
||||
+ EntityFishingHook entityfishinghook = new EntityFishingHook(entityhuman, world, k, j);
|
||||
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.FishHook) entityfishinghook.getBukkitEntity(), CraftEquipmentSlot.getHand(enumhand), PlayerFishEvent.State.FISHING);
|
||||
+ world.getCraftServer().getPluginManager().callEvent(playerFishEvent);
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user