Class GrassBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.SnowyBlock
net.minecraft.world.level.block.SpreadingSnowyBlock
net.minecraft.world.level.block.GrassBlock
- All Implemented Interfaces:
FeatureElement, BonemealableBlock, ItemLike, IBlockExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class Block
Block.UpdateFlagsNested classes/interfaces inherited from class BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.PostProcess, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicateNested classes/interfaces inherited from interface BonemealableBlock
BonemealableBlock.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final floatprivate static final floatFields inherited from class SnowyBlock
SNOWYFields 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
bounceRestitution, descriptionId, drops, dynamicShape, explosionResistance, fallDistanceReduction, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()booleanisBonemealSuccess(Level level, RandomSource random, BlockPos pos, BlockState state, BonemealSource source) booleanisValidBonemealTarget(LevelReader level, BlockPos pos, BlockState state, BonemealSource source) voidperformBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state, BonemealSource source) private static voidplaceBonemealEffect(ServerLevel level, RandomSource random, BlockPos testPos, BonemealSource source) private booleanstopBonemealSpread(ServerLevel level, BlockPos testPos) Methods inherited from class SpreadingSnowyBlock
randomTickMethods inherited from class SnowyBlock
createBlockStateDefinition, getStateForPlacement, isSnowySetting, updateShapeMethods inherited from class Block
animateTick, asBlock, asItem, bounceOn, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, dropResources, dropResources, dropResources, fallOn, getBounceRestitution, getDrops, getDrops, getExplosionResistance, getFallDistanceReduction, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyByEntityParticles, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class BlockBehaviour
affectNeighborsAfterRemoval, attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDirectSignal, getDrops, getEntityInsideCollisionShape, getFluidState, getInteractionShape, getLightDampening, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, ownSignal, propagatesSkylightDown, properties, requiredFeatures, rotate, shouldChangedStateKeepBlockEntity, shouldRedstoneWireConnectTo, showAsInteractableInSpectatorMode, skipRendering, spawnAfterBreak, tick, triggerEvent, updateIndirectNeighbourShapes, useItemOn, useShapeForLightOcclusion, useWithoutItemMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface BonemealableBlock
getParticlePosMethods inherited from interface FeatureElement
isEnabledMethods inherited from interface IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBlockPathType, getBounceRestitution, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRelocability, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, ignitedByLava, isBurning, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHiding
-
Field Details
-
ATTEMPT_COUNT
private static final int ATTEMPT_COUNT- See Also:
-
GROW_TALL_GRASS_CHANCE
private static final float GROW_TALL_GRASS_CHANCE- See Also:
-
PLACE_FLOWER_CHANCE
private static final float PLACE_FLOWER_CHANCE- See Also:
-
-
Constructor Details
-
GrassBlock
-
-
Method Details
-
isValidBonemealTarget
public boolean isValidBonemealTarget(LevelReader level, BlockPos pos, BlockState state, BonemealSource source) - Specified by:
isValidBonemealTargetin interfaceBonemealableBlock
-
isBonemealSuccess
public boolean isBonemealSuccess(Level level, RandomSource random, BlockPos pos, BlockState state, BonemealSource source) - Specified by:
isBonemealSuccessin interfaceBonemealableBlock
-
performBonemeal
public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state, BonemealSource source) - Specified by:
performBonemealin interfaceBonemealableBlock
-
placeBonemealEffect
private static void placeBonemealEffect(ServerLevel level, RandomSource random, BlockPos testPos, BonemealSource source) -
stopBonemealSpread
-
getType
- Specified by:
getTypein interfaceBonemealableBlock
-