public class StairsBlock extends Block implements Waterloggable
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
private Block |
baseBlock |
private BlockState |
baseBlockState |
protected static VoxelShape |
BOTTOM_NORTH_EAST_CORNER_SHAPE |
protected static VoxelShape |
BOTTOM_NORTH_WEST_CORNER_SHAPE |
protected static VoxelShape |
BOTTOM_SHAPE |
protected static VoxelShape[] |
BOTTOM_SHAPES |
protected static VoxelShape |
BOTTOM_SOUTH_EAST_CORNER_SHAPE |
protected static VoxelShape |
BOTTOM_SOUTH_WEST_CORNER_SHAPE |
static DirectionProperty |
FACING |
static EnumProperty<BlockHalf> |
HALF |
static EnumProperty<StairShape> |
SHAPE |
private static int[] |
SHAPE_INDICES |
protected static VoxelShape |
TOP_NORTH_EAST_CORNER_SHAPE |
protected static VoxelShape |
TOP_NORTH_WEST_CORNER_SHAPE |
protected static VoxelShape |
TOP_SHAPE |
protected static VoxelShape[] |
TOP_SHAPES |
protected static VoxelShape |
TOP_SOUTH_EAST_CORNER_SHAPE |
protected static VoxelShape |
TOP_SOUTH_WEST_CORNER_SHAPE |
static BooleanProperty |
WATERLOGGED |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Modifier | Constructor and Description |
|---|---|
protected |
StairsBlock(BlockState baseBlockState,
AbstractBlock.Settings settings) |
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onEntityLand, onLandedUpon, onPlaced, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, isSideInvisible, neighborUpdate, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, prepareclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanFillWithFluid, tryDrainFluid, tryFillWithFluidpublic static final DirectionProperty FACING
public static final EnumProperty<BlockHalf> HALF
public static final EnumProperty<StairShape> SHAPE
public static final BooleanProperty WATERLOGGED
protected static final VoxelShape TOP_SHAPE
protected static final VoxelShape BOTTOM_SHAPE
protected static final VoxelShape BOTTOM_NORTH_WEST_CORNER_SHAPE
protected static final VoxelShape BOTTOM_SOUTH_WEST_CORNER_SHAPE
protected static final VoxelShape TOP_NORTH_WEST_CORNER_SHAPE
protected static final VoxelShape TOP_SOUTH_WEST_CORNER_SHAPE
protected static final VoxelShape BOTTOM_NORTH_EAST_CORNER_SHAPE
protected static final VoxelShape BOTTOM_SOUTH_EAST_CORNER_SHAPE
protected static final VoxelShape TOP_NORTH_EAST_CORNER_SHAPE
protected static final VoxelShape TOP_SOUTH_EAST_CORNER_SHAPE
protected static final VoxelShape[] TOP_SHAPES
protected static final VoxelShape[] BOTTOM_SHAPES
private static final int[] SHAPE_INDICES
private final Block baseBlock
private final BlockState baseBlockState
protected StairsBlock(BlockState baseBlockState, AbstractBlock.Settings settings)
private static VoxelShape[] composeShapes(VoxelShape base, VoxelShape northWest, VoxelShape northEast, VoxelShape southWest, VoxelShape southEast)
private static VoxelShape composeShape(int i, VoxelShape base, VoxelShape northWest, VoxelShape northEast, VoxelShape southWest, VoxelShape southEast)
public boolean hasSidedTransparency(BlockState state)
hasSidedTransparency in class AbstractBlockpublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape in class AbstractBlockprivate int getShapeIndexIndex(BlockState state)
@Environment(value=CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
randomDisplayTick in class Blockpublic void onBlockBreakStart(BlockState state, World world, BlockPos pos, PlayerEntity player)
onBlockBreakStart in class AbstractBlockpublic void onBroken(WorldAccess world, BlockPos pos, BlockState state)
public float getBlastResistance()
getBlastResistance in class Blockpublic void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded 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 void onSteppedOn(World world, BlockPos pos, Entity entity)
onSteppedOn in class Blockpublic boolean hasRandomTicks(BlockState state)
hasRandomTicks in class Blockpublic void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
randomTick in class AbstractBlockpublic void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick in class AbstractBlockpublic ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)
This method is called on both the logical client and logical server, so take caution when overriding this method.
The logical side can be checked using world.isClient().
If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
onUse in class AbstractBlockpublic void onDestroyedByExplosion(World world, BlockPos pos, Explosion explosion)
onDestroyedByExplosion in class Blockpublic BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState in class Blockpublic BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate in class AbstractBlockprivate static StairShape getStairShape(BlockState state, BlockView world, BlockPos pos)
private static boolean method_10678(BlockState state, BlockView world, BlockPos pos, Direction dir)
public static boolean isStairs(BlockState state)
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 Blockpublic FluidState getFluidState(BlockState state)
getFluidState in class AbstractBlockpublic boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough in class AbstractBlock