public class BlockRedstoneComparator extends BlockRedstoneDiode implements ITileEntityProvider
Modifier and Type | Class and Description |
---|---|
static class |
BlockRedstoneComparator.Mode |
Block.EnumOffsetType, Block.SoundType
Modifier and Type | Field and Description |
---|---|
static PropertyEnum<BlockRedstoneComparator.Mode> |
MODE |
static PropertyBool |
POWERED |
isRepeaterPowered
FACING
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, capturedDrops, captureDrops, delegate, enableStats, field_181083_K, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, RANDOM, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness
Constructor and Description |
---|
BlockRedstoneComparator(boolean powered) |
Modifier and Type | Method and Description |
---|---|
void |
breakBlock(World worldIn,
BlockPos pos,
IBlockState state) |
protected int |
calculateInputStrength(World worldIn,
BlockPos pos,
IBlockState state) |
protected BlockState |
createBlockState() |
TileEntity |
createNewTileEntity(World worldIn,
int meta)
Returns a new instance of a block's tile entity class.
|
protected int |
getActiveSignal(IBlockAccess worldIn,
BlockPos pos,
IBlockState state) |
protected int |
getDelay(IBlockState state) |
Item |
getItem(World worldIn,
BlockPos pos) |
Item |
getItemDropped(IBlockState state,
java.util.Random rand,
int fortune)
Get the Item that this Block should drop when harvested.
|
java.lang.String |
getLocalizedName()
Gets the localized name of this block.
|
int |
getMetaFromState(IBlockState state)
Convert the BlockState into the correct metadata value
|
protected IBlockState |
getPoweredState(IBlockState unpoweredState) |
IBlockState |
getStateFromMeta(int meta)
Convert the given metadata into a BlockState for this Block
|
protected IBlockState |
getUnpoweredState(IBlockState poweredState) |
boolean |
getWeakChanges(IBlockAccess world,
BlockPos pos)
If this block should be notified of weak changes.
|
protected boolean |
isPowered(IBlockState state) |
boolean |
onBlockActivated(World worldIn,
BlockPos pos,
IBlockState state,
EntityPlayer playerIn,
EnumFacing side,
float hitX,
float hitY,
float hitZ) |
void |
onBlockAdded(World worldIn,
BlockPos pos,
IBlockState state) |
boolean |
onBlockEventReceived(World worldIn,
BlockPos pos,
IBlockState state,
int eventID,
int eventParam)
Called on both Client and Server when World#addBlockEvent is called
|
IBlockState |
onBlockPlaced(World worldIn,
BlockPos pos,
EnumFacing facing,
float hitX,
float hitY,
float hitZ,
int meta,
EntityLivingBase placer)
Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the
IBlockstate
|
void |
onNeighborChange(IBlockAccess world,
BlockPos pos,
BlockPos neighbor)
Called when a tile entity on a side of this block changes is created or is destroyed.
|
protected boolean |
shouldBePowered(World worldIn,
BlockPos pos,
IBlockState state) |
protected void |
updateState(World worldIn,
BlockPos pos,
IBlockState state) |
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
canBlockStay, canPlaceBlockAt, canPowerSide, canProvidePower, getBlockLayer, getPowerOnSide, getPowerOnSides, getStrongPower, getTickDelay, getWeakPower, isAssociated, isAssociatedBlock, isFacingTowardsRepeater, isFullCube, isLocked, isOpaqueCube, isRedstoneRepeaterBlockID, notifyNeighbors, onBlockDestroyedByPlayer, onBlockPlacedBy, onNeighborBlockChange, randomTick, shouldSideBeRendered
addCollisionBoxesToList, addDestroyEffects, addHitEffects, addLandingEffects, beginLeavesDecay, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canRenderInLayer, canReplace, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, collisionRayTrace, colorMultiplier, colorMultiplier, createStackedBlock, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_181623_g, getActualState, getAmbientOcclusionLightValue, getBedDirection, getBedSpawnPosition, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getCollisionBoundingBox, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getMapColor, getMaterial, getMixedBrightnessForBlock, getMobilityFlag, getOffsetType, getPickBlock, getPickBlock, getPlayerRelativeBlockHardness, getRegistryName, getRenderColor, getRenderType, getSelectedBoundingBox, getStateById, getStateForEntityRender, getStateId, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, harvestBlock, hasComparatorInputOverride, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFlowerPot, isFoliage, isFullBlock, isLadder, isLeaves, isNormalCube, isNormalCube, isPassable, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isVisuallyOpaque, isWood, modifyAcceleration, onBlockClicked, onBlockDestroyedByExplosion, onBlockExploded, onBlockHarvested, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, rotateBlock, setBedOccupied, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setRegistryName, setRegistryName, setRegistryName, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, spawnAsEntity, tickRate, toString
public static final PropertyBool POWERED
public static final PropertyEnum<BlockRedstoneComparator.Mode> MODE
public java.lang.String getLocalizedName()
getLocalizedName
in class Block
public Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped
in class Block
protected int getDelay(IBlockState state)
getDelay
in class BlockRedstoneDiode
protected IBlockState getPoweredState(IBlockState unpoweredState)
getPoweredState
in class BlockRedstoneDiode
protected IBlockState getUnpoweredState(IBlockState poweredState)
getUnpoweredState
in class BlockRedstoneDiode
protected boolean isPowered(IBlockState state)
isPowered
in class BlockRedstoneDiode
protected int getActiveSignal(IBlockAccess worldIn, BlockPos pos, IBlockState state)
getActiveSignal
in class BlockRedstoneDiode
protected boolean shouldBePowered(World worldIn, BlockPos pos, IBlockState state)
shouldBePowered
in class BlockRedstoneDiode
protected int calculateInputStrength(World worldIn, BlockPos pos, IBlockState state)
calculateInputStrength
in class BlockRedstoneDiode
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
onBlockActivated
in class Block
protected void updateState(World worldIn, BlockPos pos, IBlockState state)
updateState
in class BlockRedstoneDiode
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick
in class BlockRedstoneDiode
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded
in class BlockRedstoneDiode
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock
in class Block
public boolean onBlockEventReceived(World worldIn, BlockPos pos, IBlockState state, int eventID, int eventParam)
onBlockEventReceived
in class Block
public TileEntity createNewTileEntity(World worldIn, int meta)
createNewTileEntity
in interface ITileEntityProvider
public IBlockState getStateFromMeta(int meta)
getStateFromMeta
in class Block
public int getMetaFromState(IBlockState state)
getMetaFromState
in class Block
protected BlockState createBlockState()
createBlockState
in class Block
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
onBlockPlaced
in class BlockRedstoneDiode
public void onNeighborChange(IBlockAccess world, BlockPos pos, BlockPos neighbor)
Block
onNeighborChange
in class Block
world
- The worldpos
- Block position in worldneighbor
- Block position of neighborpublic boolean getWeakChanges(IBlockAccess world, BlockPos pos)
Block
getWeakChanges
in class Block
world
- The current worldpos
- Block position in world