Class TorusGen
java.lang.Object
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 returns a list of ChunkPos that has a set of BlockPos
The change from List to Set was done to avoid duplicates BlockPos wich 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.Shape
Shape.LayerPlace, Shape.LayersType, Shape.PlaceMoment, Shape.PlaceType -
Field Summary
Fields inherited from class net.rodofire.easierworldcreator.shapeutil.Shape
biggerThanChunk -
Constructor Summary
ConstructorsConstructorDescriptionTorusGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, Shape.PlaceMoment placeMoment, int innerRadius, int outerRadius) TorusGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, Shape.PlaceMoment placeMoment, List<BlockLayer> layers, boolean force, List<net.minecraft.block.Block> blocksToForce, int xrotation, int yrotation, int secondxrotation, int innerRadius, int outerRadius) -
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 tore / 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
addBlockLayer, addBlockLayers, addBlocksToForce, addBlocksToForce, addPosOffset, addSecondxrotation, addXrotation, addYrotation, getBlockLayer, getBlockLayers, getBlocksToForce, getBlockToPlace, getBlockToPlace, getChunkCovered, getCoordinatesRotation, getCoordinatesRotation, getCoordinatesRotationList, getCylindricalBlocks, getFirstSurfaceBlockLayers, getForce, getGenTime, getLayerPlace, getLayers, getLayersType, getNoise, getPlaceMoment, getPlaceType, getPos, getRadialBlocks, getRotations, getSecondXrotation, getWorld, getXrotation, getYrotation, place, place, placeBlocks, placeBlocks, placeBlocksWithVerification, placeBlocksWithVerification, placeCylindricalBlocks, placeFirstSurfaceBlockLayers, placeLayers, placeRadialBlocks, placeSurfaceBlockLayers, removeBlockLayer, removeBlockLayer, removeBlockLayer, setBlockLayers, setBlockLayers, setBlocksToForce, setForce, setLayerDirection, setLayerPlace, setLayersType, setNoise, setPlaceMoment, setPlaceType, setPos, setSecondxrotation, setXrotation, setYrotation, verifyBlocks
-
Constructor Details
-
TorusGen
public TorusGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, Shape.PlaceMoment placeMoment, int innerRadius, int outerRadius) -
TorusGen
public TorusGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, Shape.PlaceMoment placeMoment, List<BlockLayer> layers, boolean force, List<net.minecraft.block.Block> blocksToForce, int xrotation, int yrotation, int secondxrotation, int innerRadius, int outerRadius)
-
-
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 tore / 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)
-