Class SphereGen
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.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 <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 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 ClassesNested 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
ConstructorsConstructorDescriptionSphereGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, ShapeBase.PlaceMoment placeMoment, int radius) init the shape generationSphereGen(@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 radiusX, int radiusY, int radiusZ, SphereGen.SphereType halfSphere) init the Sphere Shape -
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 ellipsoidvoidgenerateFullEllipsoid(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) voidgenerateHalfEmptyEllipsoid(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) voidgenerateHalfFullEllipsoid(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) method to get the coordinates that will be placed laternet.minecraft.util.math.DirectionintintintList<net.minecraft.util.math.Vec3d> getVec3d()method to get the Vec3d that will be placed latervoidsetHalfSphere(SphereGen.SphereType halfSphere) voidsetHalfSphereDirection(net.minecraft.util.math.Direction direction) voidsetRadiusX(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
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
-
SphereGen
public SphereGen(@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 radiusX, int radiusY, int radiusZ, SphereGen.SphereType halfSphere) init the Sphere 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 featureradiusX- the radius on the x-axisradiusY- the radius on the y-axisradiusZ- the radius on the z-axishalfSphere- determines if the sphere is half or not
-
SphereGen
public SphereGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, ShapeBase.PlaceMoment placeMoment, int radius) init the shape generation- Parameters:
world- the world the shape will be generatedpos- the pos of the structure centerplaceMoment- define the moment where the shape will be placedradius- the radius of the sphere
-
-
Method Details
-
getHalfSphereDirection
public net.minecraft.util.math.Direction getHalfSphereDirection() -
setHalfSphereDirection
public void setHalfSphereDirection(net.minecraft.util.math.Direction direction) -
isHalfSphere
-
setHalfSphere
-
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 -
getSphereCoordinates
-
generateHalfEmptyEllipsoid
-
generateEmptyEllipsoid
-
generateEmptyEllipsoid
-
generateHalfFullEllipsoid
-
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 ellipsoid- 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
-