Class SpiralGen

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

public class SpiralGen extends Shape
class to generates spiral related shapes
  • Constructor Details

    • SpiralGen

      public SpiralGen(@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, int radiusx, int radiusz, int height, float turnNumber)
      Parameters:
      world - the world the spiral will spawn in
      pos - the center of the spiral
      layers - a list of layers that will be used for the structure
      force - boolean to force the pos of the blocks
      blocksToForce - a list of blocks that the blocks of the spiral can still force if force = false
      xrotation - first rotation around the x-axis
      yrotation - second rotation around the y-axis
      secondxrotation - last rotation around the x-axis
      radiusx - the radius of the x-axis
      radiusz - the radius of the z-axis
      height - the height of the spiral
      turnNumber - the number of turns that the structure will do before reaching the top
    • SpiralGen

      public SpiralGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, int radius, int height)
      Parameters:
      world - the world the spiral will spawn in
      pos - the center of the spiral
      radius - the radius of the spiral
      height - the height of the spiral
  • Method Details

    • getOutlineRadiusz

      public int getOutlineRadiusz()
    • setOutlineRadiusz

      public void setOutlineRadiusz(int outlineRadiusz)
    • getOutlineRadiusx

      public int getOutlineRadiusx()
    • setOutlineRadiusx

      public void setOutlineRadiusx(int outlineRadiusx)
    • getSpiralFilling

      public float getSpiralFilling()
    • setSpiralFilling

      public void setSpiralFilling(float spiralFilling)
    • getSpiralType

      public SpiralGen.SpiralType getSpiralType()
    • setSpiralType

      public void setSpiralType(SpiralGen.SpiralType spiralType)
    • getHeight

      public int getHeight()
    • setHeight

      public void setHeight(int height)
    • getRadiusz

      public int getRadiusz()
    • setRadiusz

      public void setRadiusz(int radiusz)
    • getRadiusx

      public int getRadiusx()
    • setRadiusx

      public void setRadiusx(int radiusx)
    • getTurnNumber

      public float getTurnNumber()
    • setTurnNumber

      public void setTurnNumber(float turnNumber)
    • getOffset

      public int getOffset()
    • setOffset

      public void setOffset(int offset)
      Parameters:
      offset - the offset of the start of the spiral
    • getHelicoidAngle

      public int getHelicoidAngle()
    • setHelicoidAngle

      public void setHelicoidAngle(int helicoidAngle)
      Parameters:
      helicoidAngle - the angle of the blocks on the side
    • getBlockPos

      public List<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
    • generateElipsoidSpiral

      public List<net.minecraft.util.math.BlockPos> generateElipsoidSpiral(net.minecraft.util.math.BlockPos pos)
      generates a simple spiral
      Parameters:
      pos - the center of the spiral. This can be changed to match certain needing like when generating a large outline
      Returns:
      a list of blockPos that will be used to place the structure
    • generateLargeOutlineSpiral

      public List<net.minecraft.util.math.BlockPos> generateLargeOutlineSpiral()
      this allow the generation of a large outline spiral.
      Returns:
      BlockPos list
    • generateHelicoid

      public List<net.minecraft.util.math.BlockPos> generateHelicoid()
      generates an helicoid if the SpiralGen.SpiralType is set to HELICOID or double helicoid with their variants
      Returns: