Class TorusGen
java.lang.Object
net.rodofire.easierworldcreator.shapeutil.ShapeBase
net.rodofire.easierworldcreator.shapeutil.ShapePlaceType
net.rodofire.easierworldcreator.shapeutil.ShapeLayer
net.rodofire.easierworldcreator.shapeutil.ShapeRotation
net.rodofire.easierworldcreator.shapeutil.Shape
net.rodofire.easierworldcreator.shapeutil.FillableShape
net.rodofire.easierworldcreator.shapegen.TorusGen
Class to generate Torus related shapes
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 Shape 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.shapeutil.FillableShape
FillableShape.TypeNested classes/interfaces inherited from class net.rodofire.easierworldcreator.shapeutil.ShapeLayer
ShapeLayer.LayersTypeNested 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
ConstructorsConstructorDescriptionTorusGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, ShapeBase.PlaceMoment placeMoment, int innerRadius, int outerRadius) init the Torus ShapeTorusGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, ShapeBase.PlaceMoment placeMoment, ShapePlaceType.LayerPlace layerPlace, ShapeLayer.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 the coordinates that will be placed laternet.minecraft.util.math.Vec3dgetEllipsoidalToreCoordinates(int u, int v) floatdoublegetInnerRadius(int angle) intintdoublegetOuterRadius(int angle) intintList<net.minecraft.util.math.Vec3d> getVec3d()method to get the Vec3d that will be placed laterfloatvoidsetHorizontalTorus(float horizontalTorus) voidsetInnerRadiusX(int innerRadiusX) voidsetInnerRadiusZ(int innerRadiusZ) voidsetOuterRadiusX(int outerRadiusX) voidsetOuterRadiusZ(int outerRadiusZ) voidsetTorusType(TorusGen.TorusType torusType) voidsetVerticalTorus(float verticalTorus) Methods inherited from class net.rodofire.easierworldcreator.shapeutil.FillableShape
getCustomFill, getFillingType, setCustomFill, setFill, setFillingTypeMethods inherited from class net.rodofire.easierworldcreator.shapeutil.Shape
getChunkCovered, place, place, placeWBlockListMethods inherited from class net.rodofire.easierworldcreator.shapeutil.ShapeRotation
addSecondXRotation, addXRotation, addYRotation, getCoordinatesRotation, getCoordinatesRotation, getCoordinatesRotationList, getSecondYRotation, getYRotation, getZRotation, setSecondYRotation, setXRotation, setYRotationMethods inherited from class net.rodofire.easierworldcreator.shapeutil.ShapeLayer
getDirectionalLayerDirection, getInnerCylindricalBlocks, getInnerRadialBlocks, getLayers, getLayersType, getOuterCylindricalBlocks, getOuterRadialBlocks, getRadialCenterPos, getRadialCenterVec3d, placeFirstSurfaceBlockLayers, placeInnerCylindricalBlocks, placeInnerRadialBlocks, placeLayers, placeOuterCylindricalBlocks, placeOuterRadialBlocks, placeSurfaceBlockLayer, setDirectionalLayerDirection, setLayerDirection, setLayersType, setRadialCenterPos, setRadialCenterVec3dMethods 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
-
TorusGen
public TorusGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, ShapeBase.PlaceMoment placeMoment, ShapePlaceType.LayerPlace layerPlace, ShapeLayer.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, ShapeBase.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() -
setInnerRadiusX
public void setInnerRadiusX(int innerRadiusX) -
getOuterRadiusX
public int getOuterRadiusX() -
setOuterRadiusX
public void setOuterRadiusX(int outerRadiusX) -
getInnerRadiusZ
public int getInnerRadiusZ() -
setInnerRadiusZ
public void setInnerRadiusZ(int innerRadiusZ) -
getOuterRadiusZ
public int getOuterRadiusZ() -
setOuterRadiusZ
public void setOuterRadiusZ(int outerRadiusZ) -
getTorusType
-
setTorusType
-
getVerticalTorus
public float getVerticalTorus() -
setVerticalTorus
public void setVerticalTorus(float verticalTorus) -
getHorizontalTorus
public float getHorizontalTorus() -
setHorizontalTorus
public void setHorizontalTorus(float horizontalTorus) -
getBlockPos
Description copied from class:Shapemethod to get the coordinates that will be placed later- Specified by:
getBlockPosin classShape- Returns:
- a list of blockPos for every shape
-
getVec3d
Description copied from class:Shapemethod to get the Vec3d that will be placed later -
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)
-