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 Block
Block.UpdateFlagsNested classes/interfaces inherited from class BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final floatstatic final com.mojang.serialization.MapCodec<PointedDripstoneBlock> private static final intprivate static final floatprivate static final floatprivate 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 doubleprivate static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapeprivate static final floatprivate static final doubleprivate static final intprivate static final intprivate static final floatstatic final EnumProperty<DripstoneThickness> static final EnumProperty<Direction> static final floatstatic final BooleanPropertyFields inherited from class 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_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanimateTick(BlockState state, Level level, BlockPos pos, RandomSource random) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).private static DripstoneThicknesscalculateDripstoneThickness(LevelReader level, BlockPos pos, Direction tipDirection, boolean mergeOpposingTips) private static @Nullable DirectioncalculateTipDirection(LevelReader level, BlockPos pos, Direction defaultTipDirection) static booleancanDrip(BlockState state) private static booleancanDripThrough(BlockGetter level, BlockPos pos, BlockState state) private static booleancanFillCauldron(Fluid fluidAbove) private static booleancanGrow(BlockState rootState, BlockState aboveState) protected booleancanSurvive(BlockState state, LevelReader level, BlockPos pos) private static booleancanTipGrow(BlockState tipState, ServerLevel level, BlockPos tipPos) com.mojang.serialization.MapCodec<PointedDripstoneBlock> codec()protected voidprivate static voidcreateDripstone(LevelAccessor level, BlockPos pos, Direction direction, DripstoneThickness thickness) private static voidcreateMergedTips(BlockState tipState, LevelAccessor level, BlockPos tipPos) voidfallOn(Level level, BlockState state, BlockPos pos, Entity entity, double fallDistance) findBlockVertical(LevelAccessor level, BlockPos pos, Direction.AxisDirection axisDirection, BiPredicate<BlockPos, BlockState> pathPredicate, Predicate<BlockState> targetPredicate, int maxSteps) private static @Nullable BlockPosfindFillableCauldronBelowStalactiteTip(Level level, BlockPos stalactiteTipPos, Fluid fluid) findRootBlock(Level level, BlockPos pos, BlockState dripStoneState, int maxSearchLength) static @Nullable BlockPosfindStalactiteTipAboveCauldron(Level level, BlockPos cauldronPos) private static @Nullable BlockPosfindTip(BlockState dripstoneState, LevelAccessor level, BlockPos dripstonePos, int maxSearchLength, boolean includeMergedTip) static FluidgetCauldronFillFluidType(ServerLevel level, BlockPos stalactitePos) private static ParticleOptionsgetDripParticle(Level level, Fluid fluidAbove, BlockPos posAbove) getFallDamageSource(Entity entity) private static Optional<PointedDripstoneBlock.FluidInfo> getFluidAboveStalactite(Level level, BlockPos stalactitePos, BlockState stalactiteState) protected FluidStategetFluidState(BlockState state) protected floatprotected VoxelShapegetShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) @Nullable BlockStategetStateForPlacement(BlockPlaceContext context) private static voidgrow(ServerLevel level, BlockPos growFromPos, Direction growToDirection) static voidgrowStalactiteOrStalagmiteIfPossible(BlockState stalactiteStartState, ServerLevel level, BlockPos stalactiteStartPos, RandomSource random) private static voidgrowStalagmiteBelow(ServerLevel level, BlockPos posAboveStalagmite) protected booleanisCollisionShapeFullBlock(BlockState state, BlockGetter level, BlockPos pos) protected booleanisPathfindable(BlockState state, PathComputationType type) private static booleanisPointedDripstoneWithDirection(BlockState blockState, Direction tipDirection) 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 includeMergedTip) private static booleanisUnmergedTipWithDirection(BlockState state, Direction tipDirection) private static booleanisValidPointedDripstonePlacement(LevelReader level, BlockPos pos, Direction tipDirection) static voidmaybeTransferFluid(BlockState state, ServerLevel level, BlockPos pos, float randomValue) voidonBrokenAfterFall(Level level, BlockPos pos, FallingBlockEntity entity) protected voidonProjectileHit(Level level, BlockState state, BlockHitResult blockHit, Projectile projectile) protected voidrandomTick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) Performs a random tick on a block.static voidspawnDripParticle(Level level, BlockPos stalactiteTipPos, BlockState stalactiteTipState) private static voidspawnDripParticle(Level level, BlockPos stalactiteTipPos, BlockState stalactiteTipState, Fluid fluidAbove, BlockPos posAbove) private static voidspawnFallingStalactite(BlockState state, ServerLevel level, BlockPos pos) protected voidtick(BlockState state, ServerLevel level, BlockPos pos, RandomSource random) protected BlockStateupdateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) Methods inherited from class Block
asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, dropResources, dropResources, dropResources, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, 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 BlockBehaviour
affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLightBlock, getLootTable, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, propagatesSkylightDown, properties, propertiesCodec, requiredFeatures, rotate, shouldChangedStateKeepBlockEntity, simpleCodec, skipRendering, spawnAfterBreak, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItemMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface FeatureElement
isEnabledMethods inherited from interface 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, ignitedByLava, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHidingMethods inherited from interface IBucketPickupExtension
getPickupSoundMethods inherited from interface IFallableExtension
fallingTickMethods inherited from interface 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:
-
SHAPE_TIP_MERGE
-
SHAPE_TIP_UP
-
SHAPE_TIP_DOWN
-
SHAPE_FRUSTUM
-
SHAPE_MIDDLE
-
SHAPE_BASE
-
STALACTITE_DRIP_START_PIXEL
private static final double STALACTITE_DRIP_START_PIXEL -
MAX_HORIZONTAL_OFFSET
private static final float MAX_HORIZONTAL_OFFSET -
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 state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) - Overrides:
updateShapein classBlockBehaviour
-
onProjectileHit
protected void onProjectileHit(Level level, BlockState state, BlockHitResult blockHit, Projectile projectile) - Overrides:
onProjectileHitin classBlockBehaviour
-
fallOn
-
animateTick
Description copied from class:BlockCalled periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTickin classBlock
-
tick
- Overrides:
tickin classBlockBehaviour
-
randomTick
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 randomValue) -
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
getFluidState
- Overrides:
getFluidStatein classBlockBehaviour
-
getShape
protected VoxelShape getShape(BlockState state, BlockGetter level, BlockPos pos, CollisionContext context) - Overrides:
getShapein classBlockBehaviour
-
isCollisionShapeFullBlock
- 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 stalactiteStartState, ServerLevel level, BlockPos stalactiteStartPos, RandomSource random) -
growStalagmiteBelow
-
grow
-
createDripstone
private static void createDripstone(LevelAccessor level, BlockPos pos, Direction direction, DripstoneThickness thickness) -
createMergedTips
-
spawnDripParticle
public static void spawnDripParticle(Level level, BlockPos stalactiteTipPos, BlockState stalactiteTipState) -
spawnDripParticle
private static void spawnDripParticle(Level level, BlockPos stalactiteTipPos, BlockState stalactiteTipState, Fluid fluidAbove, BlockPos posAbove) -
findTip
private static @Nullable BlockPos findTip(BlockState dripstoneState, LevelAccessor level, BlockPos dripstonePos, int maxSearchLength, boolean includeMergedTip) -
calculateTipDirection
private static @Nullable Direction calculateTipDirection(LevelReader level, BlockPos pos, Direction defaultTipDirection) -
calculateDripstoneThickness
private static DripstoneThickness calculateDripstoneThickness(LevelReader level, BlockPos pos, Direction tipDirection, boolean mergeOpposingTips) -
canDrip
-
canTipGrow
-
findRootBlock
private static Optional<BlockPos> findRootBlock(Level level, BlockPos pos, BlockState dripStoneState, int maxSearchLength) -
isValidPointedDripstonePlacement
private static boolean isValidPointedDripstonePlacement(LevelReader level, BlockPos pos, Direction tipDirection) -
isTip
-
isUnmergedTipWithDirection
-
isStalactite
-
isStalagmite
-
isStalactiteStartPos
-
isPathfindable
- Overrides:
isPathfindablein classBlockBehaviour
-
isPointedDripstoneWithDirection
private static boolean isPointedDripstoneWithDirection(BlockState blockState, Direction tipDirection) -
findFillableCauldronBelowStalactiteTip
-
findStalactiteTipAboveCauldron
-
getCauldronFillFluidType
-
getFluidAboveStalactite
private static Optional<PointedDripstoneBlock.FluidInfo> getFluidAboveStalactite(Level level, BlockPos stalactitePos, BlockState stalactiteState) -
canFillCauldron
-
canGrow
-
getDripParticle
-
findBlockVertical
private static Optional<BlockPos> findBlockVertical(LevelAccessor level, BlockPos pos, Direction.AxisDirection axisDirection, BiPredicate<BlockPos, BlockState> pathPredicate, Predicate<BlockState> targetPredicate, int maxSteps) -
canDripThrough
-