Class ShapeLayer
java.lang.Object
net.rodofire.easierworldcreator.shapeutil.ShapeBase
net.rodofire.easierworldcreator.shapeutil.ShapePlaceType
net.rodofire.easierworldcreator.shapeutil.ShapeLayer
- Direct Known Subclasses:
ShapeRotation
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.rodofire.easierworldcreator.shapeutil.ShapePlaceType
ShapePlaceType.LayerPlace, ShapePlaceType.PlaceTypeNested 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
ConstructorsConstructorDescriptionShapeLayer(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull ShapeBase.PlaceMoment placeMoment) init the ShapeLayerShapeLayer(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull ShapeBase.PlaceMoment placeMoment, ShapePlaceType.LayerPlace layerPlace, ShapeLayer.LayersType layersType) init the ShapeLayer -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.util.math.Vec3dgetInnerCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList) getInnerRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList) place the layers of the structure starting from the first layer to the second to the thirdused to get the layerType initializedgetOuterCylindricalBlocks(Set<net.minecraft.util.math.BlockPos> posList) getOuterRadialBlocks(Set<net.minecraft.util.math.BlockPos> posList) net.minecraft.util.math.BlockPosnet.minecraft.util.math.Vec3dSet<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 theShapeLayer.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(ShapeLayer.LayersType layersType) used to change the layerTypevoidsetRadialCenterPos(net.minecraft.util.math.BlockPos radialCenterPos) voidsetRadialCenterVec3d(net.minecraft.util.math.Vec3d radialCenterVec3d) Methods inherited from class net.rodofire.easierworldcreator.shapeutil.ShapePlaceType
getBlockToPlace, getBlockToPlace, getLayerPlace, getNoise, getPlaceType, placeBlocks, placeBlocks, placeBlocksWithVerification, placeBlocksWithVerification, placeBlocksWithVerification, setLayerPlace, setNoise, setPlaceType, verifyBlocksMethods 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
-
ShapeLayer
public ShapeLayer(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull ShapeBase.PlaceMoment placeMoment, ShapePlaceType.LayerPlace layerPlace, ShapeLayer.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
-
ShapeLayer
public ShapeLayer(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull ShapeBase.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
-
getRadialCenterVec3d
public net.minecraft.util.math.Vec3d getRadialCenterVec3d() -
setRadialCenterVec3d
public void setRadialCenterVec3d(net.minecraft.util.math.Vec3d radialCenterVec3d) -
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
-
placeLayers
place the layers of the structure depending on theShapeLayer.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
-
getInnerCylindricalBlocks
-
getOuterCylindricalBlocks
-
getInnerRadialBlocks
-
getOuterRadialBlocks
-