net.minecraft.block

## Class BlockComparator

- java.lang.Object
- - net.minecraft.block.Block
  - - net.minecraft.block.BlockDirectional
    - - net.minecraft.block.BlockRedstoneLogic
      - - net.minecraft.block.BlockComparator

- All Implemented Interfaces:
    ITileEntityProvider

      public class BlockComparator
      extends BlockRedstoneLogic
      implements ITileEntityProvider

- - ### Field Summary

    - ### Fields inherited from class net.minecraft.block.Block

      `anvil, beacon, bed, bedrock, blockClay, blockDiamond, blockEmerald, blockGold, blockHardness, blockID, blockIron, blockLapis, blockMaterial, blockNetherQuartz, blockParticleGravity, blockRedstone, blockResistance, blocksList, blockSnow, bookShelf, brewingStand, brick, cactus, cake, canBlockGrass, carpet, carrot, cauldron, chest, chestTrapped, cloth, coalBlock, cobblestone, cobblestoneMossy, cobblestoneWall, cocoaPlant, commandBlock, crops, daylightSensor, deadBush, dirt, dispenser, doorIron, doorWood, dragonEgg, dropper, enchantmentTable, enderChest, endPortal, endPortalFrame, fence, fenceGate, fenceIron, fire, flowerPot, furnaceBurning, furnaceIdle, glass, glowStone, grass, gravel, hardenedClay, hay, hopperBlock, ice, jukebox, ladder, lavaMoving, lavaStill, leaves, lever, lightOpacity, lightValue, lockedChest, melon, melonStem, mobSpawner, mushroomBrown, mushroomCapBrown, mushroomCapRed, mushroomRed, music, mycelium, netherBrick, netherFence, netherrack, netherStalk, obsidian, opaqueCubeLookup, oreCoal, oreDiamond, oreEmerald, oreGold, oreIron, oreLapis, oreNetherQuartz, oreRedstone, oreRedstoneGlowing, pistonBase, pistonExtension, pistonMoving, pistonStickyBase, planks, plantRed, plantYellow, portal, potato, pressurePlateGold, pressurePlateIron, pressurePlatePlanks, pressurePlateStone, pumpkin, pumpkinLantern, pumpkinStem, rail, railActivator, railDetector, railPowered, redstoneComparatorActive, redstoneComparatorIdle, redstoneLampActive, redstoneLampIdle, redstoneRepeaterActive, redstoneRepeaterIdle, redstoneWire, reed, sand, sandStone, sapling, signPost, signWall, silverfish, skull, slipperiness, slowSand, snow, soundAnvilFootstep, soundClothFootstep, soundGlassFootstep, soundGrassFootstep, soundGravelFootstep, soundLadderFootstep, soundMetalFootstep, soundPowderFootstep, soundSandFootstep, soundSnowFootstep, soundStoneFootstep, soundWoodFootstep, sponge, stainedClay, stairsBrick, stairsCobblestone, stairsNetherBrick, stairsNetherQuartz, stairsSandStone, stairsStoneBrick, stairsWoodBirch, stairsWoodJungle, stairsWoodOak, stairsWoodSpruce, stepSound, stone, stoneBrick, stoneButton, stoneDoubleSlab, stoneSingleSlab, tallGrass, thinGlass, tilledField, tnt, torchRedstoneActive, torchRedstoneIdle, torchWood, trapdoor, tripWire, tripWireSource, useNeighborBrightness, vine, waterlily, waterMoving, waterStill, web, whiteStone, wood, woodDoubleSlab, woodenButton, woodSingleSlab, workbench`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BlockComparator(int par1, boolean par2)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)` Called on server worlds only when the block has been replaced by a different block ID, or the same block with a different metadata value, but before the new metadata value is set.
    `TileEntity` | `createNewTileEntity(World par1World)` Returns a new instance of a block's tile entity class.
    `boolean` | `func_94490_c(int par1)`
    `Icon` | `getIcon(int par1, int par2)`
    `int` | `getRenderType()` The type of render function that is called for this block
    `TileEntityComparator` | `getTileEntityComparator(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)` Returns the blockTileEntity at given coordinates.
    `int` | `idDropped(int par1, Random par2Random, int par3)` Returns the ID of the items to drop on destruction.
    `int` | `idPicked(World par1World, int par2, int par3, int par4)`
    `boolean` | `onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)` Called upon block activation (right click on the block.)
    `void` | `onBlockAdded(World par1World, int par2, int par3, int par4)` Called whenever the block is added into the world.
    `boolean` | `onBlockEventReceived(World par1World, int par2, int par3, int par4, int par5, int par6)` Called when the block receives a BlockEvent - see World.addBlockEvent.
    `void` | `onNeighborTileChange(World world, int x, int y, int z, int tileX, int tileY, int tileZ)` Called when a tile entity on a side of this block changes is created or is destroyed.
    `void` | `updateTick(World par1World, int par2, int par3, int par4, Random par5Random)` Ticks the block if it's been scheduled
    `boolean` | `weakTileChanges()`

    - ### Methods inherited from class net.minecraft.block.BlockRedstoneLogic

      `canBlockStay, canPlaceBlockAt, canProvidePower, func_83011_d, func_94476_e, func_94487_f, isAssociatedBlockID, isOpaqueCube, isProvidingStrongPower, isProvidingWeakPower, isRedstoneRepeaterBlockID, onBlockDestroyedByPlayer, onBlockPlacedBy, onNeighborBlockChange, renderAsNormalBlock, shouldSideBeRendered`

    - ### Methods inherited from class net.minecraft.block.BlockDirectional

      `getDirection`

    - ### Methods inherited from class net.minecraft.block.Block

      `addBlockDestroyEffects, addBlockHitEffects, addCollisionBoxesToList, addCreativeItems, beginLeavesDecay, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDragonDestroy, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockOnSide, canPlaceBlockOnSide, canPlaceTorchOnTop, canRenderInPass, canSilkHarvest, canSustainLeaves, canSustainPlant, collisionRayTrace, colorMultiplier, createTileEntity, damageDropped, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_82506_l, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockBrightness, getBlockColor, getBlockDropped, getBlockHardness, getBlocksMovement, getBlockTexture, getBlockTextureFromSide, getCollisionBoundingBoxFromPool, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getFilledPercentage, getFireSpreadSpeed, getFlammability, getItemIconName, getLightOpacity, getLightValue, getLocalizedName, getMixedBrightnessForBlock, getMobilityFlag, getPickBlock, getPlayerRelativeBlockHardness, getRenderBlockPass, getRenderColor, getSelectedBoundingBoxFromPool, getSubBlocks, getTickRandomly, getUnlocalizedName, getValidRotations, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAirBlock, isAssociatedBlockID, isBeaconBase, isBed, isBedFoot, isBlockBurning, isBlockFoliage, isBlockNormalCube, isBlockReplaceable, isBlockSolid, isBlockSolidOnSide, isCollidable, isFertile, isFireSource, isFlammable, isFlowerPot, isGenMineableReplaceable, isLadder, isLeaves, isNormalCube, isWood, onBlockClicked, onBlockDestroyedByExplosion, onBlockExploded, onBlockHarvested, onBlockPlaced, onBlockPreDestroy, onEntityCollidedWithBlock, onEntityWalking, onFallenUpon, onPlantGrow, onPostBlockPlaced, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, recolourBlock, registerIcons, removeBlockByPlayer, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockUnbreakable, setBurnProperties, setCreativeTab, setHardness, setLightOpacity, setLightValue, setResistance, setStepSound, setTextureName, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, tickRate, velocityToAddToEntity`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BlockComparator

          public BlockComparator(int par1,
                         boolean par2)

  - ### Method Detail

    - #### idDropped

          public int idDropped(int par1,
                      Random par2Random,
                      int par3)

      Returns the ID of the items to drop on destruction.
      Overrides:
        `idDropped` in class `Block`

    - #### idPicked

          public int idPicked(World par1World,
                     int par2,
                     int par3,
                     int par4)

      Overrides:
        `idPicked` in class `Block`

    - #### getRenderType

          public int getRenderType()

      The type of render function that is called for this block
      Overrides:
        `getRenderType` in class `BlockRedstoneLogic`

    - #### getIcon

          public Icon getIcon(int par1,
                     int par2)

      Overrides:
        `getIcon` in class `BlockRedstoneLogic`

    - #### func_94490_c

          public boolean func_94490_c(int par1)

    - #### getTileEntityComparator

          public TileEntityComparator getTileEntityComparator(IBlockAccess par1IBlockAccess,
                                                     int par2,
                                                     int par3,
                                                     int par4)

      Returns the blockTileEntity at given coordinates.

    - #### onBlockActivated

          public boolean onBlockActivated(World par1World,
                                 int par2,
                                 int par3,
                                 int par4,
                                 EntityPlayer par5EntityPlayer,
                                 int par6,
                                 float par7,
                                 float par8,
                                 float par9)

      Called upon block activation (right click on the block.)
      Overrides:
        `onBlockActivated` in class `Block`

    - #### updateTick

          public void updateTick(World par1World,
                        int par2,
                        int par3,
                        int par4,
                        Random par5Random)

      Ticks the block if it's been scheduled
      Overrides:
        `updateTick` in class `BlockRedstoneLogic`

    - #### onBlockAdded

          public void onBlockAdded(World par1World,
                          int par2,
                          int par3,
                          int par4)

      Called whenever the block is added into the world. Args: world, x, y, z
      Overrides:
        `onBlockAdded` in class `BlockRedstoneLogic`

    - #### breakBlock

          public void breakBlock(World par1World,
                        int par2,
                        int par3,
                        int par4,
                        int par5,
                        int par6)

      Called on server worlds only when the block has been replaced by a different block ID, or the same block with a different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old metadata
      Overrides:
        `breakBlock` in class `Block`

    - #### onBlockEventReceived

          public boolean onBlockEventReceived(World par1World,
                                     int par2,
                                     int par3,
                                     int par4,
                                     int par5,
                                     int par6)

      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
      Overrides:
        `onBlockEventReceived` in class `Block`

    - #### createNewTileEntity

          public TileEntity createNewTileEntity(World par1World)

      Returns a new instance of a block's tile entity class. Called on placing the block.
      Specified by:
        `createNewTileEntity` in interface `ITileEntityProvider`

    - #### onNeighborTileChange

          public void onNeighborTileChange(World world,
                                  int x,
                                  int y,
                                  int z,
                                  int tileX,
                                  int tileY,
                                  int tileZ)

      Description copied from class: `Block`
      Called when a tile entity on a side of this block changes is created or is destroyed.
      Overrides:
        `onNeighborTileChange` in class `Block`
      Parameters:
        `world` - The world
        `x` - The x position of this block instance
        `y` - The y position of this block instance
        `z` - The z position of this block instance
        `tileX` - The x position of the tile that changed
        `tileY` - The y position of the tile that changed
        `tileZ` - The z position of the tile that changed

    - #### weakTileChanges

          public boolean weakTileChanges()

      Overrides:
        `weakTileChanges` in class `Block`
      Returns:
        true if this block is to be notified of TileEntity changes directly through one solid block like comparators