public class DetectorRailBlock extends AbstractRailBlock
Block.NeighborGroup
AbstractBlock.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_SHAPE
LOGGER, STATE_IDS, stateManager
collidable, 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, updateCurves
addStacksForDisplay, 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, toString
calcBlockBreakingDelta, 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, randomTick
public static final EnumProperty<RailShape> SHAPE
public static final BooleanProperty POWERED
public DetectorRailBlock(AbstractBlock.Settings settings)
public boolean emitsRedstonePower(BlockState state)
emitsRedstonePower
in class AbstractBlock
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity)
onEntityCollision
in class AbstractBlock
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick
in class AbstractBlock
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getWeakRedstonePower
in class AbstractBlock
public int getStrongRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getStrongRedstonePower
in class AbstractBlock
private 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 AbstractRailBlock
public Property<RailShape> getShapeProperty()
getShapeProperty
in class AbstractRailBlock
public boolean hasComparatorOutput(BlockState state)
hasComparatorOutput
in class AbstractBlock
public int getComparatorOutput(BlockState state, World world, BlockPos pos)
getComparatorOutput
in class AbstractBlock
protected <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 AbstractBlock
public BlockState mirror(BlockState state, BlockMirror mirror)
mirror
in class AbstractBlock
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block