public class DetectorRailBlock extends AbstractRailBlock
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
static BooleanProperty |
POWERED |
static EnumProperty<RailShape> |
SHAPE |
ASCENDING_SHAPE, STRAIGHT_SHAPELOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
DetectorRailBlock(AbstractBlock.Settings settings) |
canMakeCurves, canPlaceAt, getOutlineShape, getPistonBehavior, getPlacementState, isRail, isRail, neighborUpdate, onStateReplaced, updateBlockState, updateBlockState, updateCurvesaddStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, 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, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getVisualShape, hasBlockEntity, hasSidedTransparency, isSideInvisible, onBlockBreakStart, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, prepare, randomTickpublic static final EnumProperty<RailShape> SHAPE
public static final BooleanProperty POWERED
public DetectorRailBlock(AbstractBlock.Settings settings)
public boolean emitsRedstonePower(BlockState state)
emitsRedstonePower in class AbstractBlockpublic void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity)
onEntityCollision in class AbstractBlockpublic void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick in class AbstractBlockpublic int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getWeakRedstonePower in class AbstractBlockpublic int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getStrongRedstonePower in class AbstractBlockprivate void updatePoweredStatus(World world, BlockPos pos, BlockState state)
protected void updateNearbyRails(World world, BlockPos pos, BlockState state, boolean unpowering)
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded in class AbstractRailBlockpublic Property<RailShape> getShapeProperty()
getShapeProperty in class AbstractRailBlockpublic boolean hasComparatorOutput(BlockState state)
hasComparatorOutput in class AbstractBlockpublic int getComparatorOutput(BlockState state, World world, BlockPos pos)
getComparatorOutput in class AbstractBlockprotected <T extends AbstractMinecartEntity> List<T> getCarts(World world, BlockPos pos, Class<T> entityClass, @Nullable Predicate<Entity> entityPredicate)
public BlockState rotate(BlockState state, BlockRotation rotation)
By default, this returns the provided block state.
rotate in class AbstractBlockpublic BlockState mirror(BlockState state, BlockMirror mirror)
mirror in class AbstractBlockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Block