java.lang.Object
net.rodofire.easierworldcreator.shapeutil.Shape
net.rodofire.easierworldcreator.shapegen.LineGen

public class LineGen extends Shape
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;

  • 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

      public List<Set<net.minecraft.util.math.BlockPos>> getBlockPos()
      Specified by:
      getBlockPos in class Shape
    • getVec3d

      public List<net.minecraft.util.math.Vec3d> getVec3d()
      Specified by:
      getVec3d in class Shape
    • 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 line
      chunkMap - the map used to get the coordinates
    • drawLine

      public void drawLine(Map<net.minecraft.util.math.ChunkPos,Set<net.minecraft.util.math.BlockPos>> chunkMap)