@Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving entityliving) { super.onBlockPlacedBy(world, x, y, z, entityliving); // -- Current direction the player is facing while placing the block ( f variable if you press // F3 ) int f = MathHelper.floor_double(entityliving.rotationYaw * 4.0F / 360.0F + 0.5D) & 3; world.setBlockMetadataWithNotify(x, y, z, f); }
@Override public void updateBlockMetadata( World world, int x, int y, int z, int sidePlacedAgainst, float par6, float par7, float par8) { super.updateBlockMetadata(world, x, y, z, sidePlacedAgainst, par6, par7, par8); }