public class ComparatorBlock extends AbstractRedstoneGateBlock implements BlockEntityProvider
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static EnumProperty<ComparatorMode> |
MODE |
POWERED, SHAPEFACINGLOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
ComparatorBlock(AbstractBlock.Settings settings) |
canPlaceAt, emitsRedstonePower, getInputLevel, getMaxInputLevelSides, getOutlineShape, getPlacementState, getStrongRedstonePower, getWeakRedstonePower, isLocked, isRedstoneGate, isTargetNotAligned, isValidInput, neighborUpdate, onBlockAdded, onBlockRemoved, onPlaced, updateTargetmirror, rotateaddStacksForDisplay, afterBreak, asBlock, asItem, buildTooltip, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isIn, isShapeFullCube, isSideSolidFullSquare, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replaceBlock, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRayTraceShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getVisualShape, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, prepare, randomTickpublic static final EnumProperty<ComparatorMode> MODE
public ComparatorBlock(AbstractBlock.Settings settings)
protected int getUpdateDelayInternal(BlockState state)
getUpdateDelayInternal in class AbstractRedstoneGateBlockprotected int getOutputLevel(BlockView world, BlockPos pos, BlockState state)
getOutputLevel in class AbstractRedstoneGateBlockprivate int calculateOutputSignal(World world, BlockPos pos, BlockState state)
protected boolean hasPower(World world, BlockPos pos, BlockState state)
hasPower in class AbstractRedstoneGateBlockprotected int getPower(World world, BlockPos pos, BlockState state)
getPower in class AbstractRedstoneGateBlock@Nullable private ItemFrameEntity getAttachedItemFrame(World world, Direction facing, BlockPos pos)
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
onUse in class AbstractBlockprotected void updatePowered(World world, BlockPos pos, BlockState state)
updatePowered in class AbstractRedstoneGateBlockprivate void update(World world, BlockPos pos, BlockState state)
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick in class AbstractRedstoneGateBlockpublic boolean onBlockAction(BlockState state, World world, BlockPos pos, int channel, int value)
onBlockAction in class AbstractBlockpublic BlockEntity createBlockEntity(BlockView world)
createBlockEntity in interface BlockEntityProviderprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Block