@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityFishingHook.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityFishingHook.java
|
||||
@@ -44,6 +44,12 @@
|
||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
@@ -45,6 +45,12 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.entity.Player;
|
||||
@@ -12,8 +12,8 @@
|
||||
+
|
||||
public class EntityFishingHook extends IProjectile {
|
||||
|
||||
private final Random syncronizedRandom;
|
||||
@@ -64,6 +70,12 @@
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -66,6 +72,12 @@
|
||||
private final int luck;
|
||||
private final int lureSpeed;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
private EntityFishingHook(EntityTypes<? extends EntityFishingHook> entitytypes, World world, int i, int j) {
|
||||
super(entitytypes, world);
|
||||
this.syncronizedRandom = new Random();
|
||||
@@ -258,7 +270,7 @@
|
||||
@@ -260,7 +272,7 @@
|
||||
private void checkCollision() {
|
||||
MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResult(this, this::canHitEntity);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -305,6 +317,10 @@
|
||||
@@ -307,6 +319,10 @@
|
||||
this.timeUntilLured = 0;
|
||||
this.timeUntilHooked = 0;
|
||||
this.getEntityData().set(EntityFishingHook.DATA_BITING, false);
|
||||
@@ -46,7 +46,7 @@
|
||||
}
|
||||
} else {
|
||||
float f;
|
||||
@@ -338,6 +354,13 @@
|
||||
@@ -340,6 +356,13 @@
|
||||
worldserver.sendParticles(Particles.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D);
|
||||
}
|
||||
} else {
|
||||
@@ -60,7 +60,7 @@
|
||||
this.playSound(SoundEffects.FISHING_BOBBER_SPLASH, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
double d3 = this.getY() + 0.5D;
|
||||
|
||||
@@ -374,8 +397,10 @@
|
||||
@@ -376,8 +399,10 @@
|
||||
this.timeUntilHooked = MathHelper.nextInt(this.random, 20, 80);
|
||||
}
|
||||
} else {
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,6 +467,14 @@
|
||||
@@ -444,6 +469,14 @@
|
||||
int i = 0;
|
||||
|
||||
if (this.hookedIn != null) {
|
||||
@@ -88,7 +88,7 @@
|
||||
this.pullEntity(this.hookedIn);
|
||||
CriterionTriggers.FISHING_ROD_HOOKED.trigger((EntityPlayer) entityhuman, itemstack, this, Collections.emptyList());
|
||||
this.level.broadcastEntityEvent(this, (byte) 31);
|
||||
@@ -457,6 +490,15 @@
|
||||
@@ -459,6 +492,15 @@
|
||||
while (iterator.hasNext()) {
|
||||
ItemStack itemstack1 = (ItemStack) iterator.next();
|
||||
EntityItem entityitem = new EntityItem(this.level, this.getX(), this.getY(), this.getZ(), itemstack1);
|
||||
@@ -104,7 +104,7 @@
|
||||
double d0 = entityhuman.getX() - this.getX();
|
||||
double d1 = entityhuman.getY() - this.getY();
|
||||
double d2 = entityhuman.getZ() - this.getZ();
|
||||
@@ -464,7 +506,11 @@
|
||||
@@ -466,7 +508,11 @@
|
||||
|
||||
entityitem.setDeltaMovement(d0 * 0.1D, d1 * 0.1D + Math.sqrt(Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2)) * 0.08D, d2 * 0.1D);
|
||||
this.level.addFreshEntity(entityitem);
|
||||
@@ -114,10 +114,10 @@
|
||||
+ entityhuman.level.addFreshEntity(new EntityExperienceOrb(entityhuman.level, entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop()));
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (itemstack1.is((Tag) TagsItem.FISHES)) {
|
||||
if (itemstack1.is(TagsItem.FISHES)) {
|
||||
entityhuman.awardStat(StatisticList.FISH_CAUGHT, 1);
|
||||
}
|
||||
@@ -474,8 +520,25 @@
|
||||
@@ -476,8 +522,25 @@
|
||||
}
|
||||
|
||||
if (this.onGround) {
|
||||
|
||||
Reference in New Issue
Block a user