Class PlaceBlockProcedure
- All Implemented Interfaces:
RandomTickProcedure
In the simplest case configure a single PlaceBlockProcedure.PlacementRule with just a "Block" to always place that block.
A rule can instead supply a weighted "Blocks" list to randomly pick from a set of candidate blocks, with
higher weights chosen proportionally more often. Optionally, the rule can be scoped to the ticking block's own
"State" (see PlaceBlockProcedure.PlacementRule), so a single base block with several "State.Definitions" variants
can place different blocks. A rule whose "State" is omitted applies to the block's default (stateless) form,
so the procedure also works on blocks that do not use states at all. By default placement only happens when the
target cell is empty; otherwise it is silently skipped and retried on a later tick.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRule describing a block to place at the configured offset, optionally scoped to one of the ticking block's own visual "State"s.static classA single weighted candidate block for aPlaceBlockProcedure.PlacementRule's "Blocks" list. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonRandomTick(Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer, BlockSection blockSection, int worldX, int worldY, int worldZ, int blockId, BlockType blockType) toString()
-
Field Details
-
CODEC
-
-
Constructor Details
-
PlaceBlockProcedure
public PlaceBlockProcedure()
-
-
Method Details
-
onRandomTick
public void onRandomTick(Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer, BlockSection blockSection, int worldX, int worldY, int worldZ, int blockId, BlockType blockType) - Specified by:
onRandomTickin interfaceRandomTickProcedure
-
toString
-