Class class_8237
- All Implemented Interfaces:
Fertilizable,ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name official culintermediary net/minecraft/class_8237named net/minecraft/class_8237
-
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> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntPropertystatic final intprivate static final intprivate static final intprivate static final intprivate static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapeprivate static final VoxelShapeFields inherited from class net.minecraft.block.TallPlantBlock
HALFFields inherited from class net.minecraft.block.Block
field_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, SKIP_LIGHTING_UPDATES, STATE_IDS, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, material, 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) booleancanPlaceAt(BlockState state, WorldView world, BlockPos pos) Returns whether the block can be placed atpos.protected booleancanPlantOnTop(BlockState floor, BlockView world, BlockPos pos) booleancanReplace(BlockState state, ItemPlacementContext context) Returns whether the item can replace the block.getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.voidgrow(ServerWorld world, Random random, BlockPos pos, BlockState state) booleanhasRandomTicks(BlockState state) booleanisFertilizable(WorldView world, BlockPos pos, BlockState state, boolean isClient) private voidmethod_49819(ServerWorld serverWorld, BlockState blockState, BlockPos blockPos, int int2) private static booleanmethod_49820(ServerWorld serverWorld, BlockPos blockPos) private booleanmethod_49821(BlockState blockState) voidonPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.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.TallPlantBlock
afterBreak, getRenderingSeed, onBreak, onBreakInCreative, placeAt, withWaterloggedStateMethods inherited from class net.minecraft.block.PlantBlock
canPathfindThrough, isTransparentMethods inherited from class net.minecraft.block.Block
appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, spawnBreakParticles, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getPistonBehavior, getRaycastShape, getRenderType, getRequiredFeatures, getSidesShape, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, rotate, scheduledTickMethods 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
-
field_43239
- Mappings:
Namespace Name Mixin selector official bLcul;b:Ldcn;intermediary field_43239Lnet/minecraft/class_8237;field_43239:Lnet/minecraft/class_2758;named field_43239Lnet/minecraft/class_8237;field_43239:Lnet/minecraft/state/property/IntProperty;
-
field_43240
public static final int field_43240- See Also:
- Mappings:
Namespace Name Mixin selector official cLcul;c:Iintermediary field_43240Lnet/minecraft/class_8237;field_43240:Inamed field_43240Lnet/minecraft/class_8237;field_43240:I
-
field_43241
private static final int field_43241- See Also:
- Mappings:
Namespace Name Mixin selector official dLcul;d:Iintermediary field_43241Lnet/minecraft/class_8237;field_43241:Inamed field_43241Lnet/minecraft/class_8237;field_43241:I
-
field_43242
private static final int field_43242- See Also:
- Mappings:
Namespace Name Mixin selector official eLcul;e:Iintermediary field_43242Lnet/minecraft/class_8237;field_43242:Inamed field_43242Lnet/minecraft/class_8237;field_43242:I
-
field_43243
private static final int field_43243- See Also:
- Mappings:
Namespace Name Mixin selector official fLcul;f:Iintermediary field_43243Lnet/minecraft/class_8237;field_43243:Inamed field_43243Lnet/minecraft/class_8237;field_43243:I
-
field_43244
- Mappings:
Namespace Name Mixin selector official gLcul;g:Leeb;intermediary field_43244Lnet/minecraft/class_8237;field_43244:Lnet/minecraft/class_265;named field_43244Lnet/minecraft/class_8237;field_43244:Lnet/minecraft/util/shape/VoxelShape;
-
field_43245
- Mappings:
Namespace Name Mixin selector official hLcul;h:Leeb;intermediary field_43245Lnet/minecraft/class_8237;field_43245:Lnet/minecraft/class_265;named field_43245Lnet/minecraft/class_8237;field_43245:Lnet/minecraft/util/shape/VoxelShape;
-
field_43246
- Mappings:
Namespace Name Mixin selector official iLcul;i:Leeb;intermediary field_43246Lnet/minecraft/class_8237;field_43246:Lnet/minecraft/class_265;named field_43246Lnet/minecraft/class_8237;field_43246:Lnet/minecraft/util/shape/VoxelShape;
-
field_43247
- Mappings:
Namespace Name Mixin selector official jLcul;j:Leeb;intermediary field_43247Lnet/minecraft/class_8237;field_43247:Lnet/minecraft/class_265;named field_43247Lnet/minecraft/class_8237;field_43247:Lnet/minecraft/util/shape/VoxelShape;
-
-
Constructor Details
-
class_8237
-
-
Method Details
-
method_49821
- Mappings:
Namespace Name Mixin selector official hLcul;h(Ldbm;)Zintermediary method_49821Lnet/minecraft/class_8237;method_49821(Lnet/minecraft/class_2680;)Znamed method_49821Lnet/minecraft/class_8237;method_49821(Lnet/minecraft/block/BlockState;)Z
-
hasRandomTicks
- Overrides:
hasRandomTicksin classBlock- Mappings:
Namespace Name Mixin selector official e_Lcoz;e_(Ldbm;)Zintermediary method_9542Lnet/minecraft/class_2248;method_9542(Lnet/minecraft/class_2680;)Znamed hasRandomTicksLnet/minecraft/block/Block;hasRandomTicks(Lnet/minecraft/block/BlockState;)Z
-
getPlacementState
- Overrides:
getPlacementStatein classTallPlantBlock- Mappings:
Namespace Name Mixin selector official aLcoz;a(Lcht;)Ldbm;intermediary method_9605Lnet/minecraft/class_2248;method_9605(Lnet/minecraft/class_1750;)Lnet/minecraft/class_2680;named getPlacementStateLnet/minecraft/block/Block;getPlacementState(Lnet/minecraft/item/ItemPlacementContext;)Lnet/minecraft/block/BlockState;
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) Returns the state of the block after a neighboring block's state change.Returning
Blocks.AIRbreaks the block. This is useful to implement supporting block requirement for blocks (if used along withAbstractBlock.canPlaceAt(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.util.math.BlockPos)).Side effects like activating a redstone component (but not scheduling a tick) should be performed in
AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)instead. If the block supports waterlogging and currently has water, this method should be overridden to tick the fluid at the block's position.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. This is not called ifBlock.FORCE_STATEflag is set in thesetBlockStatecall.This method can be used for multiple purposes. Here are some examples:
FenceBlockuses it to update the fence's connection when a horizontally neighboring block's state is changed.PlantBlockuses it to break the plant if the state change causes it to lose its supporting block.DoorBlockuses it to copy the state of the other half of the door.SlabBlockuses it to schedule the fluid to tick if waterlogged.SoulSandBlockuses it to schedule the water block above to tick so that it becomes a bubble column.FallingBlockuses it to schedule the block to tick so that it can fall if needed.
- Overrides:
getStateForNeighborUpdatein classTallPlantBlock- Parameters:
state- the state of this blockdirection- the direction from this block to the neighborneighborState- the state of the updated neighbor blockworld- the worldpos- the position of this blockneighborPos- the position of the neighbor block- Returns:
- the state of the block after a neighboring block's state change
- See Also:
-
AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.util.math.BlockPos, boolean)AbstractBlock.prepare(net.minecraft.block.BlockState, net.minecraft.world.WorldAccess, net.minecraft.util.math.BlockPos, int, int)AbstractBlock.canPlaceAt(net.minecraft.block.BlockState, net.minecraft.world.WorldView, net.minecraft.util.math.BlockPos)Block.FORCE_STATE
- Mappings:
Namespace Name Mixin selector official aLdbl;a(Ldbm;Lgz;Ldbm;Lclz;Lgt;Lgt;)Ldbm;intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Lnet/minecraft/class_2680;named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/Direction;Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/BlockState;
-
getCollisionShape
public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getCollisionShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official cLdbl;c(Ldbm;Lcle;Lgt;Ledn;)Leeb;intermediary method_9549Lnet/minecraft/class_4970;method_9549(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;named getCollisionShapeLnet/minecraft/block/AbstractBlock;getCollisionShape(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/ShapeContext;)Lnet/minecraft/util/shape/VoxelShape;
-
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
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 classTallPlantBlock- Returns:
- whether the block can be placed at
pos - See Also:
- Mappings:
Namespace Name Mixin selector official aLdbl;a(Ldbm;Lcmb;Lgt;)Zintermediary method_9558Lnet/minecraft/class_4970;method_9558(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Znamed canPlaceAtLnet/minecraft/block/AbstractBlock;canPlaceAt(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-
canPlantOnTop
- Overrides:
canPlantOnTopin classPlantBlock- Mappings:
Namespace Name Mixin selector official dLcph;d(Ldbm;Lcle;Lgt;)Zintermediary method_9695Lnet/minecraft/class_2261;method_9695(Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Znamed canPlantOnTopLnet/minecraft/block/PlantBlock;canPlantOnTop(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Z
-
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 classTallPlantBlock- Mappings:
Namespace Name Mixin selector official aLcoz;a(Ldbn$a;)Vintermediary method_9515Lnet/minecraft/class_2248;method_9515(Lnet/minecraft/class_2689$class_2690;)Vnamed appendPropertiesLnet/minecraft/block/Block;appendProperties(Lnet/minecraft/state/StateManager$Builder;)V
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) - Overrides:
getOutlineShapein classAbstractBlock- Mappings:
Namespace Name Mixin selector official aLdbl;a(Ldbm;Lcle;Lgt;Ledn;)Leeb;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;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;
-
canReplace
Returns whether the item can replace the block.By default, this checks if the block's material allows replacing and whether the item differs from the block's item. Items composed of multiple blocks, such as candles, vines, or snow layers, should override this to implement additional checks.
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:
canReplacein classAbstractBlock- Returns:
- whether the item can replace the block
- See Also:
- Mappings:
Namespace Name Mixin selector official aLdbl;a(Ldbm;Lcht;)Zintermediary method_9616Lnet/minecraft/class_4970;method_9616(Lnet/minecraft/class_2680;Lnet/minecraft/class_1750;)Znamed canReplaceLnet/minecraft/block/AbstractBlock;canReplace(Lnet/minecraft/block/BlockState;Lnet/minecraft/item/ItemPlacementContext;)Z
-
onPlaced
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) Called when the player placed the block.Tall or wide blocks (such as doors or beds) should override this to place the other half of the block. Blocks with block entities can use this to copy the data from the item stack, such as the custom name.
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:
onPlacedin classTallPlantBlock- See Also:
- Mappings:
Namespace Name Mixin selector official aLcoz;a(Lcly;Lgt;Ldbm;Lbfm;Lcfl;)Vintermediary method_9567Lnet/minecraft/class_2248;method_9567(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Vnamed onPlacedLnet/minecraft/block/Block;onPlaced(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
-
randomTick
Called server-side when a block gets ticked randomly. This can be overridden to implement various logics, most commonly plant growth. Default implementation callsAbstractBlock.scheduledTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random). 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 official bLdbl;b(Ldbm;Laib;Lgt;Lapa;)Vintermediary method_9514Lnet/minecraft/class_4970;method_9514(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vnamed 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;)V
-
method_49819
private void method_49819(ServerWorld serverWorld, BlockState blockState, BlockPos blockPos, int int2) - Mappings:
Namespace Name Mixin selector official aLcul;a(Laib;Ldbm;Lgt;I)Vintermediary method_49819Lnet/minecraft/class_8237;method_49819(Lnet/minecraft/class_3218;Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;I)Vnamed method_49819Lnet/minecraft/class_8237;method_49819(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;I)V
-
method_49820
- Mappings:
Namespace Name Mixin selector official aLcul;a(Laib;Lgt;)Zintermediary method_49820Lnet/minecraft/class_8237;method_49820(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)Znamed method_49820Lnet/minecraft/class_8237;method_49820(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)Z
-
isFertilizable
- Specified by:
isFertilizablein interfaceFertilizable- Mappings:
Namespace Name Mixin selector official aLcpb;a(Lcmb;Lgt;Ldbm;Z)Zintermediary method_9651Lnet/minecraft/class_2256;method_9651(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Znamed isFertilizableLnet/minecraft/block/Fertilizable;isFertilizable(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Z
-
canGrow
- Specified by:
canGrowin interfaceFertilizable- Mappings:
Namespace Name Mixin selector official aLcpb;a(Lcly;Lapa;Lgt;Ldbm;)Zintermediary method_9650Lnet/minecraft/class_2256;method_9650(Lnet/minecraft/class_1937;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Znamed canGrowLnet/minecraft/block/Fertilizable;canGrow(Lnet/minecraft/world/World;Lnet/minecraft/util/math/random/Random;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Z
-
grow
- Specified by:
growin interfaceFertilizable- Mappings:
Namespace Name Mixin selector official aLcpb;a(Laib;Lapa;Lgt;Ldbm;)Vintermediary method_9652Lnet/minecraft/class_2256;method_9652(Lnet/minecraft/class_3218;Lnet/minecraft/class_5819;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed 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;)V
-