Interface DefinedStructure

All Superinterfaces:
Keyed, Structure, Wrapper
All Known Subinterfaces:
ComposedStructure, JigsawStructure, MineshaftStructure, NetherFossilStructure, OceanRuinStructure, RuinedPortalStructure, ShipwreckStructure, SimpleStructure

@NullMarked @AsOf("3.4.0") public interface DefinedStructure extends Structure
A structure whose definition is present, as opposed to a ReferencedStructure.
Since:
3.4.0
  • Method Details

    • resourceKey

      @AsOf("3.4.0") Optional<ResourceKey> resourceKey()
      The resource key of the structure.
      Returns:
      the resource key of the structure, if present
      Since:
      3.4.0
    • settings

      @AsOf("3.4.0") StructureSettings settings()
      The settings every structure carries.
      Returns:
      the settings of the structure
      Since:
      3.4.0
    • withSettings

      @AsOf("3.4.0") DefinedStructure withSettings(StructureSettings settings)
      Returns a copy of this structure with the given settings.
      Parameters:
      settings - the settings the copy carries
      Returns:
      a copy of this structure with the given settings
      Since:
      3.4.0
    • withSettings

      @AsOf("3.4.0") default DefinedStructure withSettings(UnaryOperator<StructureSettings> mutator)
      Returns a copy of this structure whose settings are the result of applying mutator to this structure's settings.
      Parameters:
      mutator - the operator to apply to this structure's settings
      Returns:
      a copy of this structure with the mutated settings
      Since:
      3.4.0
    • withResourceKey

      @AsOf("3.4.0") DefinedStructure withResourceKey(ResourceKey resourceKey)
      Returns a copy of this structure registered under the given key.
      Parameters:
      resourceKey - the key the copy carries
      Returns:
      a copy of this structure with the given key
      Since:
      3.4.0
    • register

      @AsOf("3.4.0") DefinedStructure register()
      Registers this structure under its resource key.
      Returns:
      this structure
      Throws:
      NoSuchElementException - if this structure has no resource key
      Since:
      3.4.0