Advertisement
Guest User

two functions

a guest
Jan 31st, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement