Class AbstractBlockShapeBase

java.lang.Object
net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeBase
Direct Known Subclasses:
AbstractBlockShapePlaceType

public abstract class AbstractBlockShapeBase extends Object
Basic Class for Block Shape generation. This includes the basic needs for the shape generation.
  • Field Details

    • biggerThanChunk

      protected boolean biggerThanChunk
      boolean used to determine if we have to use the custom chunk building provided by the mod or not
    • THREAD_COUNT

      protected static final int THREAD_COUNT
      get the number of availible threads
  • Constructor Details

    • AbstractBlockShapeBase

      public AbstractBlockShapeBase(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment)
      init the ShapeBase
      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

    • getBlockLayer

      public BlockLayerComparator getBlockLayer()
      Returns the BlockLayerComparator associated with this object.
      Returns:
      the current BlockLayerComparator
    • setBlockLayer

      public void setBlockLayer(BlockLayerComparator blockLayer)
      Sets the BlockLayerComparator for this object.
      Parameters:
      blockLayer - the BlockLayerComparator to set
    • getPos

      @NotNull public @NotNull net.minecraft.util.math.BlockPos getPos()
      Retrieves the BlockPos associated with this object.
      Returns:
      the current BlockPos
    • setPos

      public void setPos(@NotNull @NotNull net.minecraft.util.math.BlockPos pos)
      Sets the BlockPos for this object.
      Parameters:
      pos - the BlockPos to set
      Throws:
      NullPointerException - if the provided pos is null
    • addPosOffset

      public void addPosOffset(net.minecraft.util.math.BlockPos pos1)
      Adds the given offset to the current BlockPos.
      Parameters:
      pos1 - the BlockPos to add as an offset
    • getWorld

      @NotNull public @NotNull net.minecraft.world.StructureWorldAccess getWorld()
      Retrieves the StructureWorldAccess associated with this object.
      Returns:
      the current StructureWorldAccess
    • getPlaceMoment

      @NotNull public @NotNull AbstractBlockShapeBase.PlaceMoment getPlaceMoment()
      Retrieves the PlaceMoment associated with this object.
      Returns:
      the current PlaceMoment
    • setPlaceMoment

      public void setPlaceMoment(@NotNull @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment)
      allow you to set and change the place moment
      Parameters:
      placeMoment - the changed parameter