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.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 TypeFieldDescriptionstatic final intstatic final IntegerPropertyprotected final floatstatic final BooleanPropertyprivate static final intstatic final BooleanPropertyFields 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_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
ConstructorsConstructorDescriptionLeavesBlock(float pLeafParticleChance, BlockBehaviour.Properties pProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidanimateTick(BlockState p_221374_, Level p_221375_, BlockPos p_221376_, RandomSource p_221377_) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).abstract com.mojang.serialization.MapCodec<? extends LeavesBlock> codec()protected voidprotected booleandecaying(BlockState pState) protected VoxelShapegetBlockSupportShape(BlockState pState, BlockGetter pReader, BlockPos pPos) private static intgetDistanceAt(BlockState pNeighbor) protected FluidStategetFluidState(BlockState p_221384_) protected intgetLightBlock(BlockState p_54460_) static OptionalIntgetOptionalDistanceAt(BlockState pState) getStateForPlacement(BlockPlaceContext pContext) protected booleanisRandomlyTicking(BlockState pState) private static voidmakeDrippingWaterParticles(Level pLevel, BlockPos pPos, RandomSource pRandom, BlockState pBlockBelow, BlockPos pBelowPos) private voidmakeFallingLeavesParticles(Level pLevel, BlockPos pPos, RandomSource pRandom, BlockState pBlockBelow, BlockPos pBelowPos) protected voidrandomTick(BlockState p_221379_, ServerLevel p_221380_, BlockPos p_221381_, RandomSource p_221382_) Performs a random tick on a block.protected abstract voidspawnFallingLeavesParticle(Level pLevel, BlockPos pPos, RandomSource pRandom) protected voidtick(BlockState p_221369_, ServerLevel p_221370_, BlockPos p_221371_, RandomSource p_221372_) private static BlockStateupdateDistance(BlockState pState, LevelAccessor pLevel, BlockPos pPos) protected BlockStateupdateShape(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, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, 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, withPropertiesOfMethods 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, shouldChangedStateKeepBlockEntity, 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, 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 net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSoundMethods inherited from interface net.neoforged.neoforge.common.IShearable
isShearable, onSheared, spawnShearedDropMethods 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
- Overrides:
getBlockSupportShapein classBlockBehaviour
-
isRandomlyTicking
- Overrides:
isRandomlyTickingin classBlockBehaviour
-
randomTick
protected void randomTick(BlockState p_221379_, ServerLevel p_221380_, BlockPos p_221381_, RandomSource p_221382_) Description copied from class:BlockBehaviourPerforms a random tick on a block.- Overrides:
randomTickin classBlockBehaviour
-
decaying
-
tick
protected void tick(BlockState p_221369_, ServerLevel p_221370_, BlockPos p_221371_, RandomSource p_221372_) - Overrides:
tickin classBlockBehaviour
-
getLightBlock
- Overrides:
getLightBlockin 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:
updateShapein classBlockBehaviour
-
updateDistance
-
getDistanceAt
-
getOptionalDistanceAt
-
getFluidState
- Overrides:
getFluidStatein classBlockBehaviour
-
animateTick
public void animateTick(BlockState p_221374_, Level p_221375_, BlockPos p_221376_, RandomSource p_221377_) Description copied from class:BlockCalled periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTickin classBlock
-
makeDrippingWaterParticles
private static void makeDrippingWaterParticles(Level pLevel, BlockPos pPos, RandomSource pRandom, BlockState pBlockBelow, BlockPos pBelowPos) -
makeFallingLeavesParticles
private void makeFallingLeavesParticles(Level pLevel, BlockPos pPos, RandomSource pRandom, BlockState pBlockBelow, BlockPos pBelowPos) -
spawnFallingLeavesParticle
protected abstract void spawnFallingLeavesParticle(Level pLevel, BlockPos pPos, RandomSource pRandom) -
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-