Class LineGen
java.lang.Object
net.rodofire.easierworldcreator.shapeutil.Shape
net.rodofire.easierworldcreator.shapegen.LineGen
Class to generate Line 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.Shape
Shape.LayerPlace, Shape.LayersType, Shape.PlaceMoment, Shape.PlaceType -
Field Summary
Fields inherited from class net.rodofire.easierworldcreator.shapeutil.Shape
biggerThanChunk -
Constructor Summary
ConstructorsConstructorDescriptionLineGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, List<BlockLayer> layers, boolean force, List<net.minecraft.block.Block> blocksToForce, int xrotation, int yrotation, int secondxrotation, net.minecraft.util.math.BlockPos secondPos, Shape.PlaceMoment placeMoment) LineGen(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, net.minecraft.util.math.BlockPos secondPos, Shape.PlaceMoment placeMoment) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidgenerateAxisLine(net.minecraft.util.math.Direction dir, Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) this method genarate the coordinatesList<net.minecraft.util.math.Vec3d> getVec3d()Methods inherited from class net.rodofire.easierworldcreator.shapeutil.Shape
addBlockLayer, addBlockLayers, addBlocksToForce, addBlocksToForce, addPosOffset, addSecondxrotation, addXrotation, addYrotation, getBlockLayer, getBlockLayers, getBlocksToForce, getBlockToPlace, getBlockToPlace, 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
-
LineGen
public LineGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, List<BlockLayer> layers, boolean force, List<net.minecraft.block.Block> blocksToForce, int xrotation, int yrotation, int secondxrotation, net.minecraft.util.math.BlockPos secondPos, Shape.PlaceMoment placeMoment) -
LineGen
public LineGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, net.minecraft.util.math.BlockPos secondPos, Shape.PlaceMoment placeMoment)
-
-
Method Details
-
getBlockPos
- Specified by:
getBlockPosin classShape
-
getVec3d
-
generateAxisLine
public void generateAxisLine(net.minecraft.util.math.Direction dir, Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> chunkMap) this method genarate the coordinates- Parameters:
dir- the direction of the linechunkMap- the map used to get the coordinates
-
drawLine
-