Package net.minecraft.block
Class SweetBerryBushBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.PlantBlock
net.minecraft.block.SweetBerryBushBlock
- All Implemented Interfaces:
Fertilizable,ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name named net/minecraft/block/SweetBerryBushBlockintermediary net/minecraft/class_3830official doc
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroupNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.Offsetter, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>Nested classes/interfaces inherited from interface net.minecraft.block.Fertilizable
Fertilizable.FertilizableType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntPropertystatic final com.mojang.serialization.MapCodec<SweetBerryBushBlock> private static final VoxelShapestatic final intprivate static final floatprivate static final VoxelShapeFields inherited from class net.minecraft.block.Block
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, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableKey, randomTicks, requiredFeatures, resistance, settings, slipperiness, soundGroup, velocityMultiplierFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.booleancanGrow(World world, Random random, BlockPos pos, BlockState state) com.mojang.serialization.MapCodec<SweetBerryBushBlock> getCodec()protected VoxelShapegetOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) getPickStack(WorldView world, BlockPos pos, BlockState state) Returns the new item stack when using pick block functionality.voidgrow(ServerWorld world, Random random, BlockPos pos, BlockState state) protected booleanhasRandomTicks(BlockState state) booleanisFertilizable(WorldView world, BlockPos pos, BlockState state) protected voidonEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) Called when the entity's collision box intersects the block.protected ActionResultonUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) protected ItemActionResultonUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) protected voidrandomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block gets ticked randomly.Methods inherited from class net.minecraft.block.PlantBlock
canPathfindThrough, canPlaceAt, canPlantOnTop, getStateForNeighborUpdate, isTransparentMethods inherited from class net.minecraft.block.Block
afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPlacementState, 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, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, rotate, scheduledTickMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.block.Fertilizable
getFertilizableType, getFertilizeParticlePosMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/block/SweetBerryBushBlock;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_46468Lnet/minecraft/class_3830;field_46468:Lcom/mojang/serialization/MapCodec;official aLdoc;a:Lcom/mojang/serialization/MapCodec;
-
MIN_MOVEMENT_FOR_DAMAGE
private static final float MIN_MOVEMENT_FOR_DAMAGE- See Also:
- Mappings:
Namespace Name Mixin selector named MIN_MOVEMENT_FOR_DAMAGELnet/minecraft/block/SweetBerryBushBlock;MIN_MOVEMENT_FOR_DAMAGE:Fintermediary field_31260Lnet/minecraft/class_3830;field_31260:Fofficial dLdoc;d:F
-
MAX_AGE
public static final int MAX_AGE- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_AGELnet/minecraft/block/SweetBerryBushBlock;MAX_AGE:Iintermediary field_31259Lnet/minecraft/class_3830;field_31259:Iofficial bLdoc;b:I
-
AGE
- Mappings:
Namespace Name Mixin selector named AGELnet/minecraft/block/SweetBerryBushBlock;AGE:Lnet/minecraft/state/property/IntProperty;intermediary field_17000Lnet/minecraft/class_3830;field_17000:Lnet/minecraft/class_2758;official cLdoc;c:Lduc;
-
SMALL_SHAPE
- Mappings:
Namespace Name Mixin selector named SMALL_SHAPELnet/minecraft/block/SweetBerryBushBlock;SMALL_SHAPE:Lnet/minecraft/util/shape/VoxelShape;intermediary field_17001Lnet/minecraft/class_3830;field_17001:Lnet/minecraft/class_265;official eLdoc;e:Lexv;
-
LARGE_SHAPE
- Mappings:
Namespace Name Mixin selector named LARGE_SHAPELnet/minecraft/block/SweetBerryBushBlock;LARGE_SHAPE:Lnet/minecraft/util/shape/VoxelShape;intermediary field_17002Lnet/minecraft/class_3830;field_17002:Lnet/minecraft/class_265;official fLdoc;f:Lexv;
-
-
Constructor Details
-
SweetBerryBushBlock
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vofficial <init>Ldtb;<init>(Ldtb$d;)V
-
-
Method Details
-
getCodec
- Specified by:
getCodecin classPlantBlock- 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 aLdtb;a()Lcom/mojang/serialization/MapCodec;
-
getPickStack
Returns the new item stack when using pick block functionality.Pick block is available via middle-clicking by default. Blocks without the corresponding
BlockItem, such as crops, should override this method to return the correct item stack.- Overrides:
getPickStackin classBlock- Returns:
- the new item stack when using pick block functionality
- Mappings:
Namespace Name Mixin selector named getPickStackLnet/minecraft/block/Block;getPickStack(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;intermediary method_9574Lnet/minecraft/class_2248;method_9574(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_1799;official aLdfy;a(Ldcz;Ljd;Ldtc;)Lcuq;
-
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 aLdtb;a(Ldtc;Ldcc;Ljd;Lexh;)Lexv;
-
hasRandomTicks
- Overrides:
hasRandomTicksin classAbstractBlock- Mappings:
Namespace Name Mixin selector named hasRandomTicksLnet/minecraft/block/AbstractBlock;hasRandomTicks(Lnet/minecraft/block/BlockState;)Zintermediary method_9542Lnet/minecraft/class_4970;method_9542(Lnet/minecraft/class_2680;)Zofficial d_Ldtb;d_(Ldtc;)Z
-
randomTick
Called server-side when a block gets ticked randomly. This can be overridden to implement various logics, most commonly plant growth. Default implementation does nothing. To control the rate of the action, userandom.Random tick speed is controlled by the game rule
randomTickSpeedand can be disabled. Only blocks within 128-block cylinder (i.e. ignoring Y coordinates) around players receive random ticks.Blocks overriding this must use
AbstractBlock.Settings.ticksRandomly()block settings.Here are some examples:
SugarCaneBlockuses this to grow sugar cane.OxidizableBlockuses this to oxidize.NetherPortalBlockuses this to spawn zombified piglins.LeavesBlockuses this to decay when far from logs.
- Overrides:
randomTickin classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named randomTickLnet/minecraft/block/AbstractBlock;randomTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Vintermediary method_9514Lnet/minecraft/class_4970;method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vofficial bLdtb;b(Ldtc;Laqu;Ljd;Layw;)V
-
onEntityCollision
Called when the entity's collision box intersects the block. Therefore, this method is not called for blocks with a collision; useBlock.onSteppedOn(net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState, net.minecraft.entity.Entity)for those blocks.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.Here are some examples:
CactusBlockdamages the entity.AbstractPressurePlateBlocktriggers.CobwebBlockslows the entity.EndPortalBlockteleports the entity.HopperBlockcollects the item entity.
- Overrides:
onEntityCollisionin classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named onEntityCollisionLnet/minecraft/block/AbstractBlock;onEntityCollision(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/Entity;)Vintermediary method_9548Lnet/minecraft/class_4970;method_9548(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;)Vofficial aLdtb;a(Ldtc;Ldcw;Ljd;Lbsr;)V
-
onUseWithItem
protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) - Overrides:
onUseWithItemin classAbstractBlock- Mappings:
Namespace Name Mixin selector named onUseWithItemLnet/minecraft/block/AbstractBlock;onUseWithItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ItemActionResult;intermediary method_55765Lnet/minecraft/class_4970;method_55765(Lnet/minecraft/class_1799;Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_3965;)Lnet/minecraft/class_9062;official aLdtb;a(Lcuq;Ldtc;Ldcw;Ljd;Lcmx;Lbqq;Lewy;)Lbqt;
-
onUse
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) - Overrides:
onUsein classAbstractBlock- Mappings:
Namespace Name Mixin selector named onUseLnet/minecraft/block/AbstractBlock;onUse(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/hit/BlockHitResult;)Lnet/minecraft/util/ActionResult;intermediary method_55766Lnet/minecraft/class_4970;method_55766(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_3965;)Lnet/minecraft/class_1269;official aLdtb;a(Ldtc;Ldcw;Ljd;Lcmx;Lewy;)Lbqr;
-
appendProperties
Appends block state properties to this block. To use this, override and callStateManager.Builder.add(net.minecraft.state.property.Property<?>[])inside the method. SeePropertiesfor the list of pre-defined properties.- Overrides:
appendPropertiesin classBlock- Mappings:
Namespace Name Mixin selector named appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vofficial aLdfy;a(Ldtd$a;)V
-
isFertilizable
- Specified by:
isFertilizablein interfaceFertilizable- Mappings:
Namespace Name Mixin selector named isFertilizableLnet/minecraft/block/Fertilizable;isFertilizable(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Zintermediary method_9651Lnet/minecraft/class_2256;method_9651(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Zofficial bLdgb;b(Ldcz;Ljd;Ldtc;)Z
-
canGrow
- Specified by:
canGrowin interfaceFertilizable- Mappings:
Namespace Name Mixin selector named canGrowLnet/minecraft/block/Fertilizable;canGrow(Lnet/minecraft/world/World;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Zintermediary method_9650Lnet/minecraft/class_2256;method_9650(Lnet/minecraft/class_1937;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Zofficial aLdgb;a(Ldcw;Layw;Ljd;Ldtc;)Z
-
grow
- Specified by:
growin interfaceFertilizable- Mappings:
Namespace Name Mixin selector named growLnet/minecraft/block/Fertilizable;grow(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_9652Lnet/minecraft/class_2256;method_9652(Lnet/minecraft/class_3218;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial aLdgb;a(Laqu;Layw;Ljd;Ldtc;)V
-