public class StairsBlock extends Block implements Waterloggable
Block.NeighborGroup
AbstractBlock.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, stateManager
collidable, 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, toString
calcBlockBreakingDelta, 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, prepare
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
canFillWithFluid, tryDrainFluid, tryFillWithFluid
public 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 AbstractBlock
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
private int getShapeIndexIndex(BlockState state)
@Environment(value=CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)
randomDisplayTick
in class Block
public void onBlockBreakStart(BlockState state, World world, BlockPos pos, PlayerEntity player)
onBlockBreakStart
in class AbstractBlock
public void onBroken(WorldAccess world, BlockPos pos, BlockState state)
public float getBlastResistance()
getBlastResistance
in class Block
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded
in class AbstractBlock
public 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 AbstractBlock
public void onSteppedOn(World world, BlockPos pos, Entity entity)
onSteppedOn
in class Block
public boolean hasRandomTicks(BlockState state)
hasRandomTicks
in class Block
public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
randomTick
in class AbstractBlock
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick
in class AbstractBlock
public 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 AbstractBlock
public void onDestroyedByExplosion(World world, BlockPos pos, Explosion explosion)
onDestroyedByExplosion
in class Block
public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState
in class Block
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate
in class AbstractBlock
private 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 AbstractBlock
public BlockState mirror(BlockState state, BlockMirror mirror)
mirror
in class AbstractBlock
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block
public FluidState getFluidState(BlockState state)
getFluidState
in class AbstractBlock
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)
canPathfindThrough
in class AbstractBlock