public class ComparatorBlock extends RedstoneDiodeBlock implements ITileEntityProvider
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey
Modifier and Type | Field and Description |
---|---|
static EnumProperty<ComparatorMode> |
MODE |
POWERED, SHAPE
HORIZONTAL_FACING
BLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomly
delegate
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, onReplaced
mirror, rotate
addInformation, 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, updatePostPlacement
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDestroyEffects, 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, shouldCheckWeakPower
public static final EnumProperty<ComparatorMode> MODE
public ComparatorBlock(Block.Properties properties)
protected int getDelay(BlockState p_196346_1_)
getDelay
in class RedstoneDiodeBlock
protected int getActiveSignal(IBlockReader worldIn, BlockPos pos, BlockState state)
getActiveSignal
in class RedstoneDiodeBlock
protected boolean shouldBePowered(World worldIn, BlockPos pos, BlockState state)
shouldBePowered
in class RedstoneDiodeBlock
protected int calculateInputStrength(World worldIn, BlockPos pos, BlockState state)
calculateInputStrength
in class RedstoneDiodeBlock
public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit)
onBlockActivated
in class Block
protected void updateState(World worldIn, BlockPos pos, BlockState state)
updateState
in class RedstoneDiodeBlock
public void tick(BlockState state, World worldIn, BlockPos pos, java.util.Random random)
tick
in class RedstoneDiodeBlock
public boolean eventReceived(BlockState state, World worldIn, BlockPos pos, int id, int param)
eventReceived
in class Block
public TileEntity createNewTileEntity(IBlockReader worldIn)
createNewTileEntity
in interface ITileEntityProvider
protected void fillStateContainer(StateContainer.Builder<Block,BlockState> builder)
fillStateContainer
in class Block
public boolean getWeakChanges(BlockState state, IWorldReader world, BlockPos pos)
IForgeBlock
getWeakChanges
in interface IForgeBlock
world
- The current worldpos
- Block position in worldpublic void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor)
IForgeBlock
onNeighborChange
in interface IForgeBlock
world
- The worldpos
- Block position in worldneighbor
- Block position of neighbor