Class DefaultBlockShapeGen


public class DefaultBlockShapeGen extends AbstractBlockShape
In the case you have a custom BlockPos list, or a custom DefaultBlockList, you can initialize the shape with this class. However, don't use the place() method, use the place(List<Set<BlockPos>> or use placeWBlockList(List<Set<BlockList>>)to avoid potential problems.
  • Constructor Details

    • DefaultBlockShapeGen

      public DefaultBlockShapeGen(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment, AbstractBlockShapePlaceType.LayerPlace layerPlace, AbstractBlockShapeLayer.LayersType layersType, int yRotation, int zRotation, int secondYRotation, String featureName)
      init the Default Shape
      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
    • DefaultBlockShapeGen

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

    • getBlockPos

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