Transformers\Energy storages will use vanilla rotation. Closes #1692

This commit is contained in:
drcrazy 2019-04-03 18:23:28 +03:00
parent 74d1837167
commit b713b43eaf
2 changed files with 0 additions and 36 deletions

View file

@ -136,24 +136,6 @@ public abstract class BlockEnergyStorage extends BaseTileBlock {
} }
// Block // Block
@Override
public boolean rotateBlock(World world, BlockPos pos, EnumFacing side) {
IBlockState state = world.getBlockState(pos);
Block block = state.getBlock();
if (block instanceof BlockEnergyStorage) {
EnumFacing facing = state.getValue(BlockEnergyStorage.FACING);
if (facing.getOpposite() == side) {
facing = side;
} else {
facing = side.getOpposite();
}
world.setBlockState(pos, state.withProperty(BlockEnergyStorage.FACING, facing));
return true;
}
return false;
}
@Override @Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand,
EnumFacing side, float hitX, float hitY, float hitZ) { EnumFacing side, float hitX, float hitY, float hitZ) {

View file

@ -178,24 +178,6 @@ public abstract class BlockTransformer extends BaseTileBlock {
return super.onBlockActivated(worldIn, pos, state, playerIn, hand, side, hitX, hitY, hitZ); return super.onBlockActivated(worldIn, pos, state, playerIn, hand, side, hitX, hitY, hitZ);
} }
@Override
public boolean rotateBlock(World world, BlockPos pos, EnumFacing side) {
IBlockState state = world.getBlockState(pos);
Block block = state.getBlock();
if (block instanceof BlockTransformer) {
EnumFacing facing = state.getValue(BlockTransformer.FACING);
if (facing.getOpposite() == side) {
facing = side;
} else {
facing = side.getOpposite();
}
world.setBlockState(pos, state.withProperty(BlockTransformer.FACING, facing));
return true;
}
return false;
}
@Override @Override
public int getMetaFromState(IBlockState state) { public int getMetaFromState(IBlockState state) {
int facingInt = getSideFromEnum(state.getValue(FACING)); int facingInt = getSideFromEnum(state.getValue(FACING));