Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public IBlockState getStateFromMeta(int meta)
- {
- boolean blockIsActive = (meta & 7) > 2;
- EnumFacing facing = EnumFacing.getFront(meta);
- if(facing.getAxis() == EnumFacing.Axis.Y)
- facing = EnumFacing.NORTH;
- return this.getDefaultState().withProperty(FACING, facing).withProperty(BURNING, blockIsActive);
- }
- @Override
- public int getMetaFromState(IBlockState state)
- {
- int blockIsActive = (state.getValue(BURNING) ? 1 : 0) << 1;
- int facingDirection = ((EnumFacing)state.getValue(FACING)).getIndex();
- return blockIsActive | facingDirection;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement