Package net.minecraft.world.level.block
Class LeavesBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.LeavesBlock
- All Implemented Interfaces:
FeatureElement
,BucketPickup
,LiquidBlockContainer
,SimpleWaterloggedBlock
,ItemLike
,IBlockExtension
,IBucketPickupExtension
,IShearable
- Direct Known Subclasses:
TintedParticleLeavesBlock
,UntintedParticleLeavesBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKey
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 TypeFieldDescriptionstatic final int
static final IntegerProperty
protected final float
static final BooleanProperty
private static final int
static final BooleanProperty
Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, CODEC, 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_DROPS
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, 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 p_221374_, Level p_221375_, BlockPos p_221376_, RandomSource p_221377_) abstract com.mojang.serialization.MapCodec
<? extends LeavesBlock> codec()
protected void
protected boolean
decaying
(BlockState p_221386_) protected VoxelShape
getBlockSupportShape
(BlockState p_54456_, BlockGetter p_54457_, BlockPos p_54458_) private static int
getDistanceAt
(BlockState p_54464_) protected FluidState
getFluidState
(BlockState p_221384_) protected int
getLightBlock
(BlockState p_54460_) static OptionalInt
getOptionalDistanceAt
(BlockState p_277868_) getStateForPlacement
(BlockPlaceContext p_54424_) protected boolean
isRandomlyTicking
(BlockState p_54449_) private static void
makeDrippingWaterParticles
(Level p_394137_, BlockPos p_394032_, RandomSource p_393792_, BlockState p_393464_, BlockPos p_393946_) private void
makeFallingLeavesParticles
(Level p_394081_, BlockPos p_393863_, RandomSource p_394086_, BlockState p_394001_, BlockPos p_393715_) protected void
randomTick
(BlockState p_221379_, ServerLevel p_221380_, BlockPos p_221381_, RandomSource p_221382_) protected abstract void
spawnFallingLeavesParticle
(Level p_399924_, BlockPos p_399922_, RandomSource p_400164_) protected void
tick
(BlockState p_221369_, ServerLevel p_221370_, BlockPos p_221371_, RandomSource p_221372_) private static BlockState
updateDistance
(BlockState p_54436_, LevelAccessor p_54437_, BlockPos p_54438_) protected BlockState
updateShape
(BlockState p_54440_, LevelReader p_374064_, ScheduledTickAccess p_374538_, BlockPos p_54444_, Direction p_54441_, BlockPos p_54445_, BlockState p_54442_, RandomSource p_374122_) Methods inherited from class net.minecraft.world.level.block.Block
asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, 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, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, 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, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSound
Methods inherited from interface net.neoforged.neoforge.common.IShearable
isShearable, onSheared, spawnShearedDrop
Methods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
DECAY_DISTANCE
public static final int DECAY_DISTANCE- See Also:
-
DISTANCE
-
PERSISTENT
-
WATERLOGGED
-
leafParticleChance
protected final float leafParticleChance -
TICK_DELAY
private static final int TICK_DELAY- See Also:
-
-
Constructor Details
-
LeavesBlock
-
-
Method Details
-
codec
-
getBlockSupportShape
protected VoxelShape getBlockSupportShape(BlockState p_54456_, BlockGetter p_54457_, BlockPos p_54458_) - Overrides:
getBlockSupportShape
in classBlockBehaviour
-
isRandomlyTicking
- Overrides:
isRandomlyTicking
in classBlockBehaviour
-
randomTick
protected void randomTick(BlockState p_221379_, ServerLevel p_221380_, BlockPos p_221381_, RandomSource p_221382_) - Overrides:
randomTick
in classBlockBehaviour
-
decaying
-
tick
protected void tick(BlockState p_221369_, ServerLevel p_221370_, BlockPos p_221371_, RandomSource p_221372_) - Overrides:
tick
in classBlockBehaviour
-
getLightBlock
- Overrides:
getLightBlock
in classBlockBehaviour
-
updateShape
protected BlockState updateShape(BlockState p_54440_, LevelReader p_374064_, ScheduledTickAccess p_374538_, BlockPos p_54444_, Direction p_54441_, BlockPos p_54445_, BlockState p_54442_, RandomSource p_374122_) - Overrides:
updateShape
in classBlockBehaviour
-
updateDistance
private static BlockState updateDistance(BlockState p_54436_, LevelAccessor p_54437_, BlockPos p_54438_) -
getDistanceAt
-
getOptionalDistanceAt
-
getFluidState
- Overrides:
getFluidState
in classBlockBehaviour
-
animateTick
public void animateTick(BlockState p_221374_, Level p_221375_, BlockPos p_221376_, RandomSource p_221377_) - Overrides:
animateTick
in classBlock
-
makeDrippingWaterParticles
private static void makeDrippingWaterParticles(Level p_394137_, BlockPos p_394032_, RandomSource p_393792_, BlockState p_393464_, BlockPos p_393946_) -
makeFallingLeavesParticles
private void makeFallingLeavesParticles(Level p_394081_, BlockPos p_393863_, RandomSource p_394086_, BlockState p_394001_, BlockPos p_393715_) -
spawnFallingLeavesParticle
protected abstract void spawnFallingLeavesParticle(Level p_399924_, BlockPos p_399922_, RandomSource p_400164_) -
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-