Class AbstractBlockShapeLayer
java.lang.Object
net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeBase
net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapePlaceType
net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeLayer
- Direct Known Subclasses:
AbstractBlockShapeRotation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumchange how the blocks are putNested classes/interfaces inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapePlaceType
AbstractBlockShapePlaceType.LayerPlaceNested 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
multiChunk, THREAD_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionAbstractBlockShapeLayer(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment) init the ShapeLayerAbstractBlockShapeLayer(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment, AbstractBlockShapePlaceType.LayerPlace layerPlace, AbstractBlockShapeLayer.LayersType layersType) init the ShapeLayer -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.util.math.Vec3dvoidgetInnerCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList, DefaultBlockListComparator comparator) voidgetInnerRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList, DefaultBlockListComparator comparator) place the layers of the structure starting from the first layer to the second to the thirdused to get the layerType initializedgetLayersWithVerification(Set<net.minecraft.util.math.BlockPos> firstPosList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap) voidgetOuterCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList, DefaultBlockListComparator comparator) voidgetOuterRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList, DefaultBlockListComparator comparator) net.minecraft.util.math.BlockPosvoidgetVerifiedInnerCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap, DefaultBlockListComparator comparator) voidgetVerifiedInnerRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap, DefaultBlockListComparator comparator) voidgetVerifiedOuterCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap, DefaultBlockListComparator comparator) voidgetVerifiedOuterRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap, DefaultBlockListComparator comparator) Set<net.minecraft.util.math.BlockPos> placeFirstSurfaceBlockLayers(Set<net.minecraft.util.math.BlockPos> firstPosList) This method returns a temporary blockPos list of the first layer after verification.voidplaceInnerCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList) voidplaceInnerRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList) voidplaceLayers(Set<net.minecraft.util.math.BlockPos> firstPosList) place the layers of the structure depending on theAbstractBlockShapeLayer.LayersTypevoidplaceOuterCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList) voidplaceOuterRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList) placeSurfaceBlockLayer(Set<net.minecraft.util.math.BlockPos> posList, int layerIndex) This method is used to determine and place the layers of the structurevoidsetDirectionalLayerDirection(net.minecraft.util.math.Vec3d directionalLayerDirection) voidsetLayerDirection(net.minecraft.util.math.Vec3d vector) method to change the direction of the orthogonal vector used whenlayerType = ALONG_DIRECTIONvoidsetLayersType(AbstractBlockShapeLayer.LayersType layersType) used to change the layerTypevoidsetRadialCenterPos(net.minecraft.util.math.BlockPos radialCenterPos) Methods inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapePlaceType
getBlockToPlace, getBlockToPlace, getLayerPlace, getNoise, placeBlocks, placeBlocks, placeBlocksWithVerification, placeBlocksWithVerification, placeBlocksWithVerification, setLayerPlace, setNoise, verifyBlocks, verifyBlocks, verifyBlocksMethods inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeBase
addPosOffset, canPlaceMultiChunk, getBlockLayer, getBlockPosList, getOffset, getPlaceMoment, getPos, getWorld, isMultiChunk, setBlockLayer, setOffset, setPlaceMoment, setPos
-
Constructor Details
-
AbstractBlockShapeLayer
public AbstractBlockShapeLayer(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment, AbstractBlockShapePlaceType.LayerPlace layerPlace, AbstractBlockShapeLayer.LayersType layersType) init the ShapeLayer- 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 placedlayersType- how the Layers will be placed
-
AbstractBlockShapeLayer
public AbstractBlockShapeLayer(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment) init the ShapeLayer- 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
-
setLayerDirection
public void setLayerDirection(net.minecraft.util.math.Vec3d vector) method to change the direction of the orthogonal vector used whenlayerType = ALONG_DIRECTION- Parameters:
vector- the vector that will be set
-
getLayersType
used to get the layerType initialized- Returns:
- the layer type of the shape
-
setLayersType
used to change the layerType- Parameters:
layersType- the layer type that will replace the actual one
-
getRadialCenterPos
public net.minecraft.util.math.BlockPos getRadialCenterPos() -
setRadialCenterPos
public void setRadialCenterPos(net.minecraft.util.math.BlockPos radialCenterPos) -
getDirectionalLayerDirection
public net.minecraft.util.math.Vec3d getDirectionalLayerDirection() -
setDirectionalLayerDirection
public void setDirectionalLayerDirection(net.minecraft.util.math.Vec3d directionalLayerDirection) -
getLayers
place the layers of the structure starting from the first layer to the second to the third- Parameters:
firstPosList- list of the BlockPos that compose the structure
-
getLayersWithVerification
public DefaultBlockListComparator getLayersWithVerification(Set<net.minecraft.util.math.BlockPos> firstPosList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap) -
placeLayers
place the layers of the structure depending on theAbstractBlockShapeLayer.LayersType- Parameters:
firstPosList- list of the BlockPos that compose the structure
-
placeFirstSurfaceBlockLayers
public Set<net.minecraft.util.math.BlockPos> placeFirstSurfaceBlockLayers(Set<net.minecraft.util.math.BlockPos> firstPosList) This method returns a temporary blockPos list of the first layer after verification. The first layer will the be placed inplaceSurfaceBlockLayer(Set, int)- Parameters:
firstPosList- the list of BlockPos to verify at first- Returns:
- the set of verified BlockPos
-
placeSurfaceBlockLayer
public List<Set<net.minecraft.util.math.BlockPos>> placeSurfaceBlockLayer(Set<net.minecraft.util.math.BlockPos> posList, int layerIndex) This method is used to determine and place the layers of the structure
It determines for every
BlockPosprovided if the pos can be replaced by the new Layer.To determine it, it gets the depth of the previous layer. It verifies if there is in the
Listthe actualBlockPoswith an offset of the depth-if there is, it adds the
BlockPosin a newListand remove theBlockPosfrom the existing list.-If not, it does nothing.
- Parameters:
posList- the list ofBlockPosof the precedent LayerlayerIndex- the index to get the depth- Returns:
- two
List. One corresponding to the finalList<BlockPos>of the previous layer. The other one, the rest of theList<BlockPos>of the structure that will be used by the next iteration.
-
placeInnerCylindricalBlocks
-
placeOuterCylindricalBlocks
-
placeInnerRadialBlocks
-
placeOuterRadialBlocks
-
getVerifiedInnerCylindricalBlocks
public void getVerifiedInnerCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap, DefaultBlockListComparator comparator) -
getVerifiedOuterCylindricalBlocks
public void getVerifiedOuterCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap, DefaultBlockListComparator comparator) -
getVerifiedInnerRadialBlocks
public void getVerifiedInnerRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap, DefaultBlockListComparator comparator) -
getVerifiedOuterRadialBlocks
public void getVerifiedOuterRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList, Map<net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState> blockStateMap, DefaultBlockListComparator comparator) -
getInnerCylindricalBlocks
public void getInnerCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList, DefaultBlockListComparator comparator) -
getOuterCylindricalBlocks
public void getOuterCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList, DefaultBlockListComparator comparator) -
getInnerRadialBlocks
public void getInnerRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList, DefaultBlockListComparator comparator) -
getOuterRadialBlocks
public void getOuterRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList, DefaultBlockListComparator comparator)
-