This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving) { int rotation = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 2.5D) & 3; world.setBlockMetadata(i, j, k, rotation - 0); }
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving, ItemStack par6ItemStack) { int l = MathHelper.floor_double((double)(par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3; par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2); }
does anyone have any idea on how to set "rotation - 0" in 1.5?
if it matters this code is in the 'Block---' file.