Class class_11198
- All Implemented Interfaces:
FluidDrainable,FluidFillable,Waterloggable,ItemConvertible,ToggleableFeature
- Mappings:
Namespace Name named net/minecraft/class_11198intermediary net/minecraft/class_11198official dql
-
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 TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<class_11198> static final intstatic final IntPropertystatic final BooleanPropertystatic final intprivate static final VoxelShapeFields inherited from class net.minecraft.block.HorizontalFacingBlock
FACINGFields inherited from class net.minecraft.block.Block
CODEC, field_31023, field_31024, field_31025, FORCE_STATE, FORCE_STATE_AND_SKIP_CALLBACKS_AND_DROPS, MOVED, NO_REDRAW, NOTIFY_ALL, NOTIFY_ALL_AND_REDRAW, NOTIFY_LISTENERS, NOTIFY_NEIGHBORS, REDRAW_ON_MAIN_THREAD, SKIP_BLOCK_ADDED_CALLBACK, SKIP_BLOCK_ENTITY_REPLACED_CALLBACK, SKIP_DROPS, SKIP_REDRAW_AND_BLOCK_ENTITY_REPLACED_CALLBACK, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendProperties(StateManager.Builder<Block, BlockState> builder) Appends block state properties to this block.booleancanFillWithFluid(@Nullable LivingEntity filler, BlockView world, BlockPos pos, BlockState state, Fluid fluid) booleancanPathfindThrough(BlockState state, NavigationType type) Returns if an entity using navigation typetypecan navigate through this block.com.mojang.serialization.MapCodec<class_11198> getCodec()protected FluidStategetFluidState(BlockState state) Returns the state's associated fluid state.getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) protected BlockStategetStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) Returns the state of the block after a neighboring block's state change.private voidmethod_70746(ServerWorld serverWorld, BlockPos blockPos, BlockState blockState) private voidmethod_70747(BlockState blockState, ServerWorld serverWorld, BlockPos blockPos, Random random) intmethod_70748(BlockState blockState) private booleanmethod_70749(BlockState blockState) voidonBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) Called server-side on the new block when the block state is changed.voidrandomDisplayTick(BlockState state, World world, BlockPos pos, Random random) Called randomly on the client.protected voidrandomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block gets ticked randomly.protected voidscheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) Called server-side when a block receives a scheduled tick.booleantryFillWithFluid(WorldAccess world, BlockPos pos, BlockState state, FluidState fluidState) Methods inherited from class net.minecraft.block.HorizontalFacingBlock
mirror, rotateMethods inherited from class net.minecraft.block.Block
afterBreak, asBlock, asItem, canMobSpawnInside, cannotConnect, createColumnShape, createColumnShape, createCubeShape, createCuboidShape, createCuboidShape, createCuboidZShape, createCuboidZShape, createCuboidZShape, createShapeArray, createShapeFunction, createShapeFunction, dropExperience, dropExperienceWhenMined, dropStack, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getRawIdFromState, getRegistryEntry, getSlipperiness, getStateFromRawId, getStateManager, getStateWithProperties, getVelocityMultiplier, hasDynamicBounds, hasTopRim, isFaceFullSquare, isShapeFullCube, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, 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, getInsideCollisionShape, getLootTableKey, getMaxHorizontalModelOffset, getOpacity, getPickStack, getRaycastShape, getRenderingSeed, getRenderType, getRequiredFeatures, getSettings, getSidesShape, getSoundGroup, getStrongRedstonePower, getTranslationKey, getVerticalModelOffsetMultiplier, getWeakRedstonePower, hasComparatorOutput, hasRandomTicks, hasSidedTransparency, isShapeFullCube, isSideInvisible, isTransparent, neighborUpdate, onBlockBreakStart, onEntityCollision, onExploded, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, onUseWithItem, prepareMethods 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
getBucketFillSound, tryDrainFluid
-
Field Details
-
field_59753
- Mappings:
Namespace Name Mixin selector named field_59753Lnet/minecraft/class_11198;field_59753:Lcom/mojang/serialization/MapCodec;intermediary field_59753Lnet/minecraft/class_11198;field_59753:Lcom/mojang/serialization/MapCodec;official aLdql;a:Lcom/mojang/serialization/MapCodec;
-
field_59754
public static final int field_59754- See Also:
- Mappings:
Namespace Name Mixin selector named field_59754Lnet/minecraft/class_11198;field_59754:Iintermediary field_59754Lnet/minecraft/class_11198;field_59754:Iofficial bLdql;b:I
-
field_59755
- Mappings:
Namespace Name Mixin selector named field_59755Lnet/minecraft/class_11198;field_59755:Lnet/minecraft/state/property/IntProperty;intermediary field_59755Lnet/minecraft/class_11198;field_59755:Lnet/minecraft/class_2758;official cLdql;c:Ledc;
-
field_59756
- Mappings:
Namespace Name Mixin selector named field_59756Lnet/minecraft/class_11198;field_59756:Lnet/minecraft/state/property/BooleanProperty;intermediary field_59756Lnet/minecraft/class_11198;field_59756:Lnet/minecraft/class_2746;official dLdql;d:Lect;
-
field_59757
public static final int field_59757- See Also:
- Mappings:
Namespace Name Mixin selector named field_59757Lnet/minecraft/class_11198;field_59757:Iintermediary field_59757Lnet/minecraft/class_11198;field_59757:Iofficial eLdql;e:I
-
field_59758
- Mappings:
Namespace Name Mixin selector named field_59758Lnet/minecraft/class_11198;field_59758:Lnet/minecraft/util/shape/VoxelShape;intermediary field_59758Lnet/minecraft/class_11198;field_59758:Lnet/minecraft/class_265;official gLdql;g:Lfhi;
-
-
Constructor Details
-
class_11198
- 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>Lecb;<init>(Lecb$d;)V
-
-
Method Details
-
getCodec
- Specified by:
getCodecin classHorizontalFacingBlock- 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 aLecb;a()Lcom/mojang/serialization/MapCodec;
-
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 aLdoa;a(Lecd$a;)V
-
getStateForNeighborUpdate
protected BlockState getStateForNeighborUpdate(BlockState state, WorldView world, ScheduledTickView tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, Random random) Returns the state of the block after a neighboring block's state change.Returning
breaks the block. This is useful to implement supporting block requirement for blocks (if used along withinvalid reference
Blocks#AIRAbstractBlock.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.world.block.WireOrientation, 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:
-
uses it to update the fence's connection when a horizontally neighboring block's state is changed.
invalid reference
FenceBlock -
uses it to break the plant if the state change causes it to lose its supporting block.
invalid reference
PlantBlock -
uses it to copy the state of the other half of the door.
invalid reference
DoorBlock -
uses it to schedule the fluid to tick if waterlogged.
invalid reference
SlabBlock -
uses it to schedule the water block above to tick so that it becomes a bubble column.
invalid reference
SoulSandBlock -
uses it to schedule the block to tick so that it can fall if needed.
invalid reference
FallingBlock
- Overrides:
getStateForNeighborUpdatein classAbstractBlock- Parameters:
state- the state of this blockworld- the worldpos- the position of this blockdirection- the direction from this block to the neighborneighborPos- the position of the neighbor blockneighborState- the state of the updated neighbor block- Returns:
- the state of the block after a neighboring block's state change
- See Also:
- Mappings:
Namespace Name Mixin selector named getStateForNeighborUpdateLnet/minecraft/block/AbstractBlock;getStateForNeighborUpdate(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/WorldView;Lnet/minecraft/world/tick/ScheduledTickView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/block/BlockState;intermediary method_9559Lnet/minecraft/class_4970;method_9559(Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_10225;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_5819;)Lnet/minecraft/class_2680;official aLecb;a(Lecc;Ldky;Ldlk;Liy;Lje;Liy;Lecc;Lbao;)Lecc;
-
-
getOutlineShape
public 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 aLecb;a(Lecc;Ldjz;Liy;Lfgt;)Lfhi;
-
method_70748
- Mappings:
Namespace Name Mixin selector named method_70748Lnet/minecraft/class_11198;method_70748(Lnet/minecraft/block/BlockState;)Iintermediary method_70748Lnet/minecraft/class_11198;method_70748(Lnet/minecraft/class_2680;)Iofficial nLdql;n(Lecc;)I
-
method_70749
- Mappings:
Namespace Name Mixin selector named method_70749Lnet/minecraft/class_11198;method_70749(Lnet/minecraft/block/BlockState;)Zintermediary method_70749Lnet/minecraft/class_11198;method_70749(Lnet/minecraft/class_2680;)Zofficial oLdql;o(Lecc;)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
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:
-
checks the placement requirement.
invalid reference
SugarCaneBlock -
dispenses its content.
invalid reference
DispenserBlock -
executes its command.
invalid reference
CommandBlock -
spawns a tadpole.
invalid reference
FrogspawnBlock -
updates a bubble column.
invalid reference
SoulSandBlock -
tries to fall.
invalid reference
FallingBlock
- 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 aLecb;a(Lecc;Lasg;Liy;Lbao;)V
-
-
method_70747
private void method_70747(BlockState blockState, ServerWorld serverWorld, BlockPos blockPos, Random random) - Mappings:
Namespace Name Mixin selector named method_70747Lnet/minecraft/class_11198;method_70747(Lnet/minecraft/block/BlockState;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Vintermediary method_70747Lnet/minecraft/class_11198;method_70747(Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vofficial cLdql;c(Lecc;Lasg;Liy;Lbao;)V
-
method_70746
- Mappings:
Namespace Name Mixin selector named method_70746Lnet/minecraft/class_11198;method_70746(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_70746Lnet/minecraft/class_11198;method_70746(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial aLdql;a(Lasg;Liy;Lecc;)V
-
randomDisplayTick
Called randomly on the client. Blocks may override this to spawn particles. UnlikeAbstractBlock.randomTick(net.minecraft.block.BlockState, net.minecraft.server.world.ServerWorld, net.minecraft.util.math.BlockPos, net.minecraft.util.math.random.Random)this is not affected by a game rule.- Overrides:
randomDisplayTickin classBlock- Mappings:
Namespace Name Mixin selector named randomDisplayTickLnet/minecraft/block/Block;randomDisplayTick(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/random/Random;)Vintermediary method_9496Lnet/minecraft/class_2248;method_9496(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)Vofficial aLdoa;a(Lecc;Ldkv;Liy;Lbao;)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 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:
-
uses this to grow sugar cane.
invalid reference
SugarCaneBlock -
uses this to oxidize.
invalid reference
OxidizableBlock -
uses this to spawn zombified piglins.
invalid reference
NetherPortalBlock -
uses this to decay when far from logs.
invalid reference
LeavesBlock
- 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 bLecb;b(Lecc;Lasg;Liy;Lbao;)V
-
-
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 aLdoa;a(Ldep;)Lecc;
-
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 named getFluidStateLnet/minecraft/block/AbstractBlock;getFluidState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/fluid/FluidState;intermediary method_9545Lnet/minecraft/class_4970;method_9545(Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;official b_Lecb;b_(Lecc;)Leym;
-
canFillWithFluid
public boolean canFillWithFluid(@Nullable @Nullable LivingEntity filler, BlockView world, BlockPos pos, BlockState state, Fluid fluid) - Specified by:
canFillWithFluidin interfaceFluidFillable- Specified by:
canFillWithFluidin interfaceWaterloggable- Mappings:
Namespace Name Mixin selector named canFillWithFluidLnet/minecraft/block/FluidFillable;canFillWithFluid(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/fluid/Fluid;)Zintermediary method_10310Lnet/minecraft/class_2402;method_10310(Lnet/minecraft/class_1309;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3611;)Zofficial aLdsy;a(Lbyn;Ldjz;Liy;Lecc;Leyl;)Z
-
tryFillWithFluid
public boolean tryFillWithFluid(WorldAccess world, BlockPos pos, BlockState state, FluidState fluidState) - Specified by:
tryFillWithFluidin interfaceFluidFillable- Specified by:
tryFillWithFluidin interfaceWaterloggable- Mappings:
Namespace Name Mixin selector named tryFillWithFluidLnet/minecraft/block/FluidFillable;tryFillWithFluid(Lnet/minecraft/world/WorldAccess;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/fluid/FluidState;)Zintermediary method_10311Lnet/minecraft/class_2402;method_10311(Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3610;)Zofficial aLdsy;a(Ldkw;Liy;Lecc;Leym;)Z
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) Called server-side on the new block when the block state is changed. This includes block placement. When overriding this method,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)orAbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.world.block.WireOrientation, boolean)should also be overridden. The method is used in the following cases:- When activating a redstone component on placement (used along with
AbstractBlock.neighborUpdate(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.block.Block, net.minecraft.world.block.WireOrientation, boolean) - When resetting a position-dependent state (see
)
invalid reference
TargetBlock - When converting a block on placement (see
)
invalid reference
WetSpongeBlock - When
lights a portal
invalid reference
fire
- Overrides:
onBlockAddedin classAbstractBlock- See Also:
- Mappings:
Namespace Name Mixin selector named onBlockAddedLnet/minecraft/block/AbstractBlock;onBlockAdded(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Z)Vintermediary method_9615Lnet/minecraft/class_4970;method_9615(Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)Vofficial aLecb;a(Lecc;Ldkv;Liy;Lecc;Z)V
- When activating a redstone component on placement (used along with
-