Package net.minecraft.block
Class StairsBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.StairsBlock
- All Implemented Interfaces:
FluidDrainable,FluidFillable,Waterloggable,ItemConvertible
- Direct Known Subclasses:
CopperStairsBlock
public class StairsBlock extends Block implements Waterloggable
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
Fields Modifier and Type Field Description private BlockbaseBlockprivate BlockStatebaseBlockStateprotected static VoxelShapeBOTTOM_NORTH_EAST_CORNER_SHAPEprotected static VoxelShapeBOTTOM_NORTH_WEST_CORNER_SHAPEprotected static VoxelShapeBOTTOM_SHAPEprotected static VoxelShape[]BOTTOM_SHAPESprotected static VoxelShapeBOTTOM_SOUTH_EAST_CORNER_SHAPEprotected static VoxelShapeBOTTOM_SOUTH_WEST_CORNER_SHAPEstatic DirectionPropertyFACINGstatic EnumProperty<BlockHalf>HALFstatic EnumProperty<StairShape>SHAPEprivate static int[]SHAPE_INDICESprotected static VoxelShapeTOP_NORTH_EAST_CORNER_SHAPEprotected static VoxelShapeTOP_NORTH_WEST_CORNER_SHAPEprotected static VoxelShapeTOP_SHAPEprotected static VoxelShape[]TOP_SHAPESprotected static VoxelShapeTOP_SOUTH_EAST_CORNER_SHAPEprotected static VoxelShapeTOP_SOUTH_WEST_CORNER_SHAPEstatic BooleanPropertyWATERLOGGEDFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors Modifier Constructor Description protectedStairsBlock(BlockState baseBlockState, AbstractBlock.Settings settings) -
Method Summary
Methods inherited from class net.minecraft.block.Block
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, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onEntityLand, onLandedUpon, onPlaced, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasComparatorOutput, isSideInvisible, neighborUpdate, onEntityCollision, onProjectileHit, onStacksDropped, onSyncedBlockEvent, prepareMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getDrainSound, tryDrainFluid, tryFillWithFluid
-
Field Details
-
FACING
-
HALF
-
SHAPE
-
WATERLOGGED
-
TOP_SHAPE
-
BOTTOM_SHAPE
-
BOTTOM_NORTH_WEST_CORNER_SHAPE
-
BOTTOM_SOUTH_WEST_CORNER_SHAPE
-
TOP_NORTH_WEST_CORNER_SHAPE
-
TOP_SOUTH_WEST_CORNER_SHAPE
-
BOTTOM_NORTH_EAST_CORNER_SHAPE
-
BOTTOM_SOUTH_EAST_CORNER_SHAPE
-
TOP_NORTH_EAST_CORNER_SHAPE
-
TOP_SOUTH_EAST_CORNER_SHAPE
-
TOP_SHAPES
-
BOTTOM_SHAPES
-
SHAPE_INDICES
private static final int[] SHAPE_INDICES -
baseBlock
-
baseBlockState
-
-
Constructor Details
-
StairsBlock
-
-
Method Details
-
composeShapes
private static VoxelShape[] composeShapes(VoxelShape base, VoxelShape northWest, VoxelShape northEast, VoxelShape southWest, VoxelShape southEast) -
composeShape
private static VoxelShape composeShape(int i, VoxelShape base, VoxelShape northWest, VoxelShape northEast, VoxelShape southWest, VoxelShape southEast) -
hasSidedTransparency
- Overrides:
hasSidedTransparencyin classAbstractBlock
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShapein classAbstractBlock
-
getShapeIndexIndex
-
randomDisplayTick
@Environment(CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)- Overrides:
randomDisplayTickin classBlock
-
onBlockBreakStart
- Overrides:
onBlockBreakStartin classAbstractBlock
-
onBroken
-
getBlastResistance
public float getBlastResistance()- Overrides:
getBlastResistancein classBlock
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAddedin classAbstractBlock
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)ifnewStateis different fromstate. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplacedin classAbstractBlock
-
onSteppedOn
Called when an entity steps on this block.- Overrides:
onSteppedOnin classBlock
-
hasRandomTicks
- Overrides:
hasRandomTicksin classBlock
-
randomTick
- Overrides:
randomTickin classAbstractBlock
-
scheduledTick
- Overrides:
scheduledTickin classAbstractBlock
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)Called when this block is used by a player. This, by default, is bound to using the right mouse button.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.
- Overrides:
onUsein classAbstractBlock- Returns:
- an action result that specifies if using the block was successful.
-
onDestroyedByExplosion
Called when this block is destroyed by an explosion.- Overrides:
onDestroyedByExplosionin classBlock
-
getPlacementState
- Overrides:
getPlacementStatein classBlock
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdatein classAbstractBlock
-
getStairShape
-
method_10678
private static boolean method_10678(BlockState state, BlockView world, BlockPos pos, Direction dir) -
isStairs
-
rotate
Applies a block rotation to a block state.By default, this returns the provided block state.
- Overrides:
rotatein classAbstractBlock- Returns:
- the rotated block state
-
mirror
- Overrides:
mirrorin classAbstractBlock
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
getFluidState
- Overrides:
getFluidStatein classAbstractBlock
-