Interface ShipwreckStructure

All Superinterfaces:
DefinedStructure, Keyed, Registerable<ShipwreckStructure>, Structure, Wrapper

@NullMarked @AsOf("3.4.0") public interface ShipwreckStructure extends DefinedStructure, Registerable<ShipwreckStructure>
A shipwreck.
Since:
3.4.0
See Also:
  • Method Details

    • beached

      @AsOf("3.4.0") boolean beached()
      Whether the wreck is placed on land, choosing from the beached ship templates, rather than on the ocean floor.
      Returns:
      whether the shipwreck is beached
      Since:
      3.4.0
    • withSettings

      @AsOf("3.4.0") default ShipwreckStructure withSettings(StructureSettings settings)
      Description copied from interface: DefinedStructure
      Returns a copy of this structure with the given settings.
      Specified by:
      withSettings in interface DefinedStructure
      Parameters:
      settings - the settings the copy carries
      Returns:
      a copy of this structure with the given settings
    • withResourceKey

      @AsOf("3.4.0") default ShipwreckStructure withResourceKey(ResourceKey resourceKey)
      Description copied from interface: DefinedStructure
      Returns a copy of this structure registered under the given key.
      Specified by:
      withResourceKey in interface DefinedStructure
      Parameters:
      resourceKey - the key the copy carries
      Returns:
      a copy of this structure with the given key
    • register

      @AsOf("3.4.0") ShipwreckStructure register()
      Description copied from interface: DefinedStructure
      Registers this structure under its resource key.
      Specified by:
      register in interface DefinedStructure
      Specified by:
      register in interface Registerable<ShipwreckStructure>
      Returns:
      this structure
    • toBuilder

      @AsOf("3.4.0") default ShipwreckStructure.Builder toBuilder()
      Converts this object back to a builder.
      Returns:
      a builder with the same values as this object
      Since:
      3.4.0
    • of

      @AsOf("3.4.0") static ShipwreckStructure of(@Nullable ResourceKey resourceKey, StructureSettings settings, boolean beached)
      Creates a new shipwreck.
      Parameters:
      resourceKey - the resource key of the structure, or null if not present
      settings - the settings every structure carries
      beached - whether the wreck is placed on land
      Returns:
      a new shipwreck
      Since:
      3.4.0
    • builder

      @AsOf("3.4.0") static ShipwreckStructure.Builder builder(StructureSettings settings)
      Creates a new builder for a shipwreck on the ocean floor, vanilla's default.
      Parameters:
      settings - the settings every structure carries
      Returns:
      a new builder
      Since:
      3.4.0