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,IFallableExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordNested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKeyNested 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 floatprivate static final VoxelShapestatic final com.mojang.serialization.MapCodec<PointedDripstoneBlock> private static final intprivate static final floatprivate static final floatprivate static final VoxelShapeprivate static final floatstatic final floatprivate static final intprivate static final floatprivate static final intprivate static final intprivate static final intprivate static final intprivate static final VoxelShapeprivate static final doubleprivate static final VoxelShapeprivate static final floatprivate static final floatprivate static final intprivate static final intprivate static final floatstatic final EnumProperty<DripstoneThickness> static final EnumProperty<Direction> private static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapestatic final floatstatic final BooleanPropertyFields 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_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanimateTick(BlockState p_221870_, Level p_221871_, BlockPos p_221872_, RandomSource p_221873_) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).private static DripstoneThicknesscalculateDripstoneThickness(LevelReader level, BlockPos pos, Direction dir, boolean isTipMerge) private static DirectioncalculateTipDirection(LevelReader level, BlockPos pos, Direction dir) static booleancanDrip(BlockState state) private static booleancanDripThrough(BlockGetter level, BlockPos pos, BlockState state) private static booleancanFillCauldron(Fluid fluid) private static booleancanGrow(BlockState dripstoneState, BlockState state) protected booleancanSurvive(BlockState p_154137_, LevelReader p_154138_, BlockPos p_154139_) private static booleancanTipGrow(BlockState state, ServerLevel level, BlockPos pos) com.mojang.serialization.MapCodec<PointedDripstoneBlock> codec()protected voidprivate static voidcreateDripstone(LevelAccessor level, BlockPos pos, Direction direction, DripstoneThickness thickness) private static voidcreateMergedTips(BlockState state, LevelAccessor level, BlockPos pos) voidfallOn(Level p_154047_, BlockState p_154048_, BlockPos p_154049_, Entity p_154050_, float p_154051_) findBlockVertical(LevelAccessor level, BlockPos pos, Direction.AxisDirection axis, BiPredicate<BlockPos, BlockState> positionalStatePredicate, Predicate<BlockState> statePredicate, int maxIterations) private static BlockPosfindFillableCauldronBelowStalactiteTip(Level level, BlockPos pos, Fluid fluid) findRootBlock(Level level, BlockPos pos, BlockState state, int maxIterations) static BlockPosfindStalactiteTipAboveCauldron(Level level, BlockPos pos) private static BlockPosfindTip(BlockState state, LevelAccessor level, BlockPos pos, int maxIterations, boolean isTipMerge) static FluidgetCauldronFillFluidType(ServerLevel level, BlockPos pos) private static FluidgetDripFluid(Level level, Fluid fluid) getFallDamageSource(Entity p_254432_) private static Optional<PointedDripstoneBlock.FluidInfo> getFluidAboveStalactite(Level level, BlockPos pos, BlockState state) protected FluidStategetFluidState(BlockState p_154235_) protected floatprotected VoxelShapegetOcclusionShape(BlockState p_154170_) protected VoxelShapegetShape(BlockState p_154117_, BlockGetter p_154118_, BlockPos p_154119_, CollisionContext p_154120_) getStateForPlacement(BlockPlaceContext p_154040_) private static voidgrow(ServerLevel server, BlockPos pos, Direction direction) static voidgrowStalactiteOrStalagmiteIfPossible(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) private static voidgrowStalagmiteBelow(ServerLevel level, BlockPos pos) protected booleanisCollisionShapeFullBlock(BlockState p_181235_, BlockGetter p_181236_, BlockPos p_181237_) protected booleanisPathfindable(BlockState p_154112_, PathComputationType p_154115_) private static booleanisPointedDripstoneWithDirection(BlockState state, Direction dir) private static booleanisStalactite(BlockState state) private static booleanisStalactiteStartPos(BlockState state, LevelReader level, BlockPos pos) private static booleanisStalagmite(BlockState state) private static booleanisTip(BlockState state, boolean isTipMerge) private static booleanisUnmergedTipWithDirection(BlockState state, Direction dir) private static booleanisValidPointedDripstonePlacement(LevelReader level, BlockPos pos, Direction dir) static voidmaybeTransferFluid(BlockState state, ServerLevel level, BlockPos pos, float randChance) voidonBrokenAfterFall(Level p_154059_, BlockPos p_154060_, FallingBlockEntity p_154061_) protected voidonProjectileHit(Level p_154042_, BlockState p_154043_, BlockHitResult p_154044_, Projectile p_154045_) protected voidrandomTick(BlockState p_221883_, ServerLevel p_221884_, BlockPos p_221885_, RandomSource p_221886_) Performs a random tick on a block.static voidspawnDripParticle(Level level, BlockPos pos, BlockState state) private static voidspawnDripParticle(Level level, BlockPos pos, BlockState state, Fluid fluid) private static voidspawnFallingStalactite(BlockState state, ServerLevel level, BlockPos pos) protected voidtick(BlockState p_221865_, ServerLevel p_221866_, BlockPos p_221867_, RandomSource p_221868_) protected BlockStateupdateShape(BlockState p_154147_, LevelReader p_374104_, ScheduledTickAccess p_374078_, BlockPos p_154151_, Direction p_154148_, BlockPos p_154152_, BlockState p_154149_, RandomSource p_374393_) Methods inherited from class net.minecraft.world.level.block.Block
appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLightBlock, getLootTable, getMaxVerticalOffset, getMenuProvider, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onRemove, propagatesSkylightDown, properties, propertiesCodec, requiredFeatures, rotate, simpleCodec, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods 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, supportsExternalFaceHidingMethods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSoundMethods inherited from interface net.neoforged.neoforge.common.extensions.IFallableExtension
fallingTickMethods 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:
createBlockStateDefinitionin classBlock
-
canSurvive
- Overrides:
canSurvivein classBlockBehaviour
-
updateShape
protected BlockState updateShape(BlockState p_154147_, LevelReader p_374104_, ScheduledTickAccess p_374078_, BlockPos p_154151_, Direction p_154148_, BlockPos p_154152_, BlockState p_154149_, RandomSource p_374393_) - Overrides:
updateShapein classBlockBehaviour
-
onProjectileHit
protected void onProjectileHit(Level p_154042_, BlockState p_154043_, BlockHitResult p_154044_, Projectile p_154045_) - Overrides:
onProjectileHitin classBlockBehaviour
-
fallOn
public void fallOn(Level p_154047_, BlockState p_154048_, BlockPos p_154049_, Entity p_154050_, float p_154051_) -
animateTick
public void animateTick(BlockState p_221870_, Level p_221871_, BlockPos p_221872_, RandomSource p_221873_) Description copied from class:BlockCalled periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTickin classBlock
-
tick
protected void tick(BlockState p_221865_, ServerLevel p_221866_, BlockPos p_221867_, RandomSource p_221868_) - Overrides:
tickin classBlockBehaviour
-
randomTick
protected void randomTick(BlockState p_221883_, ServerLevel p_221884_, BlockPos p_221885_, RandomSource p_221886_) Description copied from class:BlockBehaviourPerforms a random tick on a block.- Overrides:
randomTickin classBlockBehaviour
-
maybeTransferFluid
public static void maybeTransferFluid(BlockState state, ServerLevel level, BlockPos pos, float randChance) -
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
getFluidState
- Overrides:
getFluidStatein classBlockBehaviour
-
getOcclusionShape
- Overrides:
getOcclusionShapein classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState p_154117_, BlockGetter p_154118_, BlockPos p_154119_, CollisionContext p_154120_) - Overrides:
getShapein classBlockBehaviour
-
isCollisionShapeFullBlock
protected boolean isCollisionShapeFullBlock(BlockState p_181235_, BlockGetter p_181236_, BlockPos p_181237_) - Overrides:
isCollisionShapeFullBlockin classBlockBehaviour
-
getMaxHorizontalOffset
protected float getMaxHorizontalOffset()- Overrides:
getMaxHorizontalOffsetin classBlockBehaviour
-
onBrokenAfterFall
- Specified by:
onBrokenAfterFallin interfaceFallable
-
getFallDamageSource
- Specified by:
getFallDamageSourcein interfaceFallable
-
spawnFallingStalactite
-
growStalactiteOrStalagmiteIfPossible
public static void growStalactiteOrStalagmiteIfPossible(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) -
growStalagmiteBelow
-
grow
-
createDripstone
private static void createDripstone(LevelAccessor level, BlockPos pos, Direction direction, DripstoneThickness thickness) -
createMergedTips
-
spawnDripParticle
-
spawnDripParticle
-
findTip
@Nullable private static BlockPos findTip(BlockState state, LevelAccessor level, BlockPos pos, int maxIterations, boolean isTipMerge) -
calculateTipDirection
@Nullable private static Direction calculateTipDirection(LevelReader level, BlockPos pos, Direction dir) -
calculateDripstoneThickness
private static DripstoneThickness calculateDripstoneThickness(LevelReader level, BlockPos pos, Direction dir, boolean isTipMerge) -
canDrip
-
canTipGrow
-
findRootBlock
private static Optional<BlockPos> findRootBlock(Level level, BlockPos pos, BlockState state, int maxIterations) -
isValidPointedDripstonePlacement
private static boolean isValidPointedDripstonePlacement(LevelReader level, BlockPos pos, Direction dir) -
isTip
-
isUnmergedTipWithDirection
-
isStalactite
-
isStalagmite
-
isStalactiteStartPos
-
isPathfindable
- Overrides:
isPathfindablein classBlockBehaviour
-
isPointedDripstoneWithDirection
-
findFillableCauldronBelowStalactiteTip
-
findStalactiteTipAboveCauldron
-
getCauldronFillFluidType
-
getFluidAboveStalactite
private static Optional<PointedDripstoneBlock.FluidInfo> getFluidAboveStalactite(Level level, BlockPos pos, BlockState state) -
canFillCauldron
-
canGrow
-
getDripFluid
-
findBlockVertical
private static Optional<BlockPos> findBlockVertical(LevelAccessor level, BlockPos pos, Direction.AxisDirection axis, BiPredicate<BlockPos, BlockState> positionalStatePredicate, Predicate<BlockState> statePredicate, int maxIterations) -
canDripThrough
-