Esempio n. 1
0
 /**
  * Called when the block receives a BlockEvent - see World.addBlockEvent. By default, passes it on
  * to the tile entity at this location. Args: world, x, y, z, blockID, EventID, event parameter
  */
 @Override
 public boolean onBlockEventReceived(
     World par1World, int par2, int par3, int par4, int par5, int par6) {
   super.onBlockEventReceived(par1World, par2, par3, par4, par5, par6);
   TileEntity tileentity = par1World.getTileEntity(par2, par3, par4);
   return tileentity != null && tileentity.receiveClientEvent(par5, par6);
 }
Esempio n. 2
0
 /** Called whenever the block is added into the world. Args: world, x, y, z */
 @Override
 public void onBlockAdded(World par1World, int par2, int par3, int par4) {
   super.onBlockAdded(par1World, par2, par3, par4);
 }
Esempio n. 3
0
 /** ejects contained items into the world, and notifies neighbours of an update, as appropriate */
 @Override
 public void breakBlock(World world, int x, int y, int z, Block block, int par6) {
   this.dropEntireInventory(world, x, y, z, block, par6);
   super.breakBlock(world, x, y, z, block, par6);
 }
Esempio n. 4
0
 @Override
 public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
   ((TileEntityScreen) worldIn.getTileEntity(pos)).breakScreen(state);
   super.breakBlock(worldIn, pos, state);
 }