Interface StructureSet

All Superinterfaces:
Keyed, Wrapper
All Known Subinterfaces:
ComposedStructureSet, ReferencedStructureSet

@NullMarked @AsOf("3.4.0") public interface StructureSet extends Wrapper, Keyed
Wraps Minecraft's StructureSet which are just a weighted list of structures sharing one placement.
Since:
3.4.0
See Also:
  • Method Details

    • reference

      @AsOf("3.4.0") static ReferencedStructureSet reference(ResourceKey key)
      References a structure set already registered under the given key.
      Parameters:
      key - the registry key of the structure set
      Returns:
      a reference to the registered structure set
      Since:
      3.4.0
    • wrap

      @AsOf("3.4.0") default StructureSet wrap()
      Resolves this set's key in Minecraft's structure-set registry and decodes the registered value, keeping the key on the result.
      Returns:
      the decoded structure set
      Since:
      3.4.0
    • of

      @AsOf("3.4.0") static ComposedStructureSet of(List<StructureSet.Entry> structures, StructurePlacement placement)
      Authors a structure set from its entries and placement.
      Parameters:
      structures - the weighted structures in the set
      placement - how the set spreads its structures
      Returns:
      an authored structure set
      Since:
      3.4.0
    • of

      @AsOf("3.4.0") static ComposedStructureSet of(Structure structure, StructurePlacement placement)
      Authors a structure set holding a single structure.
      Parameters:
      structure - the structure in the set
      placement - how the set spreads its structure
      Returns:
      an authored structure set
      Since:
      3.4.0
    • decode

      @AsOf("3.4.0") static StructureSet decode(Object minecraftStructureSet)
      Reads a Minecraft structure set, or a keyed structure-set holder, into a wrapper.
      Parameters:
      minecraftStructureSet - the structure set or structure-set holder to read
      Returns:
      a reference to the structure set, or the decoded set when it carries no key
      Since:
      3.4.0