Transformers\Energy storages will use vanilla rotation. Closes #1692
This commit is contained in:
parent
74d1837167
commit
b713b43eaf
2 changed files with 0 additions and 36 deletions
|
@ -136,24 +136,6 @@ public abstract class BlockEnergyStorage extends BaseTileBlock {
|
|||
}
|
||||
|
||||
// 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
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand,
|
||||
EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
|
|
|
@ -178,24 +178,6 @@ public abstract class BlockTransformer extends BaseTileBlock {
|
|||
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
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
int facingInt = getSideFromEnum(state.getValue(FACING));
|
||||
|
|
Loading…
Reference in a new issue