Interface PoolElement

All Superinterfaces:
Wrapper
All Known Subinterfaces:
EmptyPoolElement, FeaturePoolElement, LegacySinglePoolElement, ListPoolElement, SinglePoolElement

@NullMarked @AsOf("3.4.0") public interface PoolElement extends Wrapper
One piece a TemplatePool can place.
Since:
3.4.0
See Also:
  • Method Details

    • projection

      @AsOf("3.4.0") Projection projection()
      How this element is fitted to the terrain.
      Returns:
      the projection of this element
      Since:
      3.4.0
    • single

      @AsOf("3.4.0") static SinglePoolElement single(StructureTemplate template)
      Places a structure template, rigidly.
      Parameters:
      template - the template to place
      Returns:
      a single-template element
      Since:
      3.4.0
    • legacy

      @AsOf("3.4.0") static LegacySinglePoolElement legacy(StructureTemplate template)
      Places a structure template, keeping the air blocks it was saved with instead of skipping them.
      Parameters:
      template - the template to place
      Returns:
      a legacy single-template element
      Since:
      3.4.0
    • list

      @AsOf("3.4.0") static ListPoolElement list(Projection projection, List<PoolElement> elements)
      Places several elements at the same spot, in order.
      Parameters:
      projection - how the elements are fitted to the terrain
      elements - the elements to place
      Returns:
      a list element
      Since:
      3.4.0
    • feature

      @AsOf("3.4.0") static FeaturePoolElement feature(Projection projection, PlacedFeature feature)
      Places a placed feature rather than a template.
      Parameters:
      projection - how the feature is fitted to the terrain
      feature - the feature to place
      Returns:
      a feature element
      Since:
      3.4.0
    • empty

      @AsOf("3.4.0") static EmptyPoolElement empty()
      Places nothing. Weighting it against other elements makes a jigsaw block sometimes stay empty.
      Returns:
      the empty element
      Since:
      3.4.0
    • decode

      @AsOf("3.4.0") static PoolElement decode(Object minecraftElement)
      Reads a Minecraft pool element.
      Parameters:
      minecraftElement - the pool element to read
      Returns:
      the decoded pool element
      Since:
      3.4.0