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, Shape.PlaceMoment placeMoment, net.minecraft.util.math.BlockPos secondPos)
    • LineGen

      @Deprecated(forRemoval=true) 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)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getBlockPos

      public List<Set<net.minecraft.util.math.BlockPos>> getBlockPos()
      Description copied from class: Shape
      method to get the coordinates that will be placed later
      Specified by:
      getBlockPos in class Shape
      Returns:
      a list of blockPos for every shape
    • getVec3d

      public List<net.minecraft.util.math.Vec3d> getVec3d()
      Description copied from class: Shape
      method to get the Vec3d that will be placed later
      Specified by:
      getVec3d in class Shape
      Returns:
      a list of Vec3d for every 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)