Class LodestoneWorldgenBuilderEntry
java.lang.Object
team.lodestar.lodestone.modules.toolkit.worldgen.LodestoneWorldgenBuilderEntry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AdditionalPlacementprotected booleanprotected PlacementConditionprotected net.minecraft.core.BlockPosprotected net.minecraft.world.level.block.state.BlockState -
Constructor Summary
ConstructorsConstructorDescriptionLodestoneWorldgenBuilderEntry(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalPlacement(AdditionalPlacement additionalPlacement) Adds additional placement behavior to this entry which will be executed after the block is placed.addPlacementCondition(PlacementCondition placementCondition) Adds a condition to the placement of this entry, which will be checked before placing the block.net.minecraft.world.level.block.state.BlockStatebooleancanPlace(net.minecraft.world.level.WorldGenLevel level) Changes the position of this entry using a function.changePos(net.minecraft.core.BlockPos pos) Changes the position of this entry using a new position.changeState(Function<net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.block.state.BlockState> function) Changes the block state of this entry using a function.changeState(net.minecraft.world.level.block.state.BlockState state) Changes the block state of this entry.booleanbooleanbooleanvoidplace(net.minecraft.world.level.WorldGenLevel level) voidplace(net.minecraft.world.level.WorldGenLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Places a block at the specified position.net.minecraft.core.BlockPosposition()\ Marks this entry as important, meaning it will be placed even if a previous layer already placed a block at the same position.booleantryPlace(net.minecraft.world.level.WorldGenLevel level)
-
Field Details
-
pos
protected net.minecraft.core.BlockPos pos -
state
protected net.minecraft.world.level.block.state.BlockState state -
placementCondition
-
additionalPlacement
-
important
protected boolean important
-
-
Constructor Details
-
LodestoneWorldgenBuilderEntry
public LodestoneWorldgenBuilderEntry(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
position
public net.minecraft.core.BlockPos position() -
blockState
public net.minecraft.world.level.block.state.BlockState blockState() -
changePos
public LodestoneWorldgenBuilderEntry changePos(Function<net.minecraft.core.BlockPos, net.minecraft.core.BlockPos> function) Changes the position of this entry using a function.- Parameters:
function- The function to apply to the current position.
-
changePos
Changes the position of this entry using a new position.- Parameters:
pos- The new position to set for this entry.
-
changeState
public LodestoneWorldgenBuilderEntry changeState(Function<net.minecraft.world.level.block.state.BlockState, net.minecraft.world.level.block.state.BlockState> function) Changes the block state of this entry using a function.- Parameters:
function- The function to apply to the current block state.
-
changeState
public LodestoneWorldgenBuilderEntry changeState(net.minecraft.world.level.block.state.BlockState state) Changes the block state of this entry.- Parameters:
state- The new block state to set for this entry.
-
addPlacementCondition
Adds a condition to the placement of this entry, which will be checked before placing the block.- Parameters:
placementCondition- The placement condition to add to this entry.
-
addAdditionalPlacement
public LodestoneWorldgenBuilderEntry addAdditionalPlacement(AdditionalPlacement additionalPlacement) Adds additional placement behavior to this entry which will be executed after the block is placed.- Parameters:
additionalPlacement- The additional placement to add to this entry.
-
setImportant
\ Marks this entry as important, meaning it will be placed even if a previous layer already placed a block at the same position. -
isImportant
public boolean isImportant() -
hasPlacementCondition
public boolean hasPlacementCondition() -
hasAdditionalPlacement
public boolean hasAdditionalPlacement() -
canPlace
public boolean canPlace(net.minecraft.world.level.WorldGenLevel level) -
tryPlace
public boolean tryPlace(net.minecraft.world.level.WorldGenLevel level) -
place
public void place(net.minecraft.world.level.WorldGenLevel level) -
place
public void place(net.minecraft.world.level.WorldGenLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Places a block at the specified position. For use with the additional placement.- Parameters:
level- The world to place the block in.pos- The position to place the block at.state- The block state to place at the position.
-