Class CylinderGen
- 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 allows easy multithreading for the Block assignment
done in the AbstractBlockShape which result in better performance;
-
Nested Class Summary
Nested 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
biggerThanChunk, THREAD_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionCylinderGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, AbstractBlockShapeBase.PlaceMoment placeMoment, int radius, int height) init a cylinder objectCylinderGen(@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 radiusX, int radiusZ, int height) init a Cylinder object -
Method Summary
Modifier and TypeMethodDescriptionMethod to get the BlockPos of the shapevoidgenerateEmptyCylinder(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) this generates a full cylinder.voidgenerateFullCylinder(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) this generates a full cylinderMethod to get the BlockPos of the shapeintGets the height of the cylinder.intGets the radius of the cylinder along the X-axis.intGets the radius of the cylinder along the Z-axis.voidsetHeight(int height) Sets the height of the cylinder.voidsetRadiusX(int radius) Sets the radius of the cylinder along the X-axis.voidsetRadiusZ(int radius) Sets the radius of the cylinder along the Z-axis.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, getRadialCenterVec3d, getVerifiedInnerCylindricalBlocks, getVerifiedInnerRadialBlocks, getVerifiedOuterCylindricalBlocks, getVerifiedOuterRadialBlocks, placeFirstSurfaceBlockLayers, placeInnerCylindricalBlocks, placeInnerRadialBlocks, placeLayers, placeOuterCylindricalBlocks, placeOuterRadialBlocks, placeSurfaceBlockLayer, setDirectionalLayerDirection, setLayerDirection, setLayersType, setRadialCenterPos, setRadialCenterVec3dMethods 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, getPlaceMoment, getPos, getWorld, setBlockLayer, setPlaceMoment, setPos
-
Constructor Details
-
CylinderGen
public CylinderGen(@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 radiusX, int radiusZ, int height) init a Cylinder object- 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 of the cylinder on the x-axisradiusZ- the radius of the cylinder on the z-axisheight- the height of the cylinder
-
CylinderGen
public CylinderGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, AbstractBlockShapeBase.PlaceMoment placeMoment, int radius, int height) init a cylinder object- Parameters:
world- the world the spiral will spawn inpos- the center of the spiralplaceMoment- define the moment where the shape will be placedradius- the radius of the cylinderheight- the height of the cylinder
-
-
Method Details
-
setHeight
public void setHeight(int height) Sets the height of the cylinder.The height defines the vertical size of the cylinder.
- Parameters:
height- the height of the cylinder, in units.
-
getHeight
public int getHeight()Gets the height of the cylinder.The height represents the vertical size of the cylinder.
- Returns:
- the height of the cylinder, in units.
-
setRadiusX
public void setRadiusX(int radius) Sets the radius of the cylinder along the X-axis.The radius along the X-axis determines the horizontal size of the cylinder in the X direction.
- Parameters:
radius- the radius of the cylinder along the X-axis, in units.
-
getRadiusX
public int getRadiusX()Gets the radius of the cylinder along the X-axis.The radius along the X-axis determines the horizontal size of the cylinder in the X direction.
- Returns:
- the radius of the cylinder along the X-axis, in units.
-
setRadiusZ
public void setRadiusZ(int radius) Sets the radius of the cylinder along the Z-axis.The radius along the Z-axis determines the horizontal size of the cylinder in the Z direction.
- Parameters:
radius- the radius of the cylinder along the Z-axis, in units.
-
getRadiusZ
public int getRadiusZ()Gets the radius of the cylinder along the Z-axis.The radius along the Z-axis determines the horizontal size of the cylinder in the Z direction.
- Returns:
- the radius of the cylinder along the Z-axis, in units.
-
getBlockPos
Method to get the BlockPos of the shape- Specified by:
getBlockPosin classAbstractBlockShape- Returns:
- the blockPos divided into chunkPos
-
generateCylinder
Method to get the BlockPos of the shape- Returns:
- the blockPos divided into chunkPos
-
generateFullCylinder
public void generateFullCylinder(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) this generates a full cylinder- Parameters:
chunkMap- the Map of ChunkPos that will be converted intoList<Set<BlockPos>>
-
generateEmptyCylinder
public void generateEmptyCylinder(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) this generates a full cylinder.- Parameters:
chunkMap- the map that will be converted intoList<Set>blockPos>>
-