Class SphereGen
java.lang.Object
net.rodofire.easierworldcreator.shapeutil.Shape
net.rodofire.easierworldcreator.shapeutil.FillableShape
net.rodofire.easierworldcreator.shapegen.SphereGen
Class to generate Sphere 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<net.minecraft.util.math.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 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
ConstructorsConstructorDescriptionSphereGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, int radiusx, List<BlockLayer> layers, int radiusy, int radiusz, int xrotation, int yrotation, int seconxrotation, boolean force, List<net.minecraft.block.Block> blockToForce, boolean halfSphere, net.minecraft.util.math.Direction direction, Shape.PlaceMoment placeMoment) init the shape generationSphereGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, int radius, Shape.PlaceMoment placeMoment) init the shape generation -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateEmptyEllipsoid(int minlarge, int maxlarge, int minheight, int maxheight, Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) voidgenerateEmptyEllipsoid(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) voidgenerateFullEllipsoid(int minx, int maxx, int miny, int maxy, int minz, int maxz, Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) allow you to generate a full elipsoidvoidgenerateFullEllipsoid(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) voidgenerateHalfEmptyElipsoid(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) voidgenerateHalfFullElipsoid(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) method to get the coordinates that will be placed laterintintintList<net.minecraft.util.math.Vec3d> getVec3d()method to get the Vec3d that will be placed latervoidsetRadiusx(int radiusx) voidsetRadiusy(int radiusy) voidsetRadiusz(int radiusz) 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, getFirstSurfaceBlockLayers, getForce, getGenTime, getInnerCylindricalBlocks, getInnerRadialBlocks, getLayerPlace, getLayers, getLayersType, getNoise, getOuterCylindricalBlocks, getOuterRadialBlocks, getPlaceMoment, getPlaceType, getPos, getRotations, getSecondXrotation, getWorld, getXrotation, getYrotation, place, place, placeBlocks, placeBlocks, placeBlocksWithVerification, placeBlocksWithVerification, placeFirstSurfaceBlockLayers, placeInnerCylindricalBlocks, placeInnerRadialBlocks, placeLayers, placeOuterCylindricalBlocks, placeOuterRadialBlocks, placeSurfaceBlockLayers, removeBlockLayer, removeBlockLayer, removeBlockLayer, setBlockLayers, setBlockLayers, setBlocksToForce, setForce, setLayerDirection, setLayerPlace, setLayersType, setNoise, setPlaceMoment, setPlaceType, setPos, setSecondxrotation, setXrotation, setYrotation, verifyBlocks
-
Constructor Details
-
SphereGen
public SphereGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, int radiusx, List<BlockLayer> layers, int radiusy, int radiusz, int xrotation, int yrotation, int seconxrotation, boolean force, List<net.minecraft.block.Block> blockToForce, boolean halfSphere, net.minecraft.util.math.Direction direction, Shape.PlaceMoment placeMoment) init the shape generation- Parameters:
world- the world the shape will be generatedpos- the pos of the structure centerradiusx- the radius along the x-axisradiusy- the radius along the y-axisradiusz- the radius along the z axisxrotation- the rotation along the x-axisyrotation- the rotation along the y-axis
-
SphereGen
public SphereGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, int radius, Shape.PlaceMoment placeMoment) init the shape generation- Parameters:
world- the world the shape will be generatedpos- the pos of the structure centerradius- the radius of the sphere
-
-
Method Details
-
getRadiusx
public int getRadiusx() -
setRadiusx
public void setRadiusx(int radiusx) -
getRadiusy
public int getRadiusy() -
setRadiusy
public void setRadiusy(int radiusy) -
getRadiusz
public int getRadiusz() -
setRadiusz
public void setRadiusz(int radiusz) -
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 -
getCircleCoordinates
-
generateHalfEmptyElipsoid
-
generateEmptyEllipsoid
-
generateEmptyEllipsoid
-
generateHalfFullElipsoid
-
generateFullEllipsoid
-
generateFullEllipsoid
public void generateFullEllipsoid(int minx, int maxx, int miny, int maxy, int minz, int maxz, Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) allow you to generate a full elipsoid- Parameters:
minx- the start of the circle on the x axismaxx- the end of the circle on the x axisminy- the start of the circle on the y axismaxy- the end of the circle on the y axisminz- the start of the circle on the z axismaxz- the end of the circle on the z axis
-