Class AbstractPlantPartBlock
- All Implemented Interfaces:
ItemConvertible
,ToggleableFeature
- Direct Known Subclasses:
AbstractPlantBlock
,AbstractPlantStemBlock
- Mappings:
Namespace Name named net/minecraft/block/AbstractPlantPartBlock
intermediary net/minecraft/class_4863
official dio
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Direction
protected final VoxelShape
protected final boolean
Fields inherited from class net.minecraft.block.Block
CODEC, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Fields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractPlantPartBlock
(AbstractBlock.Settings settings, Direction growthDirection, VoxelShape outlineShape, boolean tickWater) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canAttachTo
(BlockState state) protected boolean
canPlaceAt
(BlockState state, WorldView world, BlockPos pos) Returns whether the block can be placed atpos
.protected abstract com.mojang.serialization.MapCodec
<? extends AbstractPlantPartBlock> getCodec()
protected VoxelShape
getOutlineShape
(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected abstract Block
getPlant()
getRandomGrowthState
(WorldAccess world) protected abstract AbstractPlantStemBlock
getStem()
protected void
scheduledTick
(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block receives a scheduled tick.Methods inherited from class net.minecraft.block.Block
afterBreak, appendProperties, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, isTransparent, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, onUseWithItem, prepare, randomTick, rotate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
growthDirection
- Mappings:
Namespace Name Mixin selector named growthDirection
Lnet/minecraft/block/AbstractPlantPartBlock;growthDirection:Lnet/minecraft/util/math/Direction;
intermediary field_22507
Lnet/minecraft/class_4863;field_22507:Lnet/minecraft/class_2350;
official a
Ldio;a:Lje;
-
tickWater
protected final boolean tickWater- Mappings:
Namespace Name Mixin selector named tickWater
Lnet/minecraft/block/AbstractPlantPartBlock;tickWater:Z
intermediary field_22508
Lnet/minecraft/class_4863;field_22508:Z
official b
Ldio;b:Z
-
outlineShape
- Mappings:
Namespace Name Mixin selector named outlineShape
Lnet/minecraft/block/AbstractPlantPartBlock;outlineShape:Lnet/minecraft/util/shape/VoxelShape;
intermediary field_23080
Lnet/minecraft/class_4863;field_23080:Lnet/minecraft/class_265;
official d
Ldio;d:Lewm;
-
-
Constructor Details
-
AbstractPlantPartBlock
protected AbstractPlantPartBlock(AbstractBlock.Settings settings, Direction growthDirection, VoxelShape outlineShape, boolean tickWater) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/block/AbstractPlantPartBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/shape/VoxelShape;Z)V
intermediary <init>
Lnet/minecraft/class_4863;<init>(Lnet/minecraft/class_4970$class_2251;Lnet/minecraft/class_2350;Lnet/minecraft/class_265;Z)V
official <init>
Ldio;<init>(Ldsd$d;Lje;Lewm;Z)V
-
-
Method Details
-
getCodec
- Overrides:
getCodec
in classBlock
- Mappings:
Namespace Name Mixin selector named getCodec
Lnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
intermediary method_53969
Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;
official a
Ldsd;a()Lcom/mojang/serialization/MapCodec;
-
getPlacementState
- Overrides:
getPlacementState
in classBlock
- Mappings:
Namespace Name Mixin selector named getPlacementState
Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
intermediary method_9605
Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;
official a
Ldfb;a(Lcyc;)Ldse;
-
getRandomGrowthState
- Mappings:
Namespace Name Mixin selector named getRandomGrowthState
Lnet/minecraft/block/AbstractPlantPartBlock;getRandomGrowthState(Lnet/minecraft/world/WorldAccess;)Lnet/minecraft/block/BlockState;
intermediary method_24948
Lnet/minecraft/class_4863;method_24948(Lnet/minecraft/class_1936;)Lnet/minecraft/class_2680;
official a
Ldio;a(Ldcb;)Ldse;
-
canPlaceAt
Returns whether the block can be placed atpos
.Blocks with supporting block requirements should override this method. Note that this should also be checked manually during
AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos)
in order to break the block that lost its supporting block.This is only checked during the use of block items or by endermen, falling blocks, etc that can place blocks. This does not affect block state changes performed through
invalid reference
World#setBlockState(BlockPos, BlockState)
This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
invalid reference
World#isClient
- Overrides:
canPlaceAt
in classAbstractBlock
- Returns:
- whether the block can be placed at
pos
- See Also:
- Mappings:
Namespace Name Mixin selector named canPlaceAt
Lnet/minecraft/block/AbstractBlock;canPlaceAt(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
intermediary method_9558
Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Z
official a
Ldsd;a(Ldse;Ldcd;Liz;)Z
-
scheduledTick
Called server-side when a block receives a scheduled tick. This can be used like a timer. Scheduled ticks are added usingWorldAccess.scheduleBlockTick(BlockPos, Block, int)
.Scheduled ticks are often used inside
AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.util.math.Direction, net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, net.minecraft.util.math.BlockPos)
.Here are some examples:
SugarCaneBlock
checks the placement requirement.DispenserBlock
dispenses its content.CommandBlock
executes its command.FrogspawnBlock
spawns a tadpole.SoulSandBlock
updates a bubble column.FallingBlock
tries to fall.
- Overrides:
scheduledTick
in classAbstractBlock
- See Also:
- Mappings:
Namespace Name Mixin selector named scheduledTick
Lnet/minecraft/block/AbstractBlock;scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)V
intermediary method_9588
Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V
official a
Ldsd;a(Ldse;Larf;Liz;Lazh;)V
-
canAttachTo
- Mappings:
Namespace Name Mixin selector named canAttachTo
Lnet/minecraft/block/AbstractPlantPartBlock;canAttachTo(Lnet/minecraft/block/BlockState;)Z
intermediary method_24947
Lnet/minecraft/class_4863;method_24947(Lnet/minecraft/class_2680;)Z
official m
Ldio;m(Ldse;)Z
-
getOutlineShape
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShape
in classAbstractBlock
- See Also:
- Mappings:
Namespace Name Mixin selector named getOutlineShape
Lnet/minecraft/block/AbstractBlock;getOutlineShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
intermediary method_9530
Lnet/minecraft/class_4970;method_9530(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;
official a
Ldsd;a(Ldse;Ldbg;Liz;Levy;)Lewm;
-
getStem
- Mappings:
Namespace Name Mixin selector named getStem
Lnet/minecraft/block/AbstractPlantPartBlock;getStem()Lnet/minecraft/block/AbstractPlantStemBlock;
intermediary method_24945
Lnet/minecraft/class_4863;method_24945()Lnet/minecraft/class_4865;
official c
Ldio;c()Ldiq;
-
getPlant
- Mappings:
Namespace Name Mixin selector named getPlant
Lnet/minecraft/block/AbstractPlantPartBlock;getPlant()Lnet/minecraft/block/Block;
intermediary method_24946
Lnet/minecraft/class_4863;method_24946()Lnet/minecraft/class_2248;
official b
Ldio;b()Ldfb;
-