Package net.minecraft.world.level.block
Class PointedDripstoneBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.PointedDripstoneBlock
- All Implemented Interfaces:
FeatureElement
,BucketPickup
,Fallable
,LiquidBlockContainer
,SimpleWaterloggedBlock
,ItemLike
,IBlockExtension
,IBucketPickupExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.BlockStatePairKey
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final float
private static final VoxelShape
static final com.mojang.serialization.MapCodec
<PointedDripstoneBlock> private static final int
private static final float
private static final float
private static final VoxelShape
private static final float
static final float
private static final int
private static final float
private static final int
private static final int
private static final int
private static final int
private static final VoxelShape
private static final double
private static final VoxelShape
private static final float
private static final float
private static final int
private static final int
private static final float
static final EnumProperty
<DripstoneThickness> static final DirectionProperty
private static final VoxelShape
private static final VoxelShape
private static final VoxelShape
static final float
static final BooleanProperty
Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SUPPRESS_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
animateTick
(BlockState pState, Level pLevel, BlockPos pPos, RandomSource pRandom) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).private static DripstoneThickness
calculateDripstoneThickness
(LevelReader pLevel, BlockPos pPos, Direction pDir, boolean pIsTipMerge) private static Direction
calculateTipDirection
(LevelReader pLevel, BlockPos pPos, Direction pDir) static boolean
canDrip
(BlockState p_154239_) private static boolean
canDripThrough
(BlockGetter pLevel, BlockPos pPos, BlockState pState) private static boolean
canFillCauldron
(Fluid p_154159_) private static boolean
canGrow
(BlockState pDripstoneState, BlockState pState) protected boolean
canSurvive
(BlockState pState, LevelReader pLevel, BlockPos pPos) private static boolean
canTipGrow
(BlockState pState, ServerLevel pLevel, BlockPos pPos) com.mojang.serialization.MapCodec
<PointedDripstoneBlock> codec()
protected void
private static void
createDripstone
(LevelAccessor pLevel, BlockPos pPos, Direction pDirection, DripstoneThickness pThickness) private static void
createMergedTips
(BlockState pState, LevelAccessor pLevel, BlockPos pPos) void
fallOn
(Level pLevel, BlockState pState, BlockPos pPos, Entity pEntity, float pFallDistance) findBlockVertical
(LevelAccessor pLevel, BlockPos pPos, Direction.AxisDirection pAxis, BiPredicate<BlockPos, BlockState> pPositionalStatePredicate, Predicate<BlockState> pStatePredicate, int pMaxIterations) private static BlockPos
findFillableCauldronBelowStalactiteTip
(Level pLevel, BlockPos pPos, Fluid pFluid) findRootBlock
(Level pLevel, BlockPos pPos, BlockState pState, int pMaxIterations) static BlockPos
findStalactiteTipAboveCauldron
(Level pLevel, BlockPos pPos) private static BlockPos
findTip
(BlockState pState, LevelAccessor pLevel, BlockPos pPos, int pMaxIterations, boolean pIsTipMerge) static Fluid
getCauldronFillFluidType
(ServerLevel pLevel, BlockPos pPos) private static Fluid
getDripFluid
(Level pLevel, Fluid pFluid) getFallDamageSource
(Entity pEntity) private static Optional
<PointedDripstoneBlock.FluidInfo> getFluidAboveStalactite
(Level pLevel, BlockPos pPos, BlockState pState) protected FluidState
getFluidState
(BlockState pState) protected float
protected VoxelShape
getOcclusionShape
(BlockState pState, BlockGetter pLevel, BlockPos pPos) protected VoxelShape
getShape
(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) getStateForPlacement
(BlockPlaceContext pContext) private static void
grow
(ServerLevel pServer, BlockPos pPos, Direction pDirection) static void
growStalactiteOrStalagmiteIfPossible
(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) private static void
growStalagmiteBelow
(ServerLevel pLevel, BlockPos pPos) protected boolean
isCollisionShapeFullBlock
(BlockState pState, BlockGetter pLevel, BlockPos pPos) protected boolean
isPathfindable
(BlockState pState, PathComputationType pPathComputationType) private static boolean
isPointedDripstoneWithDirection
(BlockState pState, Direction pDir) private static boolean
isStalactite
(BlockState pState) private static boolean
isStalactiteStartPos
(BlockState pState, LevelReader pLevel, BlockPos pPos) private static boolean
isStalagmite
(BlockState pState) private static boolean
isTip
(BlockState pState, boolean pIsTipMerge) private static boolean
isUnmergedTipWithDirection
(BlockState pState, Direction pDir) private static boolean
isValidPointedDripstonePlacement
(LevelReader pLevel, BlockPos pPos, Direction pDir) static void
maybeTransferFluid
(BlockState pState, ServerLevel pLevel, BlockPos pPos, float pRandChance) void
onBrokenAfterFall
(Level pLevel, BlockPos pPos, FallingBlockEntity pFallingBlock) protected void
onProjectileHit
(Level pLevel, BlockState pState, BlockHitResult pHit, Projectile pProjectile) protected void
randomTick
(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) Performs a random tick on a block.static void
spawnDripParticle
(Level pLevel, BlockPos pPos, BlockState pState) private static void
spawnDripParticle
(Level pLevel, BlockPos pPos, BlockState pState, Fluid pFluid) private static void
spawnFallingStalactite
(BlockState pState, ServerLevel pLevel, BlockPos pPos) protected void
tick
(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) protected BlockState
updateShape
(BlockState pState, Direction pDirection, BlockState pNeighborState, LevelAccessor pLevel, BlockPos pPos, BlockPos pNeighborPos) Update the provided state given the provided neighbor direction and neighbor state, returning a new state.Methods inherited from class net.minecraft.world.level.block.Block
appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getInteractionShape, getLightBlock, getLootTable, getMaxVerticalOffset, getMenuProvider, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isOcclusionShapeFullBlock, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onRemove, propagatesSkylightDown, properties, propertiesCodec, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSound
Methods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
CODEC
-
TIP_DIRECTION
-
THICKNESS
-
WATERLOGGED
-
MAX_SEARCH_LENGTH_WHEN_CHECKING_DRIP_TYPE
private static final int MAX_SEARCH_LENGTH_WHEN_CHECKING_DRIP_TYPE- See Also:
-
DELAY_BEFORE_FALLING
private static final int DELAY_BEFORE_FALLING- See Also:
-
DRIP_PROBABILITY_PER_ANIMATE_TICK
private static final float DRIP_PROBABILITY_PER_ANIMATE_TICK- See Also:
-
DRIP_PROBABILITY_PER_ANIMATE_TICK_IF_UNDER_LIQUID_SOURCE
private static final float DRIP_PROBABILITY_PER_ANIMATE_TICK_IF_UNDER_LIQUID_SOURCE- See Also:
-
MAX_SEARCH_LENGTH_BETWEEN_STALACTITE_TIP_AND_CAULDRON
private static final int MAX_SEARCH_LENGTH_BETWEEN_STALACTITE_TIP_AND_CAULDRON- See Also:
-
WATER_TRANSFER_PROBABILITY_PER_RANDOM_TICK
public static final float WATER_TRANSFER_PROBABILITY_PER_RANDOM_TICK- See Also:
-
LAVA_TRANSFER_PROBABILITY_PER_RANDOM_TICK
public static final float LAVA_TRANSFER_PROBABILITY_PER_RANDOM_TICK- See Also:
-
MIN_TRIDENT_VELOCITY_TO_BREAK_DRIPSTONE
private static final double MIN_TRIDENT_VELOCITY_TO_BREAK_DRIPSTONE- See Also:
-
STALACTITE_DAMAGE_PER_FALL_DISTANCE_AND_SIZE
private static final float STALACTITE_DAMAGE_PER_FALL_DISTANCE_AND_SIZE- See Also:
-
STALACTITE_MAX_DAMAGE
private static final int STALACTITE_MAX_DAMAGE- See Also:
-
MAX_STALACTITE_HEIGHT_FOR_DAMAGE_CALCULATION
private static final int MAX_STALACTITE_HEIGHT_FOR_DAMAGE_CALCULATION- See Also:
-
STALAGMITE_FALL_DISTANCE_OFFSET
private static final float STALAGMITE_FALL_DISTANCE_OFFSET- See Also:
-
STALAGMITE_FALL_DAMAGE_MODIFIER
private static final int STALAGMITE_FALL_DAMAGE_MODIFIER- See Also:
-
AVERAGE_DAYS_PER_GROWTH
private static final float AVERAGE_DAYS_PER_GROWTH- See Also:
-
GROWTH_PROBABILITY_PER_RANDOM_TICK
private static final float GROWTH_PROBABILITY_PER_RANDOM_TICK- See Also:
-
MAX_GROWTH_LENGTH
private static final int MAX_GROWTH_LENGTH- See Also:
-
MAX_STALAGMITE_SEARCH_RANGE_WHEN_GROWING
private static final int MAX_STALAGMITE_SEARCH_RANGE_WHEN_GROWING- See Also:
-
STALACTITE_DRIP_START_PIXEL
private static final float STALACTITE_DRIP_START_PIXEL- See Also:
-
TIP_MERGE_SHAPE
-
TIP_SHAPE_UP
-
TIP_SHAPE_DOWN
-
FRUSTUM_SHAPE
-
MIDDLE_SHAPE
-
BASE_SHAPE
-
MAX_HORIZONTAL_OFFSET
private static final float MAX_HORIZONTAL_OFFSET- See Also:
-
REQUIRED_SPACE_TO_DRIP_THROUGH_NON_SOLID_BLOCK
-
-
Constructor Details
-
PointedDripstoneBlock
-
-
Method Details
-
codec
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
canSurvive
- Overrides:
canSurvive
in classBlockBehaviour
-
updateShape
protected BlockState updateShape(BlockState pState, Direction pDirection, BlockState pNeighborState, LevelAccessor pLevel, BlockPos pPos, BlockPos pNeighborPos) Update the provided state given the provided neighbor direction and neighbor state, returning a new state. For example, fences make their connections to the passed in state if possible, and wet concrete powder immediately returns its solidified counterpart. Note that this method should ideally consider only the specific direction passed in.- Overrides:
updateShape
in classBlockBehaviour
-
onProjectileHit
protected void onProjectileHit(Level pLevel, BlockState pState, BlockHitResult pHit, Projectile pProjectile) - Overrides:
onProjectileHit
in classBlockBehaviour
-
fallOn
public void fallOn(Level pLevel, BlockState pState, BlockPos pPos, Entity pEntity, float pFallDistance) -
animateTick
Called periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTick
in classBlock
-
tick
- Overrides:
tick
in classBlockBehaviour
-
randomTick
protected void randomTick(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) Performs a random tick on a block.- Overrides:
randomTick
in classBlockBehaviour
-
maybeTransferFluid
public static void maybeTransferFluid(BlockState pState, ServerLevel pLevel, BlockPos pPos, float pRandChance) -
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
getFluidState
- Overrides:
getFluidState
in classBlockBehaviour
-
getOcclusionShape
- Overrides:
getOcclusionShape
in classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) - Overrides:
getShape
in classBlockBehaviour
-
isCollisionShapeFullBlock
- Overrides:
isCollisionShapeFullBlock
in classBlockBehaviour
-
getMaxHorizontalOffset
protected float getMaxHorizontalOffset()- Overrides:
getMaxHorizontalOffset
in classBlockBehaviour
-
onBrokenAfterFall
- Specified by:
onBrokenAfterFall
in interfaceFallable
-
getFallDamageSource
- Specified by:
getFallDamageSource
in interfaceFallable
-
spawnFallingStalactite
-
growStalactiteOrStalagmiteIfPossible
public static void growStalactiteOrStalagmiteIfPossible(BlockState pState, ServerLevel pLevel, BlockPos pPos, RandomSource pRandom) -
growStalagmiteBelow
-
grow
-
createDripstone
private static void createDripstone(LevelAccessor pLevel, BlockPos pPos, Direction pDirection, DripstoneThickness pThickness) -
createMergedTips
-
spawnDripParticle
-
spawnDripParticle
-
findTip
@Nullable private static BlockPos findTip(BlockState pState, LevelAccessor pLevel, BlockPos pPos, int pMaxIterations, boolean pIsTipMerge) -
calculateTipDirection
@Nullable private static Direction calculateTipDirection(LevelReader pLevel, BlockPos pPos, Direction pDir) -
calculateDripstoneThickness
private static DripstoneThickness calculateDripstoneThickness(LevelReader pLevel, BlockPos pPos, Direction pDir, boolean pIsTipMerge) -
canDrip
-
canTipGrow
-
findRootBlock
private static Optional<BlockPos> findRootBlock(Level pLevel, BlockPos pPos, BlockState pState, int pMaxIterations) -
isValidPointedDripstonePlacement
private static boolean isValidPointedDripstonePlacement(LevelReader pLevel, BlockPos pPos, Direction pDir) -
isTip
-
isUnmergedTipWithDirection
-
isStalactite
-
isStalagmite
-
isStalactiteStartPos
-
isPathfindable
- Overrides:
isPathfindable
in classBlockBehaviour
-
isPointedDripstoneWithDirection
-
findFillableCauldronBelowStalactiteTip
-
findStalactiteTipAboveCauldron
-
getCauldronFillFluidType
-
getFluidAboveStalactite
private static Optional<PointedDripstoneBlock.FluidInfo> getFluidAboveStalactite(Level pLevel, BlockPos pPos, BlockState pState) -
canFillCauldron
-
canGrow
-
getDripFluid
-
findBlockVertical
private static Optional<BlockPos> findBlockVertical(LevelAccessor pLevel, BlockPos pPos, Direction.AxisDirection pAxis, BiPredicate<BlockPos, BlockState> pPositionalStatePredicate, Predicate<BlockState> pStatePredicate, int pMaxIterations) -
canDripThrough
-