public abstract class AbstractRailBlock extends Block
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowCurves |
protected static VoxelShape |
ASCENDING_SHAPE |
protected static VoxelShape |
STRAIGHT_SHAPE |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRailBlock(boolean allowCurves,
AbstractBlock.Settings settings) |
addStacksForDisplay, afterBreak, appendProperties, 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, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, prepare, randomTick, rotate, scheduledTickprotected static final VoxelShape STRAIGHT_SHAPE
protected static final VoxelShape ASCENDING_SHAPE
private final boolean allowCurves
protected AbstractRailBlock(boolean allowCurves,
AbstractBlock.Settings settings)
public static boolean isRail(BlockState state)
public boolean canMakeCurves()
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockpublic boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos)
canPlaceAt in class AbstractBlockpublic void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded in class AbstractBlockprotected BlockState updateCurves(BlockState state, World world, BlockPos pos, boolean notify)
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify)
neighborUpdate in class AbstractBlockprivate static boolean shouldDropRail(BlockPos pos, World world, RailShape shape)
This method will return true if:
protected void updateBlockState(BlockState state, World world, BlockPos pos, Block neighbor)
protected BlockState updateBlockState(World world, BlockPos pos, BlockState state, boolean forceUpdate)
public PistonBehavior getPistonBehavior(BlockState state)
getPistonBehavior in class AbstractBlockpublic void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)
WorldChunk.setBlockState(BlockPos, BlockState, boolean) if newState is different from state. Vanilla blocks perform removal cleanups here.onStateReplaced in class AbstractBlockpublic BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Block