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 |
isRepeaterPoweredFACINGBLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, enableStats, field_181083_K, fullBlock, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, 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) |
private int |
calculateOutput(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.
|
private EntityItemFrame |
findItemFrame(World worldIn,
EnumFacing facing,
BlockPos pos) |
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) |
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
|
private void |
onStateChange(World worldIn,
BlockPos pos,
IBlockState state) |
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, shouldSideBeRenderedaddCollisionBoxesToList, canCollideCheck, canDropFromExplosion, canPlaceBlockOnSide, canReplace, canSilkHarvest, collisionRayTrace, colorMultiplier, colorMultiplier, createStackedBlock, damageDropped, disableStats, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_181623_g, getActualState, getAmbientOcclusionLightValue, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockState, getCollisionBoundingBox, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getEnableStats, getExplosionResistance, getIdFromBlock, getLightOpacity, getLightValue, getMapColor, getMaterial, getMixedBrightnessForBlock, getMobilityFlag, getOffsetType, getPlayerRelativeBlockHardness, getRenderColor, getRenderType, getSelectedBoundingBox, getStateById, getStateForEntityRender, getStateId, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, harvestBlock, hasComparatorInputOverride, hasTileEntity, isBlockNormalCube, isBlockSolid, isCollidable, isEqualTo, isFlowerPot, isFullBlock, isNormalCube, isPassable, isReplaceable, isTranslucent, isVisuallyOpaque, modifyAcceleration, onBlockClicked, onBlockDestroyedByExplosion, onBlockHarvested, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, registerBlocks, requiresUpdates, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setLightLevel, setLightOpacity, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, spawnAsEntity, tickRate, toStringpublic static final PropertyBool POWERED
public static final PropertyEnum<BlockRedstoneComparator.Mode> MODE
public java.lang.String getLocalizedName()
getLocalizedName in class Blockpublic Item getItemDropped(IBlockState state, java.util.Random rand, int fortune)
getItemDropped in class Blockprotected int getDelay(IBlockState state)
getDelay in class BlockRedstoneDiodeprotected IBlockState getPoweredState(IBlockState unpoweredState)
getPoweredState in class BlockRedstoneDiodeprotected IBlockState getUnpoweredState(IBlockState poweredState)
getUnpoweredState in class BlockRedstoneDiodeprotected boolean isPowered(IBlockState state)
isPowered in class BlockRedstoneDiodeprotected int getActiveSignal(IBlockAccess worldIn, BlockPos pos, IBlockState state)
getActiveSignal in class BlockRedstoneDiodeprivate int calculateOutput(World worldIn, BlockPos pos, IBlockState state)
protected boolean shouldBePowered(World worldIn, BlockPos pos, IBlockState state)
shouldBePowered in class BlockRedstoneDiodeprotected int calculateInputStrength(World worldIn, BlockPos pos, IBlockState state)
calculateInputStrength in class BlockRedstoneDiodeprivate EntityItemFrame findItemFrame(World worldIn, EnumFacing facing, BlockPos pos)
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ)
onBlockActivated in class Blockprotected void updateState(World worldIn, BlockPos pos, IBlockState state)
updateState in class BlockRedstoneDiodeprivate void onStateChange(World worldIn, BlockPos pos, IBlockState state)
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick in class BlockRedstoneDiodepublic void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
onBlockAdded in class BlockRedstoneDiodepublic void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock in class Blockpublic boolean onBlockEventReceived(World worldIn, BlockPos pos, IBlockState state, int eventID, int eventParam)
onBlockEventReceived in class Blockpublic TileEntity createNewTileEntity(World worldIn, int meta)
createNewTileEntity in interface ITileEntityProviderpublic IBlockState getStateFromMeta(int meta)
getStateFromMeta in class Blockpublic int getMetaFromState(IBlockState state)
getMetaFromState in class Blockprotected BlockState createBlockState()
createBlockState in class Blockpublic IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
onBlockPlaced in class BlockRedstoneDiode