public static int getEntityFacingCardinal(EntityLivingBase living) { int quadrant = cofh.core.util.helpers.MathHelper.floor(living.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; switch (quadrant) { case 0: return 2; case 1: return 5; case 2: return 3; default: return 4; } }
case DOWN: case UP: int facing = MathHelper.floor(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if (facing % 2 == 0) { harvestPos = new BlockPos(x, y, z - 1);
this.motionZ *= 0.699999988079071D; BlockPos posFloor = new BlockPos(MathHelper.floor(posX), MathHelper.floor(posY), MathHelper.floor(posZ)); BlockPos posCeli = new BlockPos(MathHelper.ceil(posX), MathHelper.ceil(posY), MathHelper.ceil(posZ)); if (this.particleGravity > 0) { double d0 = MathHelper.floor(this.posY) + 1 - BlockLiquid.getLiquidHeightPercent(state.getBlock().getMetaFromState(state)); if (this.posY < d0) { this.setExpired();
case DOWN: case UP: int facing = MathHelper.floor(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; if (facing % 2 == 0) { adjPos = new BlockPos(x, y, z - 1);