Class class_9566
- All Implemented Interfaces:
FluidDrainable,FluidFillable,Waterloggable,ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name official dnointermediary net/minecraft/class_9566named net/minecraft/class_9566
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordprivate static final recordNested 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 TypeFieldDescriptionprivate static final List<class_9566.class_9568> static final com.mojang.serialization.MapCodec<class_9566> static final BooleanPropertystatic final class_9566.class_9568Fields inherited from class net.minecraft.block.ConnectingBlock
DOWN, EAST, FACING_PROPERTIES, facingsToShape, NORTH, SOUTH, UP, WESTFields 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, stateManagerFields inherited from class net.minecraft.block.AbstractBlock
collidable, DIRECTIONS, dynamicBounds, jumpVelocityMultiplier, lootTableId, 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.protected booleancanPathfindThrough(BlockState state, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.com.mojang.serialization.MapCodec<class_9566> getCodec()protected FluidStategetFluidState(BlockState state) Returns the state's associated fluid state.protected BlockStategetStateForNeighborUpdate(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.protected booleanhasRandomTicks(BlockState state) private static @Nullable class_9566.class_9567method_59148(ServerWorld serverWorld, BlockPos blockPos) method_59149(ServerWorld serverWorld, BlockPos blockPos, Random random) method_59151(ServerWorld serverWorld, BlockPos blockPos, BlockState blockState, Random random) static BlockStatemethod_59152(BlockView blockView, BlockPos blockPos, BlockState blockState) static booleanmethod_59156(BlockState blockState) 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.ConnectingBlock
getConnectionMask, getOutlineShape, 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, getPickStack, getRawIdFromState, getRegistryEntry, getShapesForStates, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, method_59110, 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, canPlaceAt, canReplace, createCodec, createScreenHandlerFactory, createSettingsCodec, emitsRedstonePower, getAmbientOcclusionLightLevel, getCameraCollisionShape, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getHardness, getLootTableId, getMaxHorizontalModelOffset, getOpacity, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStrongRedstonePower, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasSidedTransparency, isCullingShapeFullCube, isShapeFullCube, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, onUseWithItem, 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
isEnabledMethods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getBucketFillSound, tryDrainFluid, tryFillWithFluid
-
Field Details
-
field_50889
- Mappings:
Namespace Name Mixin selector official aLdno;a:Lbok;intermediary field_50889Lnet/minecraft/class_9566;field_50889:Lnet/minecraft/class_6005;named field_50889Lnet/minecraft/class_9566;field_50889:Lnet/minecraft/util/collection/DataPool;
-
field_50890
- Mappings:
Namespace Name Mixin selector official jLdno;j:Lcom/mojang/serialization/MapCodec;intermediary field_50890Lnet/minecraft/class_9566;field_50890:Lcom/mojang/serialization/MapCodec;named field_50890Lnet/minecraft/class_9566;field_50890:Lcom/mojang/serialization/MapCodec;
-
field_50891
- Mappings:
Namespace Name Mixin selector official kLdno;k:Ldtt;intermediary field_50891Lnet/minecraft/class_9566;field_50891:Lnet/minecraft/class_2746;named field_50891Lnet/minecraft/class_9566;field_50891:Lnet/minecraft/state/property/BooleanProperty;
-
field_50894
- Mappings:
Namespace Name Mixin selector official nLdno;n:Ljava/util/function/Supplier;intermediary field_50894Lnet/minecraft/class_9566;field_50894:Ljava/util/function/Supplier;named field_50894Lnet/minecraft/class_9566;field_50894:Ljava/util/function/Supplier;
-
field_50895
- Mappings:
Namespace Name Mixin selector official oLdno;o:Ljava/util/function/Supplier;intermediary field_50895Lnet/minecraft/class_9566;field_50895:Ljava/util/function/Supplier;named field_50895Lnet/minecraft/class_9566;field_50895:Ljava/util/function/Supplier;
-
field_50887
- Mappings:
Namespace Name Mixin selector official FLdno;F:Ljava/util/function/Supplier;intermediary field_50887Lnet/minecraft/class_9566;field_50887:Ljava/util/function/Supplier;named field_50887Lnet/minecraft/class_9566;field_50887:Ljava/util/function/Supplier;
-
field_50892
- Mappings:
Namespace Name Mixin selector official lLdno;l:Lbok;intermediary field_50892Lnet/minecraft/class_9566;field_50892:Lnet/minecraft/class_6005;named field_50892Lnet/minecraft/class_9566;field_50892:Lnet/minecraft/util/collection/DataPool;
-
field_50893
- Mappings:
Namespace Name Mixin selector official mLdno;m:Ldno$b;intermediary field_50893Lnet/minecraft/class_9566;field_50893:Lnet/minecraft/class_9566$class_9568;named field_50893Lnet/minecraft/class_9566;field_50893:Lnet/minecraft/class_9566$class_9568;
-
field_50888
- Mappings:
Namespace Name Mixin selector official GLdno;G:Ljava/util/List;intermediary field_50888Lnet/minecraft/class_9566;field_50888:Ljava/util/List;named field_50888Lnet/minecraft/class_9566;field_50888:Ljava/util/List;
-
-
Constructor Details
-
class_9566
- Mappings:
Namespace Name Mixin selector official <init>Ldtb;<init>(Ldtb$d;)Vintermediary <init>Lnet/minecraft/class_4970;<init>(Lnet/minecraft/class_4970$class_2251;)Vnamed <init>Lnet/minecraft/block/AbstractBlock;<init>(Lnet/minecraft/block/AbstractBlock$Settings;)V
-
-
Method Details
-
getCodec
- Specified by:
getCodecin classConnectingBlock- Mappings:
Namespace Name Mixin selector official aLdtb;a()Lcom/mojang/serialization/MapCodec;intermediary method_53969Lnet/minecraft/class_4970;method_53969()Lcom/mojang/serialization/MapCodec;named getCodecLnet/minecraft/block/AbstractBlock;getCodec()Lcom/mojang/serialization/MapCodec;
-
getPlacementState
- Overrides:
getPlacementStatein classBlock- Mappings:
Namespace Name Mixin selector official aLdfc;a(Lcyd;)Ldtc;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;
-
method_59152
public static BlockState method_59152(BlockView blockView, BlockPos blockPos, BlockState blockState) - Mappings:
Namespace Name Mixin selector official aLdno;a(Ldbg;Lir;Ldtc;)Ldtc;intermediary method_59152Lnet/minecraft/class_9566;method_59152(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680;named method_59152Lnet/minecraft/class_9566;method_59152(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
method_59151
private static Optional<BlockPos> method_59151(ServerWorld serverWorld, BlockPos blockPos, BlockState blockState, Random random) - Mappings:
Namespace Name Mixin selector official aLdno;a(Laqt;Lir;Ldtc;Layt;)Ljava/util/Optional;intermediary method_59151Lnet/minecraft/class_9566;method_59151(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_5819;)Ljava/util/Optional;named method_59151Lnet/minecraft/class_9566;method_59151(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/random/Random;)Ljava/util/Optional;
-
method_59148
@Nullable private static @Nullable class_9566.class_9567 method_59148(ServerWorld serverWorld, BlockPos blockPos) - Mappings:
Namespace Name Mixin selector official aLdno;a(Laqt;Lir;)Ldno$a;intermediary method_59148Lnet/minecraft/class_9566;method_59148(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)Lnet/minecraft/class_9566$class_9567;named method_59148Lnet/minecraft/class_9566;method_59148(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/class_9566$class_9567;
-
method_59149
@Nullable public static @Nullable List<ItemStack> method_59149(ServerWorld serverWorld, BlockPos blockPos, Random random) - Mappings:
Namespace Name Mixin selector official aLdno;a(Laqt;Lir;Layt;)Ljava/util/List;intermediary method_59149Lnet/minecraft/class_9566;method_59149(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Ljava/util/List;named method_59149Lnet/minecraft/class_9566;method_59149(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Ljava/util/List;
-
method_59156
- Mappings:
Namespace Name Mixin selector official nLdno;n(Ldtc;)Zintermediary method_59156Lnet/minecraft/class_9566;method_59156(Lnet/minecraft/class_2680;)Znamed method_59156Lnet/minecraft/class_9566;method_59156(Lnet/minecraft/block/BlockState;)Z
-
getStateForNeighborUpdate
protected 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 classAbstractBlock- 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:
- Mappings:
Namespace Name Mixin selector official aLdtb;a(Ldtc;Liw;Ldtc;Ldcb;Lir;Lir;)Ldtc;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;
-
hasRandomTicks
- Overrides:
hasRandomTicksin classAbstractBlock- Mappings:
Namespace Name Mixin selector official d_Ldtb;d_(Ldtc;)Zintermediary method_9542Lnet/minecraft/class_4970;method_9542(Lnet/minecraft/class_2680;)Znamed hasRandomTicksLnet/minecraft/block/AbstractBlock;hasRandomTicks(Lnet/minecraft/block/BlockState;)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 official bLdtb;b(Ldtc;Laqt;Lir;Layt;)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
-
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 official aLdfc;a(Ldtd$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
-
getFluidState
Returns the state's associated fluid state.Waterloggable blocks must override this to return
Fluids.WATER.getStill(false)when waterlogged.- Overrides:
getFluidStatein classAbstractBlock- Returns:
- the state's associated fluid state
- See Also:
- Mappings:
Namespace Name Mixin selector official b_Ldtb;b_(Ldtc;)Lepe;intermediary method_9545Lnet/minecraft/class_4970;method_9545(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;named getFluidStateLnet/minecraft/block/AbstractBlock;getFluidState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/FluidState;
-