Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public IBlockState getStateFromMeta(int meta)
- {
- final int facing = (int) (meta / 10.0D);
- final int variant = (int) (meta / 10.0D - facing);
- final EnumType type = EnumType.byMetadata(variant);
- final EnumFacing enumFacing = EnumFacing.getHorizontal(facing);
- return this.getDefaultState().withProperty(VARIANT, type).withProperty(FACING, enumFacing);
- }
- @Override
- public int getMetaFromState(@NotNull final IBlockState state)
- {
- return state.getValue(VARIANT).getMetadata() + (state.getValue(FACING).getHorizontalIndex() * 10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement