Class TorusGen
Since 2.1.0, the shape doesn't return a List<net.minecraft.util.math.BlockPos> but it returns instead a List<Set<BlockPos>>
Before 2.1.0, the BlockPos list was a simple list.
Starting from 2.1.0, the shapes return a list of ChunkPos that has a set of BlockPos
The change from List to Set was done to avoid duplicates BlockPos which resulted in unnecessary calculations.
this allow easy multithreading for the Block assignment done in the AbstractBlockShape which result in better performance;
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumchange the outside filling of the torus it is different from the Filling Type the torus type changes the exterior filling while the other one change the interior filling typeNested classes/interfaces inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractFillableBlockShape
AbstractFillableBlockShape.TypeNested classes/interfaces inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeLayer
AbstractBlockShapeLayer.LayersTypeNested 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
ConstructorsConstructorDescriptionTorusGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, AbstractBlockShapeBase.PlaceMoment placeMoment, int innerRadius, int outerRadius) init the Torus ShapeTorusGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, AbstractBlockShapeBase.PlaceMoment placeMoment, AbstractBlockShapePlaceType.LayerPlace layerPlace, AbstractBlockShapeLayer.LayersType layersType, int yRotation, int zRotation, int secondYRotation, String featureName, int innerRadiusX, int outerRadiusX, int innerRadiusZ, int outerRadiusZ) init the Torus Shape -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateEmptyTore(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) generates an empty torus the shape with the torus might be different from the full one if you're using custom torus fillingvoidgenerateFullTore(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) generates a full torus / tore with custom filling the shape with the torus might be different from the empty one if you're using custom torus fillingMethod to get all the BlockPos needed to place the shapenet.minecraft.util.math.Vec3dgetEllipsoidalToreCoordinates(int u, int v) floatGets the horizontal torus ratio.doublegetInnerRadius(int angle) intGets the inner radius of the torus along the X-axis.intGets the inner radius of the torus along the Z-axis.doublegetOuterRadius(int angle) intGets the outer radius of the torus along the X-axis.intGets the outer radius of the torus along the Z-axis.Gets the type of the torus.floatGets the vertical torus ratio.voidsetHorizontalTorus(float horizontalTorus) Sets the horizontal torus ratio.voidsetInnerRadiusX(int innerRadiusX) Sets the inner radius of the torus along the X-axis.voidsetInnerRadiusZ(int innerRadiusZ) Sets the inner radius of the torus along the Z-axis.voidsetOuterRadiusX(int outerRadiusX) Sets the outer radius of the torus along the X-axis.voidsetOuterRadiusZ(int outerRadiusZ) Sets the outer radius of the torus along the Z-axis.voidsetTorusType(TorusGen.TorusType torusType) Sets the type of the torus.voidsetVerticalTorus(float verticalTorus) Sets the vertical torus ratio.Methods inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractFillableBlockShape
getCustomFill, getFillingType, setCustomFill, setFill, setFillingTypeMethods inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShape
getAnimator, getBlockListWithVerification, getChunkCovered, getFeatureName, getOffset, place, place, placeWBlockList, setAnimator, setFeatureName, setOffsetMethods inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeRotation
addSecondZRotation, addYRotation, addZRotation, getCoordinatesRotation, getCoordinatesRotation, getCoordinatesRotationList, getSecondYRotation, getYRotation, getZRotation, setSecondYRotation, setYRotation, setZRotationMethods inherited from class net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeLayer
getDirectionalLayerDirection, getInnerCylindricalBlocks, getInnerRadialBlocks, getLayers, getLayersType, getLayersWithVerification, getOuterCylindricalBlocks, getOuterRadialBlocks, getRadialCenterPos, getVerifiedInnerCylindricalBlocks, getVerifiedInnerRadialBlocks, getVerifiedOuterCylindricalBlocks, getVerifiedOuterRadialBlocks, placeFirstSurfaceBlockLayers, placeInnerCylindricalBlocks, placeInnerRadialBlocks, placeLayers, placeOuterCylindricalBlocks, placeOuterRadialBlocks, placeSurfaceBlockLayer, setDirectionalLayerDirection, setLayerDirection, setLayersType, setRadialCenterPosMethods 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, getBlockLayer, getBlockPosList, getPlaceMoment, getPos, getWorld, setBlockLayer, setPlaceMoment, setPos
-
Constructor Details
-
TorusGen
public TorusGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, AbstractBlockShapeBase.PlaceMoment placeMoment, AbstractBlockShapePlaceType.LayerPlace layerPlace, AbstractBlockShapeLayer.LayersType layersType, int yRotation, int zRotation, int secondYRotation, String featureName, int innerRadiusX, int outerRadiusX, int innerRadiusZ, int outerRadiusZ) init the Torus Shape- 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 placedyRotation- first rotation around the y-axiszRotation- second rotation around the z-axissecondYRotation- last rotation around the y-axisfeatureName- the name of the featureinnerRadiusX- the radius of the inner circle on the x-axisouterRadiusX- the radius of the outer circle on the x-axisinnerRadiusZ- the radius of the inner circle on the z-axisouterRadiusZ- the radius of the outer circle on the z-axis
-
TorusGen
public TorusGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, AbstractBlockShapeBase.PlaceMoment placeMoment, int innerRadius, int outerRadius) init the Torus Shape- Parameters:
world- the world the spiral will spawn inpos- the center of the spiralplaceMoment- define the moment where the shape will be placedinnerRadius- the radius of the inner circleouterRadius- the radius of the outer circle
-
-
Method Details
-
getInnerRadiusX
public int getInnerRadiusX()Gets the inner radius of the torus along the X-axis.- Returns:
- the inner radius along the X-axis.
-
setInnerRadiusX
public void setInnerRadiusX(int innerRadiusX) Sets the inner radius of the torus along the X-axis.- Parameters:
innerRadiusX- the inner radius to set along the X-axis.
-
getOuterRadiusX
public int getOuterRadiusX()Gets the outer radius of the torus along the X-axis.- Returns:
- the outer radius along the X-axis.
-
setOuterRadiusX
public void setOuterRadiusX(int outerRadiusX) Sets the outer radius of the torus along the X-axis.- Parameters:
outerRadiusX- the outer radius to set along the X-axis.
-
getInnerRadiusZ
public int getInnerRadiusZ()Gets the inner radius of the torus along the Z-axis.- Returns:
- the inner radius along the Z-axis.
-
setInnerRadiusZ
public void setInnerRadiusZ(int innerRadiusZ) Sets the inner radius of the torus along the Z-axis.- Parameters:
innerRadiusZ- the inner radius to set along the Z-axis.
-
getOuterRadiusZ
public int getOuterRadiusZ()Gets the outer radius of the torus along the Z-axis.- Returns:
- the outer radius along the Z-axis.
-
setOuterRadiusZ
public void setOuterRadiusZ(int outerRadiusZ) Sets the outer radius of the torus along the Z-axis.- Parameters:
outerRadiusZ- the outer radius to set along the Z-axis.
-
getTorusType
Gets the type of the torus.The torus type determines the configuration of the torus, such as whether it is hollow, solid, or has other specific properties.
- Returns:
- the
TorusGen.TorusTypeof the torus.
-
setTorusType
Sets the type of the torus.The torus type determines the configuration of the torus, such as whether it is hollow, solid, or has other specific properties.
- Parameters:
torusType- theTorusGen.TorusTypeto set.
-
getVerticalTorus
public float getVerticalTorus()Gets the vertical torus ratio.The vertical torus determines the percentage of the torus's height relative to its overall dimensions.
- Returns:
- the vertical torus ratio as a float.
-
setVerticalTorus
public void setVerticalTorus(float verticalTorus) Sets the vertical torus ratio.The vertical torus determines the percentage of the torus's height relative to its overall dimensions.
- Parameters:
verticalTorus- the vertical torus ratio to set, as a float.
-
getHorizontalTorus
public float getHorizontalTorus()Gets the horizontal torus ratio.The horizontal torus determines the percentage of the torus's width relative to its overall dimensions.
- Returns:
- the horizontal torus ratio as a float.
-
setHorizontalTorus
public void setHorizontalTorus(float horizontalTorus) Sets the horizontal torus ratio.The horizontal torus determines the percentage of the torus's width relative to its overall dimensions.
- Parameters:
horizontalTorus- the horizontal torus ratio to set, as a float.
-
getBlockPos
Method to get all the BlockPos needed to place the shape- Specified by:
getBlockPosin classAbstractBlockShape- Returns:
- a list that contain divided BlockPos depending in the chunkPos
-
generateFullTore
public void generateFullTore(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) generates a full torus / tore with custom filling the shape with the torus might be different from the empty one if you're using custom torus filling -
generateEmptyTore
public void generateEmptyTore(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) generates an empty torus the shape with the torus might be different from the full one if you're using custom torus filling -
getEllipsoidalToreCoordinates
public net.minecraft.util.math.Vec3d getEllipsoidalToreCoordinates(int u, int v) -
getInnerRadius
public double getInnerRadius(int angle) -
getOuterRadius
public double getOuterRadius(int angle)
-