Class AbstractBlockShapePlaceType
java.lang.Object
net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeBase
net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapePlaceType
- Direct Known Subclasses:
AbstractBlockShapeLayer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumset how the blocks/particles will be chosen inside a layerNested classes/interfaces inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeBase
AbstractBlockShapeBase.PlaceMoment -
Field Summary
Fields inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeBase
biggerThanChunk, THREAD_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionAbstractBlockShapePlaceType(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment) init the ShapePlaceTypeAbstractBlockShapePlaceType(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment, AbstractBlockShapePlaceType.LayerPlace layerPlace) init the ShapePlaceType -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.block.BlockStategetBlockToPlace(int index, net.minecraft.util.math.BlockPos pos) Used to get the blocksState notably used during this.getWorld() gen, this doesn't place anythingnet.minecraft.block.BlockStategetBlockToPlace(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) Used to get the blocksState notably used during this.getWorld() gen, this doesn't place anything.getNoise()voidplaceBlocks(int index, net.minecraft.util.math.BlockPos pos) place blocks without verificationvoidplaceBlocks(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) Place blocks without verification.booleanplaceBlocksWithVerification(int index, net.minecraft.util.math.BlockPos pos) place a block in the this.getWorld() at the pos if it is able tobooleanplaceBlocksWithVerification(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) place a block in the this.getWorld() at the pos if it is able to.booleanplaceBlocksWithVerification(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos, boolean force, Set<net.minecraft.block.Block> blocksToForce) place a block in the this.getWorld() at the pos if it is able to.voidsetLayerPlace(AbstractBlockShapePlaceType.LayerPlace layerPlace) voidsetNoise(FastNoiseLite noise) booleanverifyBlocks(net.minecraft.util.math.BlockPos pos) method to know if the block can be placedbooleanverifyBlocks(net.minecraft.util.math.BlockPos pos, Set<net.minecraft.block.Block> blocksToForce, boolean force) method to know if the block can be placedbooleanverifyBlocks(net.minecraft.util.math.BlockPos pos, Set<net.minecraft.block.Block> blocksToForce, boolean force, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap) Methods inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeBase
addPosOffset, getBlockLayer, getPlaceMoment, getPos, getWorld, setBlockLayer, setPlaceMoment, setPos
-
Constructor Details
-
AbstractBlockShapePlaceType
public AbstractBlockShapePlaceType(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment, AbstractBlockShapePlaceType.LayerPlace layerPlace) init the ShapePlaceType- Parameters:
world- the world the spiral will spawn inpos- the center of the spiralplaceMoment- define the moment where the shape will be placedlayerPlace- how the@BlockStatesinside of aBlockLayerwill be placed
-
AbstractBlockShapePlaceType
public AbstractBlockShapePlaceType(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment) init the ShapePlaceType- Parameters:
world- the world of the shapepos- the pos of the shape (usually the center of the structure)placeMoment- define the moment where the shape will be placed
-
-
Method Details
-
setLayerPlace
-
getLayerPlace
-
setNoise
-
getNoise
-
placeBlocks
public void placeBlocks(int index, net.minecraft.util.math.BlockPos pos) place blocks without verification- Parameters:
index- the index of the theBlockLayerpos- the pos of the block
-
placeBlocks
public void placeBlocks(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) Place blocks without verification. Used for precomputedList<BlockStates>instead of searching it on the BlockLayer- Parameters:
states- states the states that will be chosenpos- the pos of the block
-
placeBlocksWithVerification
public boolean placeBlocksWithVerification(int index, net.minecraft.util.math.BlockPos pos) place a block in the this.getWorld() at the pos if it is able to- Parameters:
index- the index of the theBlockLayerpos- the pos of the block- Returns:
- boolean if the block was placed
-
placeBlocksWithVerification
public boolean placeBlocksWithVerification(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos, boolean force, Set<net.minecraft.block.Block> blocksToForce) place a block in the this.getWorld() at the pos if it is able to. precomputed list for little performance improvement- Parameters:
states- the states that will be chosenpos- the pos of the blockforce- determine if the block can be posed on top of any blockblocksToForce- set of blocks that determine the blocks that can be still forced- Returns:
- boolean if the block was placed
-
placeBlocksWithVerification
public boolean placeBlocksWithVerification(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) place a block in the this.getWorld() at the pos if it is able to. precomputed list for little performance improvement- Parameters:
states- the states that will be chosenpos- the pos of the block- Returns:
- boolean if the block was placed
-
getBlockToPlace
public net.minecraft.block.BlockState getBlockToPlace(int index, net.minecraft.util.math.BlockPos pos) Used to get the blocksState notably used during this.getWorld() gen, this doesn't place anything- Parameters:
index- the index of the theBlockLayerpos- the pos of the block- Returns:
- the BlockState related to the pos
-
getBlockToPlace
public net.minecraft.block.BlockState getBlockToPlace(List<net.minecraft.block.BlockState> states, net.minecraft.util.math.BlockPos pos) Used to get the blocksState notably used during this.getWorld() gen, this doesn't place anything. Used for a precomputed BlockState list- Parameters:
states- the states that will be chosenpos- the pos of the block- Returns:
- the BlockState related to the pos
-
verifyBlocks
public boolean verifyBlocks(net.minecraft.util.math.BlockPos pos) method to know if the block can be placed- Parameters:
pos- the blockPos that will be tested- Returns:
- true if it can be placed, false if not
-
verifyBlocks
public boolean verifyBlocks(net.minecraft.util.math.BlockPos pos, Set<net.minecraft.block.Block> blocksToForce, boolean force) method to know if the block can be placed- Parameters:
pos- the blockPos that will be testedblocksToForce- the blocks that can be forcedforce- if true, all blocks will be forced, except blocks like bedrock or end portals- Returns:
- true if it can be placed, false if not
-
verifyBlocks
-