-
Bug
-
Resolution: Fixed
-
Minecraft 1.9, Minecraft 16w15b, Minecraft 16w43a
-
Unconfirmed
The bug
The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.
The public void onUpdate() method of the net.minecraft.entity.projectile.EntityFishHook class is supposed to kill the fishing hook after being for 1200 ticks inside a block. The problem is that the value for the inTile field is never set. This is also the reason why the hook is bouncing on land.
/** * Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); if (this.fishPosRotationIncrements > 0) { //... } else { //... if (this.inGround) { // The problem is that inTile is never set if (this.worldObj.getBlockState(new BlockPos(this.xTile, this.yTile, this.zTile)).getBlock() == this.inTile) { ++this.ticksInGround; if (this.ticksInGround == 1200) { this.setDead(); } return; } this.inGround = false; this.motionX *= (double)(this.rand.nextFloat() * 0.2F); this.motionY *= (double)(this.rand.nextFloat() * 0.2F); this.motionZ *= (double)(this.rand.nextFloat() * 0.2F); this.ticksInGround = 0; this.ticksInAir = 0; } else { ++this.ticksInAir; } //... } }