Advertisement
Guest User

:)

a guest
Jan 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1.    @Override
  2.     public IBlockState getStateFromMeta(int meta) {
  3.         EnumFacing enumfacing = EnumFacing.getFront(meta&7);
  4.         if (enumfacing.getAxis() == EnumFacing.Axis.Y) enumfacing = EnumFacing.NORTH;
  5.         return this.getDefaultState().withProperty(FACING, enumfacing).withProperty(ENABLED, (meta & 8) != 0);
  6.     }
  7.  
  8.     @Override
  9.     public int getMetaFromState(IBlockState state) {
  10.         return state.getValue(FACING).getIndex() + (state.getValue(ENABLED) ? 8 : 0);
  11.     }
  12.  
  13.     @Override
  14.     protected BlockStateContainer createBlockState() {
  15.         return new BlockStateContainer(this, FACING, ENABLED);
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement