Guest User

BlockBlockholeWall

a guest
Jan 31st, 2017
10
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public static final PropertyInteger INDEX = PropertyInteger.create("index", 0, 195);
  2.    
  3.     public BlockBlockholeWall(BlockData blockdata)
  4.     {
  5.         super(blockdata);
  6.         this.setBlockUnbreakable();
  7.         this.setResistance(4096F);
  8.         this.setLightLevel(1.0F);
  9.         this.setDefaultState(this.blockState.getBaseState().withProperty(INDEX, 0));
  10.     }
  11.    
  12.     @Override
  13.     protected BlockStateContainer createBlockState()
  14.     {
  15.         return new BlockStateContainer(this, new IProperty[]{INDEX});
  16.     }
  17.  
  18.    
  19.     @Override
  20.     public TileEntity createNewTileEntity(World world, int meta)
  21.     {
  22.         return new TileEntityBlockholeWall();
  23.     }
  24.    
  25.    
  26.     @Override
  27.     public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
  28.     {
  29.         TileEntityBlockholeWall tile = (TileEntityBlockholeWall) (world instanceof ChunkCache ? ((ChunkCache)world).getTileEntity(pos,  
  30.                                         Chunk.EnumCreateEntityType.CHECK) : world.getTileEntity(pos));
  31.        
  32.         return state.withProperty(INDEX, tile.getIndex());
  33.     }
RAW Paste Data