Class DetectorRailBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseRailBlock
net.minecraft.world.level.block.DetectorRailBlock
- All Implemented Interfaces:
FeatureElement, BucketPickup, LiquidBlockContainer, SimpleWaterloggedBlock, ItemLike, IBaseRailBlockExtension, IBlockExtension, IBucketPickupExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class Block
Block.UpdateFlagsNested classes/interfaces inherited from class BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.PostProcess, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MapCodec<DetectorRailBlock> static final BooleanPropertyprivate static final intstatic final EnumProperty<RailShape> Fields inherited from class BaseRailBlock
WATERLOGGEDFields inherited from class Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckPressed(Level level, BlockPos pos, BlockState state) codec()protected voidprotected voidentityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean isPrecise) protected intgetAnalogOutputSignal(BlockState state, Level level, BlockPos pos, Direction direction) protected intgetDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction) private <T extends AbstractMinecart>
List<T> getInteractingMinecartOfType(Level level, BlockPos pos, Class<T> type, Predicate<Entity> containerEntitySelector) private AABBgetSearchBB(BlockPos pos) protected intgetSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction) protected booleanhasAnalogOutputSignal(BlockState state) protected booleanisSignalSource(BlockState state) protected BlockStatemirror(BlockState state, Mirror mirror) protected voidonPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) protected voidprotected BlockStaterotate(BlockState state, Rotation rotation) protected voidtick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) protected voidupdatePowerToConnected(Level level, BlockPos pos, BlockState state, boolean powered) Methods inherited from class BaseRailBlock
affectNeighborsAfterRemoval, canSurvive, getFluidState, getRailDirection, getShape, getStateForPlacement, isFlexibleRail, isRail, isRail, isStraight, mirror, neighborChanged, rotate, updateDir, updateShape, updateState, updateStateMethods inherited from class Block
animateTick, asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLightDampening, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSoundType, getVisualShape, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, onExplosionHit, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, shouldChangedStateKeepBlockEntity, simpleCodec, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItemMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FeatureElement
isEnabledMethods inherited from interface IBaseRailBlockExtension
canMakeSlopes, getRailMaxSpeed, isValidRailShape, onMinecartPassMethods inherited from interface IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, ignitedByLava, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHidingMethods inherited from interface IBucketPickupExtension
getPickupSoundMethods inherited from interface SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
CODEC
-
SHAPE
-
POWERED
-
PRESSED_CHECK_PERIOD
private static final int PRESSED_CHECK_PERIOD- See Also:
-
-
Constructor Details
-
DetectorRailBlock
-
-
Method Details
-
codec
- Specified by:
codecin classBaseRailBlock
-
registerDefaultState
protected void registerDefaultState() -
isSignalSource
- Overrides:
isSignalSourcein classBlockBehaviour
-
entityInside
protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean isPrecise) - Overrides:
entityInsidein classBlockBehaviour
-
tick
- Overrides:
tickin classBlockBehaviour
-
getSignal
- Overrides:
getSignalin classBlockBehaviour
-
getDirectSignal
protected int getDirectSignal(BlockState state, BlockGetter level, BlockPos pos, Direction direction) - Overrides:
getDirectSignalin classBlockBehaviour
-
checkPressed
-
updatePowerToConnected
-
onPlace
protected void onPlace(BlockState state, Level level, BlockPos pos, BlockState oldState, boolean movedByPiston) - Overrides:
onPlacein classBaseRailBlock
-
getShapeProperty
- Specified by:
getShapePropertyin classBaseRailBlock
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignalin classBlockBehaviour
-
getAnalogOutputSignal
protected int getAnalogOutputSignal(BlockState state, Level level, BlockPos pos, Direction direction) - Overrides:
getAnalogOutputSignalin classBlockBehaviour
-
getInteractingMinecartOfType
-
getSearchBB
-
rotate
- Overrides:
rotatein classBlockBehaviour
-
mirror
- Overrides:
mirrorin classBlockBehaviour
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-