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:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanbeached()Whether the wreck is placed on land, choosing from the beached ship templates, rather than on the ocean floor.static ShipwreckStructure.Builderbuilder(StructureSettings settings) Creates a new builder for a shipwreck on the ocean floor, vanilla's default.static ShipwreckStructureof(@Nullable ResourceKey resourceKey, StructureSettings settings, boolean beached) Creates a new shipwreck.register()Registers this structure under its resource key.default ShipwreckStructure.BuilderConverts this object back to a builder.default ShipwreckStructurewithResourceKey(ResourceKey resourceKey) Returns a copy of this structure registered under the given key.default ShipwreckStructurewithSettings(StructureSettings settings) Returns a copy of this structure with the given settings.Methods inherited from interface DefinedStructure
resourceKey, settings, withSettingsMethods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
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
Description copied from interface:DefinedStructureReturns a copy of this structure with the given settings.- Specified by:
withSettingsin interfaceDefinedStructure- Parameters:
settings- the settings the copy carries- Returns:
- a copy of this structure with the given settings
-
withResourceKey
Description copied from interface:DefinedStructureReturns a copy of this structure registered under the given key.- Specified by:
withResourceKeyin interfaceDefinedStructure- Parameters:
resourceKey- the key the copy carries- Returns:
- a copy of this structure with the given key
-
register
Description copied from interface:DefinedStructureRegisters this structure under its resource key.- Specified by:
registerin interfaceDefinedStructure- Specified by:
registerin interfaceRegisterable<ShipwreckStructure>- Returns:
- this structure
-
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 presentsettings- the settings every structure carriesbeached- whether the wreck is placed on land- Returns:
- a new shipwreck
- Since:
- 3.4.0
-
builder
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
-