Class StairsBlock
- All Implemented Interfaces:
FluidDrainable,FluidFillable,Waterloggable,ItemConvertible,ToggleableFeature
- Direct Known Subclasses:
OxidizableStairsBlock
- Mappings:
Namespace Name named net/minecraft/block/StairsBlockintermediary net/minecraft/class_2510official ede
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Blockprotected final BlockStatestatic final com.mojang.serialization.MapCodec<StairsBlock> static final EnumProperty<Direction> static final EnumProperty<BlockHalf> private static final Map<Direction, VoxelShape> private static final VoxelShapeprivate static final Map<Direction, VoxelShape> private static final Map<Direction, VoxelShape> private static final VoxelShapeprivate static final Map<Direction, VoxelShape> static final EnumProperty<StairShape> private static final Map<Direction, VoxelShape> private static final VoxelShapeprivate static final Map<Direction, VoxelShape> static final BooleanPropertyFields inherited from class net.minecraft.block.Block
field_31023, field_31024, field_31025, FORCE_STATE, FORCE_STATE_AND_SKIP_CALLBACKS_AND_DROPS, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_BLOCK_ADDED_CALLBACK, SKIP_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_DROPS, SKIP_REDRAW_AND_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_REDSTONE_WIRE_STATE_REPLACEMENT, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, translationKey, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStairsBlock(BlockState baseBlockState, AbstractBlock.Settings settings) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.protected booleancanPathfindThrough(BlockState state, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.floatcom.mojang.serialization.MapCodec<? extends StairsBlock> getCodec()protected FluidStategetFluidState(BlockState state) Returns the state's associated fluid state.protected VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) private static StairShapegetStairShape(BlockState state, BlockView world, BlockPos pos) protected BlockStategetStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) Returns the state of the block after a neighboring block's state change.protected booleanhasSidedTransparency(BlockState state) Returns whether the block's transparency depends on the side of the block, like slabs.private static booleanisDifferentOrientation(BlockState state, BlockView world, BlockPos pos, Direction dir) static booleanisStairs(BlockState state) protected BlockStatemirror(BlockState state, BlockMirror mirror) Returnsstatemirrored bymirror.protected BlockStaterotate(BlockState state, BlockRotation rotation) Returnsstaterotated byrotation.Methods inherited from class net.minecraft.block.Block
afterBreak, asBlock, asItem, canMobSpawnInside, cannotConnect, createColumnShape, createColumnShape, createCubeShape, createCuboidShape, createCuboidShape, createCuboidZShape, createCuboidZShape, createCuboidZShape, createShapeArray, createShapeFunction, createShapeFunction, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, generateBlockInteractLoot, generateLoot, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getRawIdFromState, getRegistryEntry, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getHardness, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStrongRedstonePower, getTranslationKey, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, isShapeFullCube, isSideInvisible, isTransparent, keepBlockEntityWhenReplacedWith, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, onUseWithItem, prepare, randomTick, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabledMethods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getBucketFillSound, tryDrainFluid, tryFillWithFluid
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/block/StairsBlock;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_46460Lnet/minecraft/class_2510;field_46460:Lcom/mojang/serialization/MapCodec;official aLede;a:Lcom/mojang/serialization/MapCodec;
-
FACING
- Mappings:
Namespace Name Mixin selector named FACINGLnet/minecraft/block/StairsBlock;FACING:Lnet/minecraft/state/property/EnumProperty;intermediary field_11571Lnet/minecraft/class_2510;field_11571:Lnet/minecraft/class_2754;official bLede;b:Lekk;
-
HALF
- Mappings:
Namespace Name Mixin selector named HALFLnet/minecraft/block/StairsBlock;HALF:Lnet/minecraft/state/property/EnumProperty;intermediary field_11572Lnet/minecraft/class_2510;field_11572:Lnet/minecraft/class_2754;official cLede;c:Lekk;
-
SHAPE
- Mappings:
Namespace Name Mixin selector named SHAPELnet/minecraft/block/StairsBlock;SHAPE:Lnet/minecraft/state/property/EnumProperty;intermediary field_11565Lnet/minecraft/class_2510;field_11565:Lnet/minecraft/class_2754;official dLede;d:Lekk;
-
WATERLOGGED
- Mappings:
Namespace Name Mixin selector named WATERLOGGEDLnet/minecraft/block/StairsBlock;WATERLOGGED:Lnet/minecraft/state/property/BooleanProperty;intermediary field_11573Lnet/minecraft/class_2510;field_11573:Lnet/minecraft/class_2746;official eLede;e:Lekd;
-
OUTER_SHAPE
- Mappings:
Namespace Name Mixin selector named OUTER_SHAPELnet/minecraft/block/StairsBlock;OUTER_SHAPE:Lnet/minecraft/util/shape/VoxelShape;intermediary field_55801Lnet/minecraft/class_2510;field_55801:Lnet/minecraft/class_265;official gLede;g:Lfpc;
-
STRAIGHT_SHAPE
- Mappings:
Namespace Name Mixin selector named STRAIGHT_SHAPELnet/minecraft/block/StairsBlock;STRAIGHT_SHAPE:Lnet/minecraft/util/shape/VoxelShape;intermediary field_55802Lnet/minecraft/class_2510;field_55802:Lnet/minecraft/class_265;official hLede;h:Lfpc;
-
INNER_SHAPE
- Mappings:
Namespace Name Mixin selector named INNER_SHAPELnet/minecraft/block/StairsBlock;INNER_SHAPE:Lnet/minecraft/util/shape/VoxelShape;intermediary field_55803Lnet/minecraft/class_2510;field_55803:Lnet/minecraft/class_265;official iLede;i:Lfpc;
-
OUTER_BOTTOM_SHAPES
- Mappings:
Namespace Name Mixin selector named OUTER_BOTTOM_SHAPESLnet/minecraft/block/StairsBlock;OUTER_BOTTOM_SHAPES:Ljava/util/Map;intermediary field_55795Lnet/minecraft/class_2510;field_55795:Ljava/util/Map;official DLede;D:Ljava/util/Map;
-
STRAIGHT_BOTTOM_SHAPES
- Mappings:
Namespace Name Mixin selector named STRAIGHT_BOTTOM_SHAPESLnet/minecraft/block/StairsBlock;STRAIGHT_BOTTOM_SHAPES:Ljava/util/Map;intermediary field_55796Lnet/minecraft/class_2510;field_55796:Ljava/util/Map;official RLede;R:Ljava/util/Map;
-
INNER_BOTTOM_SHAPES
- Mappings:
Namespace Name Mixin selector named INNER_BOTTOM_SHAPESLnet/minecraft/block/StairsBlock;INNER_BOTTOM_SHAPES:Ljava/util/Map;intermediary field_55797Lnet/minecraft/class_2510;field_55797:Ljava/util/Map;official SLede;S:Ljava/util/Map;
-
OUTER_TOP_SHAPES
- Mappings:
Namespace Name Mixin selector named OUTER_TOP_SHAPESLnet/minecraft/block/StairsBlock;OUTER_TOP_SHAPES:Ljava/util/Map;intermediary field_55798Lnet/minecraft/class_2510;field_55798:Ljava/util/Map;official TLede;T:Ljava/util/Map;
-
STRAIGHT_TOP_SHAPES
- Mappings:
Namespace Name Mixin selector named STRAIGHT_TOP_SHAPESLnet/minecraft/block/StairsBlock;STRAIGHT_TOP_SHAPES:Ljava/util/Map;intermediary field_55799Lnet/minecraft/class_2510;field_55799:Ljava/util/Map;official ULede;U:Ljava/util/Map;
-
INNER_TOP_SHAPES
- Mappings:
Namespace Name Mixin selector named INNER_TOP_SHAPESLnet/minecraft/block/StairsBlock;INNER_TOP_SHAPES:Ljava/util/Map;intermediary field_55800Lnet/minecraft/class_2510;field_55800:Ljava/util/Map;official VLede;V:Ljava/util/Map;
-
baseBlock
- Mappings:
Namespace Name Mixin selector named baseBlockLnet/minecraft/block/StairsBlock;baseBlock:Lnet/minecraft/block/Block;intermediary field_11579Lnet/minecraft/class_2510;field_11579:Lnet/minecraft/class_2248;official WLede;W:Lduv;
-
baseBlockState
- Mappings:
Namespace Name Mixin selector named baseBlockStateLnet/minecraft/block/StairsBlock;baseBlockState:Lnet/minecraft/block/BlockState;intermediary field_11574Lnet/minecraft/class_2510;field_11574:Lnet/minecraft/class_2680;official fLede;f:Lejm;
-
-
Constructor Details
-
StairsBlock
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/StairsBlock;<init>(Lnet/minecraft/block/BlockState;Lnet/minecraft/block/AbstractBlock$Settings;)Vintermediary <init>Lnet/minecraft/class_2510;<init>(Lnet/minecraft/class_2680;Lnet/minecraft/class_4970$class_2251;)Vofficial <init>Lede;<init>(Lejm;Lejl$d;)V
-
-
Method Details
-
getCodec
- Overrides:
getCodecin classBlock- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_53969Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;official aLejl;a()Lcom/mojang/serialization/MapCodec;
-
hasSidedTransparency
Returns whether the block's transparency depends on the side of the block, like slabs.- Overrides:
hasSidedTransparencyin classAbstractBlock- Returns:
- whether the block's transparency depends on the side of the block, like slabs
- See Also:
- Mappings:
Namespace Name Mixin selector named hasSidedTransparencyLnet/minecraft/block/AbstractBlock;hasSidedTransparency(Lnet/minecraft/block/BlockState;)Zintermediary method_9526Lnet/minecraft/class_4970;method_9526(Lnet/minecraft/class_2680;)Zofficial g_Lejl;g_(Lejm;)Z
-
getOutlineShape
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named getOutlineShapeLnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;intermediary method_9530Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;official aLejl;a(Lejm;Ldqu;Lja;Lfom;)Lfpc;
-
getBlastResistance
public float getBlastResistance()- Overrides:
getBlastResistancein classBlock- Mappings:
Namespace Name Mixin selector named getBlastResistanceLnet/minecraft/block/Block;getBlastResistance()Fintermediary method_9520Lnet/minecraft/class_2248;method_9520()Fofficial eLduv;e()F
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;official aLduv;a(Ldlk;)Lejm;
-
getStateForNeighborUpdate
protected BlockState getStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) Returns the state of the block after a neighboring block's state change.Returning
Blocks.AIRbreaks the block. This is useful to implement supporting block requirement for blocks (if used along withAbstractBlock.canPlaceAt(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.util.math.BlockPos)).Side effects like activating a redstone component (but not scheduling a tick) should be performed in
AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.world.block.WireOrientation, boolean)instead. If the block supports waterlogging and currently has water, this method should be overridden to tick the fluid at the block's position.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. This is not called ifBlock.FORCE_STATEflag is set in thesetBlockStatecall.This method can be used for multiple purposes. Here are some examples:
FenceBlockuses it to update the fence's connection when a horizontally neighboring block's state is changed.PlantBlockuses it to break the plant if the state change causes it to lose its supporting block.DoorBlockuses it to copy the state of the other half of the door.SlabBlockuses it to schedule the fluid to tick if waterlogged.SoulSandBlockuses it to schedule the water block above to tick so that it becomes a bubble column.FallingBlockuses it to schedule the block to tick so that it can fall if needed.
- Overrides:
getStateForNeighborUpdatein classAbstractBlock- Parameters:
state- the state of this blockworld- the worldpos- the position of this blockdirection- the direction from this block to the neighborneighborPos- the position of the neighbor blockneighborState- the state of the updated neighbor block- Returns:
- the state of the block after a neighboring block's state change
- See Also:
- Mappings:
Namespace Name Mixin selector named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/world/tick/ScheduledTickView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/block/BlockState;intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_10225;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_5819;)Lnet/minecraft/class_2680;official aLejl;a(Lejm;Ldrt;Ldsf;Lja;Ljg;Lja;Lejm;Lbfq;)Lejm;
-
getStairShape
- Mappings:
Namespace Name Mixin selector named getStairShapeLnet/minecraft/block/StairsBlock;getStairShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/enums/StairShape;intermediary method_10675Lnet/minecraft/class_2510;method_10675(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2778;official eLede;e(Lejm;Ldqu;Lja;)Lekw;
-
isDifferentOrientation
private static boolean isDifferentOrientation(BlockState state, BlockView world, BlockPos pos, Direction dir) - Mappings:
Namespace Name Mixin selector named isDifferentOrientationLnet/minecraft/block/StairsBlock;isDifferentOrientation(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Zintermediary method_10678Lnet/minecraft/class_2510;method_10678(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Zofficial cLede;c(Lejm;Ldqu;Lja;Ljg;)Z
-
isStairs
- Mappings:
Namespace Name Mixin selector named isStairsLnet/minecraft/block/StairsBlock;isStairs(Lnet/minecraft/block/BlockState;)Zintermediary method_10676Lnet/minecraft/class_2510;method_10676(Lnet/minecraft/class_2680;)Zofficial pLede;p(Lejm;)Z
-
rotate
Returnsstaterotated byrotation.By default, this returns the provided block state.
- Overrides:
rotatein classAbstractBlock- Returns:
staterotated byrotation- See Also:
- Mappings:
Namespace Name Mixin selector named rotateLnet/minecraft/block/AbstractBlock;rotate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockRotation;)Lnet/minecraft/block/BlockState;intermediary method_9598Lnet/minecraft/class_4970;method_9598(Lnet/minecraft/class_2680;Lnet/minecraft/class_2470;)Lnet/minecraft/class_2680;official aLejl;a(Lejm;Lebr;)Lejm;
-
mirror
Returnsstatemirrored bymirror.By default, this returns the provided block state.
- Overrides:
mirrorin classAbstractBlock- Returns:
statemirrored bymirror- See Also:
- Mappings:
Namespace Name Mixin selector named mirrorLnet/minecraft/block/AbstractBlock;mirror(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/BlockMirror;)Lnet/minecraft/block/BlockState;intermediary method_9569Lnet/minecraft/class_4970;method_9569(Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;official aLejl;a(Lejm;Leaa;)Lejm;
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector named appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vofficial aLduv;a(Lejn$a;)V
-
getFluidState
Returns the state's associated fluid state.Waterloggable blocks must override this to return
Fluids.WATER.getStill(false)when waterlogged.- Overrides:
getFluidStatein classAbstractBlock- Returns:
- the state's associated fluid state
- See Also:
- Mappings:
Namespace Name Mixin selector named getFluidStateLnet/minecraft/block/AbstractBlock;getFluidState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/FluidState;intermediary method_9545Lnet/minecraft/class_4970;method_9545(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;official b_Lejl;b_(Lejm;)Lfga;
-