Class AbstractPlantPartBlock
- All Implemented Interfaces:
ItemConvertible,ToggleableFeature
- Direct Known Subclasses:
AbstractPlantBlock,AbstractPlantStemBlock
- Mappings:
Namespace Name named net/minecraft/block/AbstractPlantPartBlockintermediary net/minecraft/class_4863official dnb
-
Nested Class Summary
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
FieldsModifier and TypeFieldDescriptionprotected final Directionprotected final VoxelShapeprotected final booleanFields 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, SKIP_REDSTONE_WIRE_STATE_REPLACEMENT, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, translationKey, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPlantPartBlock(AbstractBlock.Settings settings, Direction growthDirection, VoxelShape outlineShape, boolean tickWater) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanAttachTo(BlockState state) protected booleancanPlaceAt(BlockState state, WorldView world, BlockPos pos) Returns whether the block can be placed atpos.protected abstract com.mojang.serialization.MapCodec<? extends AbstractPlantPartBlock> getCodec()protected VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected abstract BlockgetPlant()getRandomGrowthState(Random random) protected abstract AbstractPlantStemBlockgetStem()protected 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.Block
afterBreak, appendProperties, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, 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.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStateForNeighborUpdate, getStrongRedstonePower, getTranslationKey, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, hasSidedTransparency, isShapeFullCube, isSideInvisible, isTransparent, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, onUseWithItem, prepare, randomTick, rotateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
growthDirection
- Mappings:
Namespace Name Mixin selector named growthDirectionLnet/minecraft/block/AbstractPlantPartBlock;growthDirection:Lnet/minecraft/util/math/Direction;intermediary field_22507Lnet/minecraft/class_4863;field_22507:Lnet/minecraft/class_2350;official aLdnb;a:Ljn;
-
tickWater
protected final boolean tickWater- Mappings:
Namespace Name Mixin selector named tickWaterLnet/minecraft/block/AbstractPlantPartBlock;tickWater:Zintermediary field_22508Lnet/minecraft/class_4863;field_22508:Zofficial bLdnb;b:Z
-
outlineShape
- Mappings:
Namespace Name Mixin selector named outlineShapeLnet/minecraft/block/AbstractPlantPartBlock;outlineShape:Lnet/minecraft/util/shape/VoxelShape;intermediary field_23080Lnet/minecraft/class_4863;field_23080:Lnet/minecraft/class_265;official dLdnb;d:Lfbv;
-
-
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)Vintermediary <init>Lnet/minecraft/class_4863;<init>(Lnet/minecraft/class_4970$class_2251;Lnet/minecraft/class_2350;Lnet/minecraft/class_265;Z)Vofficial <init>Ldnb;<init>(Ldwx$d;Ljn;Lfbv;Z)V
-
-
Method Details
-
getCodec
- Overrides:
getCodecin classBlock- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_53969Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;official aLdwx;a()Lcom/mojang/serialization/MapCodec;
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;official aLdjn;a(Ldah;)Ldwy;
-
getRandomGrowthState
- Mappings:
Namespace Name Mixin selector named getRandomGrowthStateLnet/minecraft/block/AbstractPlantPartBlock;getRandomGrowthState(Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/block/BlockState;intermediary method_24948Lnet/minecraft/class_4863;method_24948(Lnet/minecraft/class_5819;)Lnet/minecraft/class_2680;official bLdnb;b(Lazh;)Ldwy;
-
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.world.WorldView, net.minecraft.world.tick.ScheduledTickView, net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.util.math.random.Random)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 classAbstractBlock- Returns:
- whether the block can be placed at
pos - See Also:
- Mappings:
Namespace Name Mixin selector named canPlaceAtLnet/minecraft/block/AbstractBlock;canPlaceAt(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Zintermediary method_9558Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Zofficial aLdwx;a(Ldwy;Ldgm;Lji;)Z
-
scheduledTick
Called server-side when a block receives a scheduled tick. This can be used like a timer. Scheduled ticks are added usingScheduledTickView.scheduleBlockTick(BlockPos, Block, int).Scheduled ticks are often used inside
AbstractBlock.getStateForNeighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.world.tick.ScheduledTickView, net.minecraft.util.math.BlockPos, net.minecraft.util.math.Direction, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.util.math.random.Random).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 classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named scheduledTickLnet/minecraft/block/AbstractBlock;scheduledTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Vintermediary method_9588Lnet/minecraft/class_4970;method_9588(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vofficial aLdwx;a(Ldwy;Lard;Lji;Lazh;)V
-
canAttachTo
- Mappings:
Namespace Name Mixin selector named canAttachToLnet/minecraft/block/AbstractPlantPartBlock;canAttachTo(Lnet/minecraft/block/BlockState;)Zintermediary method_24947Lnet/minecraft/class_4863;method_24947(Lnet/minecraft/class_2680;)Zofficial oLdnb;o(Ldwy;)Z
-
getOutlineShape
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named getOutlineShapeLnet/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_9530Lnet/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 aLdwx;a(Ldwy;Ldfo;Lji;Lfbg;)Lfbv;
-
getStem
- Mappings:
Namespace Name Mixin selector named getStemLnet/minecraft/block/AbstractPlantPartBlock;getStem()Lnet/minecraft/block/AbstractPlantStemBlock;intermediary method_24945Lnet/minecraft/class_4863;method_24945()Lnet/minecraft/class_4865;official cLdnb;c()Ldnd;
-
getPlant
- Mappings:
Namespace Name Mixin selector named getPlantLnet/minecraft/block/AbstractPlantPartBlock;getPlant()Lnet/minecraft/block/Block;intermediary method_24946Lnet/minecraft/class_4863;method_24946()Lnet/minecraft/class_2248;official bLdnb;b()Ldjn;
-