Class FillableShape

java.lang.Object
net.rodofire.easierworldcreator.shapeutil.Shape
net.rodofire.easierworldcreator.shapeutil.FillableShape
Direct Known Subclasses:
CircleGen, CylinderGen, SphereGen, TorusGen

public abstract class FillableShape extends Shape
class to change the filling of the structure since that all structure may not need or can't have a custom filling like the line generation, it is not implemented in the ShapeGen class
  • Constructor Details

    • FillableShape

      public FillableShape(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, Shape.PlaceMoment placeMoment)
      Parameters:
      world - the world of the shape
      pos - the pos of the shape (usually the center of the structure)
    • FillableShape

      public FillableShape(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, Shape.PlaceMoment placeMoment, List<BlockLayer> layers, boolean force, List<net.minecraft.block.Block> blocksToForce, int xrotation, int yrotation, int secondxrotation)
      Parameters:
      world - the world of the shape
      pos - ths pos of the shape (usually the center of the structure)
      layers - list of blockLayers that will be placed in the world
      force - boolean to force or not the pos of the blocks
      blocksToForce - list of block that the shape can still replace when force = false
      xrotation - first rotation around the x-axis
      yrotation - second rotation around the y-axis
      secondxrotation - last rotation around the x-axis
  • Method Details

    • getFillingType

      public FillableShape.Type getFillingType()
      Returns:
      the filling type
    • setFillingType

      public void setFillingType(FillableShape.Type fillingType)
      Parameters:
      fillingType - change the fillingtype
    • getCustomFill

      public float getCustomFill()
      Returns:
      the float of the custom fill
    • setCustomFill

      public void setCustomFill(float customFill)
      Parameters:
      customFill - change the custom fill used to change the percentage of the radius that will be filled
    • setFill

      protected void setFill()
      set the filling value depending on the filling type