Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static final PropertyInteger INDEX = PropertyInteger.create("index", 0, 195);
- public BlockBlockholeWall(BlockData blockdata)
- {
- super(blockdata);
- this.setBlockUnbreakable();
- this.setResistance(4096F);
- this.setLightLevel(1.0F);
- this.setDefaultState(this.blockState.getBaseState().withProperty(INDEX, 0));
- }
- @Override
- protected BlockStateContainer createBlockState()
- {
- return new BlockStateContainer(this, new IProperty[]{INDEX});
- }
- @Override
- public TileEntity createNewTileEntity(World world, int meta)
- {
- return new TileEntityBlockholeWall();
- }
- @Override
- public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
- {
- TileEntityBlockholeWall tile = (TileEntityBlockholeWall) (world instanceof ChunkCache ? ((ChunkCache)world).getTileEntity(pos,
- Chunk.EnumCreateEntityType.CHECK) : world.getTileEntity(pos));
- return state.withProperty(INDEX, tile.getIndex());
- }
Advertisement
Add Comment
Please, Sign In to add comment