Guest User

two functions

a guest
Jan 31st, 2017
6
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2. public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos)
  3. {
  4.     TileEntityBlockholeWall tile = (TileEntityBlockholeWall) (world instanceof ChunkCache ? ((ChunkCache)world).getTileEntity(pos,  
  5.                                    Chunk.EnumCreateEntityType.CHECK) : world.getTileEntity(pos));
  6.        
  7.     return state.withProperty(INDEX, tile.getIndex());
  8. }
  9.    
  10. @Override
  11. public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
  12. {
  13.     ((TileEntityBlockholeWall)world.getTileEntity(pos)).setIndex(0);
  14. }
RAW Paste Data