Class AbstractFillableBlockShape

Direct Known Subclasses:
CircleGen, CylinderGen, SphereGen, TorusGen

public abstract class AbstractFillableBlockShape extends AbstractBlockShape
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

    • AbstractFillableBlockShape

      public AbstractFillableBlockShape(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, AbstractBlockShapeBase.PlaceMoment placeMoment, AbstractBlockShapePlaceType.LayerPlace layerPlace, AbstractBlockShapeLayer.LayersType layersType, int yRotation, int zRotation, int secondYRotation, String featureName)
      init the ShapeFilling
      Parameters:
      world - the world the spiral will spawn in
      pos - the center of the spiral
      placeMoment - define the moment where the shape will be placed
      layerPlace - how the BlockStates inside of a BlockLayer will be placed
      layersType - how the Layers will be placed
      yRotation - first rotation around the y-axis
      zRotation - second rotation around the z-axis
      secondYRotation - last rotation around the y-axis
      featureName - the name of the feature
    • AbstractFillableBlockShape

      public AbstractFillableBlockShape(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, AbstractBlockShapeBase.PlaceMoment placeMoment)
      init the ShapeFilling
      Parameters:
      world - the world of the shape
      pos - the pos of the shape (usually the center of the structure)
      placeMoment - define the moment where the shape will be placed
  • Method Details

    • getFillingType

      public AbstractFillableBlockShape.Type getFillingType()
      method to get the filling Type
      Returns:
      the filling type
    • setFillingType

      public void setFillingType(AbstractFillableBlockShape.Type fillingType)
      method to change the filling Type
      Parameters:
      fillingType - change the fillingType
    • getCustomFill

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

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

      protected void setFill()
      method to set the custom fill set the filling value depending on the filling type