Class DoublePlantBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.VegetationBlock
net.minecraft.world.level.block.DoublePlantBlock
- All Implemented Interfaces:
FeatureElement, ItemLike, IBlockExtension
- Direct Known Subclasses:
PitcherCropBlock, SmallDripleafBlock, TallFlowerBlock, TallSeagrassBlock
-
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.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<DoublePlantBlock> static final EnumProperty<DoubleBlockHalf> Fields 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 TypeMethodDescriptionprotected booleancanSurvive(BlockState state, LevelReader level, BlockPos pos) com.mojang.serialization.MapCodec<? extends DoublePlantBlock> codec()static BlockStatecopyWaterloggedFrom(LevelReader level, BlockPos pos, BlockState state) protected voidprotected longgetSeed(BlockState state, BlockPos pos) Return a random long to be passed to, used for random model rotationsinvalid reference
net.minecraft.client.resources.model.BakedModel#getQuads@Nullable BlockStategetStateForPlacement(BlockPlaceContext context) static voidplaceAt(LevelAccessor level, BlockState state, BlockPos lowerPos, int updateType) voidplayerDestroy(Level level, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack destroyedWith) Called after a player has successfully harvested this block.playerWillDestroy(Level level, BlockPos pos, BlockState state, Player player) protected static voidpreventDropFromBottomPart(Level level, BlockPos pos, BlockState state, Player player) voidsetPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity by, ItemStack itemStack) Called by BlockItem after this block has been placed.protected BlockStateupdateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) Methods inherited from class VegetationBlock
isPathfindable, mayPlaceOn, propagatesSkylightDownMethods inherited from class Block
animateTick, 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, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, 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, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getShadeBrightness, getShape, getSignal, getSoundType, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isRandomlyTicking, isSignalSource, mirror, neighborChanged, onExplosionHit, onPlace, onProjectileHit, properties, propertiesCodec, randomTick, requiredFeatures, rotate, shouldChangedStateKeepBlockEntity, simpleCodec, 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 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, supportsExternalFaceHiding
-
Field Details
-
CODEC
-
HALF
-
-
Constructor Details
-
DoublePlantBlock
-
-
Method Details
-
codec
- Specified by:
codecin classVegetationBlock
-
updateShape
protected BlockState updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) - Overrides:
updateShapein classVegetationBlock
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
setPlacedBy
public void setPlacedBy(Level level, BlockPos pos, BlockState state, @Nullable LivingEntity by, ItemStack itemStack) Description copied from class:BlockCalled by BlockItem after this block has been placed.- Overrides:
setPlacedByin classBlock
-
canSurvive
- Overrides:
canSurvivein classVegetationBlock
-
placeAt
public static void placeAt(LevelAccessor level, BlockState state, BlockPos lowerPos, int updateType) -
copyWaterloggedFrom
-
playerWillDestroy
- Overrides:
playerWillDestroyin classBlock
-
playerDestroy
public void playerDestroy(Level level, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack destroyedWith) Description copied from class:BlockCalled after a player has successfully harvested this block. This method will only be called if the player has used the correct tool and drops should be spawned.- Overrides:
playerDestroyin classBlock
-
preventDropFromBottomPart
protected static void preventDropFromBottomPart(Level level, BlockPos pos, BlockState state, Player player) -
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
getSeed
Description copied from class:BlockBehaviourReturn a random long to be passed to, used for random model rotationsinvalid reference
net.minecraft.client.resources.model.BakedModel#getQuads- Overrides:
getSeedin classBlockBehaviour
-