Class ShapePlaceType
java.lang.Object
net.rodofire.easierworldcreator.shapeutil.ShapeBase
net.rodofire.easierworldcreator.shapeutil.ShapePlaceType
- Direct Known Subclasses:
ShapeLayer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumset how the blocks/particles will be chosen inside a layerstatic enumset the type of objects that will be placedNested classes/interfaces inherited from class net.rodofire.easierworldcreator.shapeutil.ShapeBase
ShapeBase.PlaceMoment -
Field Summary
Fields inherited from class net.rodofire.easierworldcreator.shapeutil.ShapeBase
biggerThanChunk, THREAD_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionShapePlaceType(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull ShapeBase.PlaceMoment placeMoment) init the ShapePlaceTypeShapePlaceType(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull ShapeBase.PlaceMoment placeMoment, ShapePlaceType.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(ShapePlaceType.LayerPlace layerPlace) voidsetNoise(FastNoiseLite noise) voidsetPlaceType(ShapePlaceType.PlaceType placeType) booleanverifyBlocks(net.minecraft.util.math.BlockPos pos) Methods inherited from class net.rodofire.easierworldcreator.shapeutil.ShapeBase
addBlockLayer, addBlockLayers, addPosOffset, getBlockLayer, getBlockLayers, getPlaceMoment, getPos, getWorld, removeBlockLayer, removeBlockLayer, removeBlockLayer, setBlockLayers, setBlockLayers, setPlaceMoment, setPos
-
Constructor Details
-
ShapePlaceType
public ShapePlaceType(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull ShapeBase.PlaceMoment placeMoment, ShapePlaceType.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
-
ShapePlaceType
public ShapePlaceType(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull ShapeBase.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
-
setPlaceType
-
getPlaceType
-
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)
-