Привет всем!Делал поворот блока,но ругается на
Класс блока:
Помогите пожалуйста
Код:
((BlockDryerTileEntity)world.getTileEntity(x, y, z)).func_145951_a(itemStack.getDisplayName());
Класс блока:
Код:
public class BlockObj extends Block implements ITileEntityProvider {
private final Random field_149933_a = new Random();
private static boolean field_149934_M;
private boolean isActive;
private IIcon iconFront;
private IIcon iconTop;
private IIcon iconDown;
public BlockObj() {
super(Material.circuits);
setCreativeTab(CreativeTabs.tabBlock);
setHardness(0.25F);
setStepSound(soundTypeMetal);
setBlockTextureName("iron_block");
setBlockName(ModBlockObj.MODID + ".block_obj");
}
@Override
public TileEntity createNewTileEntity(World world, int metadata) {
return new TileEntityObj();
}
public int getRenderType() {
return -1;
}
public boolean isOpaqueCube() {
return false;
}
public boolean renderAsNormalBlock() {
return false;
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
ForgeDirection dir = ForgeDirection.getOrientation(side);
ForgeDirection block_dir;
if (meta != 0)
block_dir = ForgeDirection.getOrientation(meta);
else
block_dir = ForgeDirection.SOUTH;
if (block_dir == dir) return iconFront;
return side == 1 ? this.iconTop : (side == 0 ? this.iconDown : (side != meta ? this.blockIcon : this.iconFront));
}
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase eLB, ItemStack itemStack)
{
int l = MathHelper.floor_double((double)(eLB.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
if (l == 0)
{
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
}
if (l == 1)
{
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
}
if (l == 2)
{
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
}
if (l == 3)
{
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
}
if (itemStack.hasDisplayName())
{
((BlockDryerTileEntity)world.getTileEntity(x, y, z)).func_145951_a(itemStack.getDisplayName());
}
}
}
Помогите пожалуйста