/** * 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); }
@Override public boolean onBlockEventReceived( World worldIn, BlockPos pos, IBlockState state, int eventID, int eventParam) { super.onBlockEventReceived(worldIn, pos, state, eventID, eventParam); TileEntity tileentity = worldIn.getTileEntity(pos); return tileentity == null ? false : tileentity.receiveClientEvent(eventID, eventParam); }
/** * Called on both Client and Server when World#addBlockEvent is called. On the Server, this may * perform additional changes to the world, like pistons replacing the block with an extended * base. On the client, the update may involve replacing tile entities, playing sounds, or * performing other visual actions to reflect the server side changes. * * @param state The block state retrieved from the block position prior to this method being * invoked * @param pos The position of the block event. Can be used to retrieve tile entities. */ public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param) { super.eventReceived(state, worldIn, pos, id, param); TileEntity tileentity = worldIn.getTileEntity(pos); return tileentity == null ? false : tileentity.receiveClientEvent(id, param); }
public boolean onBlockEventReceived( World aWorld, int aX, int aY, int aZ, int aData1, int aData2) { super.onBlockEventReceived(aWorld, aX, aY, aZ, aData1, aData2); TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ); return tTileEntity != null ? tTileEntity.receiveClientEvent(aData1, aData2) : false; }
@Override public void receiveClientEvent(int par1, int par2) { super.receiveClientEvent(par1, par2); }
public boolean onBlockEventReceived(World world, int x, int y, int z, int par5, int par6) { super.onBlockEventReceived(world, x, y, z, par5, par6); TileEntity tile = world.getTileEntity(x, y, z); return tile != null && tile.receiveClientEvent(par5, par6); }
public boolean didReceiveBlockEvent( World world, BlockPos pos, IBlockState state, int eventID, int eventParam) { super.didReceiveBlockEvent(world, pos, state, eventID, eventParam); TileEntity tileEntity = world.getTileEntity(pos); return tileEntity != null && tileEntity.receiveClientEvent(eventID, eventParam); }
@Override public boolean onBlockEventReceived(World world, int x, int y, int z, int side, int meta) { super.onBlockEventReceived(world, x, y, z, side, meta); TileEntity tileentity = world.getTileEntity(x, y, z); return tileentity != null ? tileentity.receiveClientEvent(side, meta) : false; }
@Override public boolean onBlockEventReceived(World world, int x, int y, int z, int id, int data) { super.onBlockEventReceived(world, x, y, z, id, data); TileEntity tileentity = world.getTileEntity(x, y, z); return tileentity != null && tileentity.receiveClientEvent(id, data); }