Class AbstractPlantPartBlock
- All Implemented Interfaces:
- ItemConvertible,- ToggleableFeature
- Direct Known Subclasses:
- AbstractPlantBlock,- AbstractPlantStemBlock
- Mappings:
- Namespace - Name - official - csy- intermediary - net/minecraft/class_4863- named - net/minecraft/block/AbstractPlantPartBlock
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.block.BlockBlock.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlockAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Directionprotected final VoxelShapeprotected final booleanFields inherited from class net.minecraft.block.Blockfield_31022, field_31023, field_31024, field_31025, field_31035, FORCE_STATE, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_DROPS, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlockcollidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureFEATURE_ENABLED_REGISTRY_KEYS
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractPlantPartBlock(AbstractBlock.Settings settings, Direction growthDirection, VoxelShape outlineShape, boolean tickWater) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleancanAttachTo(BlockState state) booleancanPlaceAt(BlockState state, WorldView world, BlockPos pos) Returns whether the block can be placed atpos.getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected abstract BlockgetPlant()getRandomGrowthState(WorldAccess world) protected abstract AbstractPlantStemBlockgetStem()voidscheduledTick(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.BlockafterBreak, 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, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTransparent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlockcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, randomTick, rotateMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeatureisEnabled
- 
Field Details- 
growthDirection- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcsy;a:Lha;- intermediary - field_22507- Lnet/minecraft/class_4863;field_22507:Lnet/minecraft/class_2350;- named - growthDirection- Lnet/minecraft/block/AbstractPlantPartBlock;growthDirection:Lnet/minecraft/util/math/Direction;
 
- 
tickWaterprotected final boolean tickWater- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcsy;b:Z- intermediary - field_22508- Lnet/minecraft/class_4863;field_22508:Z- named - tickWater- Lnet/minecraft/block/AbstractPlantPartBlock;tickWater:Z
 
- 
outlineShape- Mappings:
- Namespace - Name - Mixin selector - official - c- Lcsy;c:Lefb;- intermediary - field_23080- Lnet/minecraft/class_4863;field_23080:Lnet/minecraft/class_265;- named - outlineShape- Lnet/minecraft/block/AbstractPlantPartBlock;outlineShape:Lnet/minecraft/util/shape/VoxelShape;
 
 
- 
- 
Constructor Details- 
AbstractPlantPartBlockprotected AbstractPlantPartBlock(AbstractBlock.Settings settings, Direction growthDirection, VoxelShape outlineShape, boolean tickWater) - Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lcsy;<init>(Ldca$d;Lha;Lefb;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- named - <init>- Lnet/minecraft/block/AbstractPlantPartBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/shape/VoxelShape;Z)V
 
 
- 
- 
Method Details- 
getPlacementState- Overrides:
- getPlacementStatein class- Block
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcpn;a(Lcih;)Ldcb;- intermediary - method_9605- Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;- named - getPlacementState- Lnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
 
- 
getRandomGrowthState- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcsy;a(Lcmn;)Ldcb;- intermediary - method_24948- Lnet/minecraft/class_4863;method_24948(Lnet/minecraft/class_1936;)Lnet/minecraft/class_2680;- named - getRandomGrowthState- Lnet/minecraft/block/AbstractPlantPartBlock;getRandomGrowthState(Lnet/minecraft/world/WorldAccess;)Lnet/minecraft/block/BlockState;
 
- 
canPlaceAtReturns 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 World.setBlockState(BlockPos, BlockState)call.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 World.isClient.- Overrides:
- canPlaceAtin class- AbstractBlock
- Returns:
- whether the block can be placed at pos
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcmp;Lgu;)Z- intermediary - method_9558- Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Z- named - canPlaceAt- Lnet/minecraft/block/AbstractBlock;canPlaceAt(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
 
- 
scheduledTickCalled 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). Additionally,AbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)by default calls this method; overrideAbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)to disable this behavior.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: - SugarCaneBlockchecks the placement requirement.
- DispenserBlockdispenses its content.
- CommandBlockexecutes its command.
- FrogspawnBlockspawns a tadpole.
- SoulSandBlockupdates a bubble column.
- FallingBlocktries to fall.
 - Overrides:
- scheduledTickin class- AbstractBlock
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Laif;Lgu;Lapf;)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- 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
 
- 
canAttachTo- Mappings:
- Namespace - Name - Mixin selector - official - h- Lcsy;h(Ldcb;)Z- intermediary - method_24947- Lnet/minecraft/class_4863;method_24947(Lnet/minecraft/class_2680;)Z- named - canAttachTo- Lnet/minecraft/block/AbstractPlantPartBlock;canAttachTo(Lnet/minecraft/block/BlockState;)Z
 
- 
getOutlineShapepublic VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
- getOutlineShapein class- AbstractBlock
- Mappings:
- Namespace - Name - Mixin selector - official - a- Ldca;a(Ldcb;Lcls;Lgu;Leen;)Lefb;- 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;- 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;
 
- 
getStem- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcsy;b()Lcta;- intermediary - method_24945- Lnet/minecraft/class_4863;method_24945()Lnet/minecraft/class_4865;- named - getStem- Lnet/minecraft/block/AbstractPlantPartBlock;getStem()Lnet/minecraft/block/AbstractPlantStemBlock;
 
- 
getPlant- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcsy;a()Lcpn;- intermediary - method_24946- Lnet/minecraft/class_4863;method_24946()Lnet/minecraft/class_2248;- named - getPlant- Lnet/minecraft/block/AbstractPlantPartBlock;getPlant()Lnet/minecraft/block/Block;
 
 
-