Package net.minecraft.block
Class StairsBlock
- java.lang.Object
-
- net.minecraftforge.registries.ForgeRegistryEntry<Block>
-
- net.minecraft.block.AbstractBlock
-
- net.minecraft.block.Block
-
- net.minecraft.block.StairsBlock
-
- All Implemented Interfaces:
IBucketPickupHandler
,ILiquidContainer
,IWaterLoggable
,IItemProvider
,IForgeBlock
,IForgeRegistryEntry<Block>
public class StairsBlock extends Block implements IWaterLoggable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKey
-
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.Properties
-
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
-
Field Summary
Fields Modifier and Type Field Description private Block
base
private BlockState
baseState
protected static VoxelShape
BOTTOM_AABB
protected static VoxelShape[]
BOTTOM_SHAPES
static DirectionProperty
FACING
static EnumProperty<Half>
HALF
protected static VoxelShape
OCTET_NNN
protected static VoxelShape
OCTET_NNP
protected static VoxelShape
OCTET_NPN
protected static VoxelShape
OCTET_NPP
protected static VoxelShape
OCTET_PNN
protected static VoxelShape
OCTET_PNP
protected static VoxelShape
OCTET_PPN
protected static VoxelShape
OCTET_PPP
static EnumProperty<StairsShape>
SHAPE
private static int[]
SHAPE_BY_STATE
private java.util.function.Supplier<BlockState>
stateSupplier
protected static VoxelShape
TOP_AABB
protected static VoxelShape[]
TOP_SHAPES
static BooleanProperty
WATERLOGGED
-
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinition
-
Fields inherited from class net.minecraft.block.AbstractBlock
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
-
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
-
Constructor Summary
Constructors Constructor Description StairsBlock(java.util.function.Supplier<BlockState> state, AbstractBlock.Properties properties)
StairsBlock(BlockState p_i48321_1_, AbstractBlock.Properties p_i48321_2_)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
animateTick(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, java.util.Random p_180655_4_)
void
attack(BlockState p_196270_1_, World p_196270_2_, BlockPos p_196270_3_, PlayerEntity p_196270_4_)
private static boolean
canTakeShape(BlockState p_185704_0_, IBlockReader p_185704_1_, BlockPos p_185704_2_, Direction p_185704_3_)
protected void
createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
void
destroy(IWorld p_176206_1_, BlockPos p_176206_2_, BlockState p_176206_3_)
float
getExplosionResistance()
FluidState
getFluidState(BlockState p_204507_1_)
private Block
getModelBlock()
private BlockState
getModelState()
VoxelShape
getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
private int
getShapeIndex(BlockState p_196511_1_)
private static StairsShape
getStairsShape(BlockState p_208064_0_, IBlockReader p_208064_1_, BlockPos p_208064_2_)
BlockState
getStateForPlacement(BlockItemUseContext p_196258_1_)
boolean
isPathfindable(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_)
boolean
isRandomlyTicking(BlockState p_149653_1_)
static boolean
isStairs(BlockState p_185709_0_)
private static VoxelShape[]
makeShapes(VoxelShape p_199779_0_, VoxelShape p_199779_1_, VoxelShape p_199779_2_, VoxelShape p_199779_3_, VoxelShape p_199779_4_)
private static VoxelShape
makeStairShape(int p_199781_0_, VoxelShape p_199781_1_, VoxelShape p_199781_2_, VoxelShape p_199781_3_, VoxelShape p_199781_4_, VoxelShape p_199781_5_)
BlockState
mirror(BlockState p_185471_1_, Mirror p_185471_2_)
void
onPlace(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_)
void
onRemove(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_)
void
randomTick(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, java.util.Random p_225542_4_)
BlockState
rotate(BlockState p_185499_1_, Rotation p_185499_2_)
void
stepOn(World p_176199_1_, BlockPos p_176199_2_, Entity p_176199_3_)
void
tick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, java.util.Random p_225534_4_)
BlockState
updateShape(BlockState p_196271_1_, Direction p_196271_2_, BlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_)
ActionResultType
use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_)
boolean
useShapeForLightOcclusion(BlockState p_220074_1_)
void
wasExploded(World p_180652_1_, BlockPos p_180652_2_, Explosion p_180652_3_)
-
Methods inherited from class net.minecraft.block.Block
appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getFriction, getHarvestLevel, getHarvestTool, getId, getJumpFactor, getName, getSoundType, getSpeedFactor, getStateDefinition, getTags, handleRain, hasDynamicShape, is, is, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, stateById, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy
-
Methods inherited from class net.minecraft.block.AbstractBlock
canBeReplaced, canBeReplaced, canSurvive, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getSignal, getVisualShape, hasAnalogOutputSignal, isAir, isEntityBlock, isSignalSource, neighborChanged, onProjectileHit, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes
-
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRespawnPosition, getSlipperiness, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, makesOpenTrapdoorAboveClimbable, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
Methods inherited from interface net.minecraft.block.IWaterLoggable
canPlaceLiquid, placeLiquid, takeLiquid
-
-
-
-
Field Detail
-
FACING
public static final DirectionProperty FACING
-
HALF
public static final EnumProperty<Half> HALF
-
SHAPE
public static final EnumProperty<StairsShape> SHAPE
-
WATERLOGGED
public static final BooleanProperty WATERLOGGED
-
TOP_AABB
protected static final VoxelShape TOP_AABB
-
BOTTOM_AABB
protected static final VoxelShape BOTTOM_AABB
-
OCTET_NNN
protected static final VoxelShape OCTET_NNN
-
OCTET_NNP
protected static final VoxelShape OCTET_NNP
-
OCTET_NPN
protected static final VoxelShape OCTET_NPN
-
OCTET_NPP
protected static final VoxelShape OCTET_NPP
-
OCTET_PNN
protected static final VoxelShape OCTET_PNN
-
OCTET_PNP
protected static final VoxelShape OCTET_PNP
-
OCTET_PPN
protected static final VoxelShape OCTET_PPN
-
OCTET_PPP
protected static final VoxelShape OCTET_PPP
-
TOP_SHAPES
protected static final VoxelShape[] TOP_SHAPES
-
BOTTOM_SHAPES
protected static final VoxelShape[] BOTTOM_SHAPES
-
SHAPE_BY_STATE
private static final int[] SHAPE_BY_STATE
-
base
private final Block base
-
baseState
private final BlockState baseState
-
stateSupplier
private final java.util.function.Supplier<BlockState> stateSupplier
-
-
Constructor Detail
-
StairsBlock
@Deprecated public StairsBlock(BlockState p_i48321_1_, AbstractBlock.Properties p_i48321_2_)
Deprecated.
-
StairsBlock
public StairsBlock(java.util.function.Supplier<BlockState> state, AbstractBlock.Properties properties)
-
-
Method Detail
-
makeShapes
private static VoxelShape[] makeShapes(VoxelShape p_199779_0_, VoxelShape p_199779_1_, VoxelShape p_199779_2_, VoxelShape p_199779_3_, VoxelShape p_199779_4_)
-
makeStairShape
private static VoxelShape makeStairShape(int p_199781_0_, VoxelShape p_199781_1_, VoxelShape p_199781_2_, VoxelShape p_199781_3_, VoxelShape p_199781_4_, VoxelShape p_199781_5_)
-
useShapeForLightOcclusion
public boolean useShapeForLightOcclusion(BlockState p_220074_1_)
- Overrides:
useShapeForLightOcclusion
in classAbstractBlock
-
getShape
public VoxelShape getShape(BlockState p_220053_1_, IBlockReader p_220053_2_, BlockPos p_220053_3_, ISelectionContext p_220053_4_)
- Overrides:
getShape
in classAbstractBlock
-
getShapeIndex
private int getShapeIndex(BlockState p_196511_1_)
-
animateTick
public void animateTick(BlockState p_180655_1_, World p_180655_2_, BlockPos p_180655_3_, java.util.Random p_180655_4_)
- Overrides:
animateTick
in classBlock
-
attack
public void attack(BlockState p_196270_1_, World p_196270_2_, BlockPos p_196270_3_, PlayerEntity p_196270_4_)
- Overrides:
attack
in classAbstractBlock
-
destroy
public void destroy(IWorld p_176206_1_, BlockPos p_176206_2_, BlockState p_176206_3_)
-
getExplosionResistance
public float getExplosionResistance()
- Overrides:
getExplosionResistance
in classBlock
-
onPlace
public void onPlace(BlockState p_220082_1_, World p_220082_2_, BlockPos p_220082_3_, BlockState p_220082_4_, boolean p_220082_5_)
- Overrides:
onPlace
in classAbstractBlock
-
onRemove
public void onRemove(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_)
- Overrides:
onRemove
in classAbstractBlock
-
isRandomlyTicking
public boolean isRandomlyTicking(BlockState p_149653_1_)
- Overrides:
isRandomlyTicking
in classBlock
-
randomTick
public void randomTick(BlockState p_225542_1_, ServerWorld p_225542_2_, BlockPos p_225542_3_, java.util.Random p_225542_4_)
- Overrides:
randomTick
in classAbstractBlock
-
tick
public void tick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, java.util.Random p_225534_4_)
- Overrides:
tick
in classAbstractBlock
-
use
public ActionResultType use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_)
- Overrides:
use
in classAbstractBlock
-
wasExploded
public void wasExploded(World p_180652_1_, BlockPos p_180652_2_, Explosion p_180652_3_)
- Overrides:
wasExploded
in classBlock
-
getStateForPlacement
public BlockState getStateForPlacement(BlockItemUseContext p_196258_1_)
- Overrides:
getStateForPlacement
in classBlock
-
updateShape
public BlockState updateShape(BlockState p_196271_1_, Direction p_196271_2_, BlockState p_196271_3_, IWorld p_196271_4_, BlockPos p_196271_5_, BlockPos p_196271_6_)
- Overrides:
updateShape
in classAbstractBlock
-
getStairsShape
private static StairsShape getStairsShape(BlockState p_208064_0_, IBlockReader p_208064_1_, BlockPos p_208064_2_)
-
canTakeShape
private static boolean canTakeShape(BlockState p_185704_0_, IBlockReader p_185704_1_, BlockPos p_185704_2_, Direction p_185704_3_)
-
isStairs
public static boolean isStairs(BlockState p_185709_0_)
-
rotate
public BlockState rotate(BlockState p_185499_1_, Rotation p_185499_2_)
- Overrides:
rotate
in classAbstractBlock
-
mirror
public BlockState mirror(BlockState p_185471_1_, Mirror p_185471_2_)
- Overrides:
mirror
in classAbstractBlock
-
createBlockStateDefinition
protected void createBlockStateDefinition(StateContainer.Builder<Block,BlockState> p_206840_1_)
- Overrides:
createBlockStateDefinition
in classBlock
-
getFluidState
public FluidState getFluidState(BlockState p_204507_1_)
- Overrides:
getFluidState
in classAbstractBlock
-
isPathfindable
public boolean isPathfindable(BlockState p_196266_1_, IBlockReader p_196266_2_, BlockPos p_196266_3_, PathType p_196266_4_)
- Overrides:
isPathfindable
in classAbstractBlock
-
getModelBlock
private Block getModelBlock()
-
getModelState
private BlockState getModelState()
-
-