public class ComparatorBlock extends RedstoneDiodeBlock implements ITileEntityProvider
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey| Modifier and Type | Field and Description |
|---|---|
static EnumProperty<ComparatorMode> |
MODE |
POWERED, SHAPEHORIZONTAL_FACINGBLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomlydelegate| Constructor and Description |
|---|
ComparatorBlock(Block.Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
calculateInputStrength(World worldIn,
BlockPos pos,
BlockState state) |
TileEntity |
createNewTileEntity(IBlockReader worldIn) |
boolean |
eventReceived(BlockState state,
World worldIn,
BlockPos pos,
int id,
int param) |
protected void |
fillStateContainer(StateContainer.Builder<Block,BlockState> builder) |
protected int |
getActiveSignal(IBlockReader worldIn,
BlockPos pos,
BlockState state) |
protected int |
getDelay(BlockState p_196346_1_) |
boolean |
getWeakChanges(BlockState state,
IWorldReader world,
BlockPos pos)
If this block should be notified of weak changes.
|
boolean |
onBlockActivated(BlockState state,
World worldIn,
BlockPos pos,
PlayerEntity player,
Hand handIn,
BlockRayTraceResult hit) |
void |
onNeighborChange(BlockState state,
IWorldReader 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,
BlockState state) |
void |
tick(BlockState state,
World worldIn,
BlockPos pos,
java.util.Random random) |
protected void |
updateState(World worldIn,
BlockPos pos,
BlockState state) |
canProvidePower, getPowerOnSide, getPowerOnSides, getRenderLayer, getShape, getStateForPlacement, getStrongPower, getWeakPower, isAlternateInput, isDiode, isFacingTowardsRepeater, isLocked, isSolid, isValidPosition, neighborChanged, notifyNeighbors, onBlockAdded, onBlockPlacedBy, onReplacedmirror, rotateaddInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, cannotAttach, canSpawnInBlock, canSustainPlant, causesSuffocation, doesSideFillSquare, dropXpOnBlockBreak, fillItemGroup, fillWithRain, func_220055_a, func_220064_c, func_220074_n, func_220080_a, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getContainer, getDefaultState, getDrops, getDrops, getDrops, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getLightValue, getLootTable, getMaterial, getMaterialColor, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPackedLightmapCoords, getPlayerRelativeBlockHardness, getPositionRandom, getPushReaction, getRaytraceShape, getRenderShape, getRenderType, getSlipperiness, getSlipperiness, getSoundType, getStateById, getStateContainer, getStateId, getTags, getTranslationKey, getValidBlockForPosition, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasSolidSide, hasTileEntity, isAir, isDirt, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isRock, isSideInvisible, isVariableOpacity, makeCuboidShape, needsPostProcessing, nudgeEntitiesWithNewState, onBlockClicked, onBlockHarvested, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onProjectileCollision, propagatesSkylightDown, randomTick, replaceBlock, setDefaultState, shouldSideBeRendered, spawnAdditionalDrops, spawnAsEntity, spawnDrops, spawnDrops, spawnDrops, spawnDrops, tickRate, ticksRandomly, toString, updateDiagonalNeighbors, updateNeighbors, updatePostPlacementgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canRenderInLayer, catchFire, collisionExtendsVertically, createTileEntity, doesSideBlockRendering, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRayTraceResult, getSoundType, getStateAtViewpoint, getStateForPlacement, getValidRotations, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isPortalFrame, isReplaceableOreGen, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPowerpublic static final EnumProperty<ComparatorMode> MODE
public ComparatorBlock(Block.Properties properties)
protected int getDelay(BlockState p_196346_1_)
getDelay in class RedstoneDiodeBlockprotected int getActiveSignal(IBlockReader worldIn, BlockPos pos, BlockState state)
getActiveSignal in class RedstoneDiodeBlockprotected boolean shouldBePowered(World worldIn, BlockPos pos, BlockState state)
shouldBePowered in class RedstoneDiodeBlockprotected int calculateInputStrength(World worldIn, BlockPos pos, BlockState state)
calculateInputStrength in class RedstoneDiodeBlockpublic boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit)
onBlockActivated in class Blockprotected void updateState(World worldIn, BlockPos pos, BlockState state)
updateState in class RedstoneDiodeBlockpublic void tick(BlockState state, World worldIn, BlockPos pos, java.util.Random random)
tick in class RedstoneDiodeBlockpublic boolean eventReceived(BlockState state, World worldIn, BlockPos pos, int id, int param)
eventReceived in class Blockpublic TileEntity createNewTileEntity(IBlockReader worldIn)
createNewTileEntity in interface ITileEntityProviderprotected void fillStateContainer(StateContainer.Builder<Block,BlockState> builder)
fillStateContainer in class Blockpublic boolean getWeakChanges(BlockState state, IWorldReader world, BlockPos pos)
IForgeBlockgetWeakChanges in interface IForgeBlockworld - The current worldpos - Block position in worldpublic void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor)
IForgeBlockonNeighborChange in interface IForgeBlockworld - The worldpos - Block position in worldneighbor - Block position of neighbor