Interface SimpleStructure
- All Superinterfaces:
DefinedStructure, Keyed, Registerable<SimpleStructure>, Structure, Wrapper
@NullMarked
@AsOf("3.4.0")
public interface SimpleStructure
extends DefinedStructure, Registerable<SimpleStructure>
A structure whose layout is written in Java and takes no configuration beyond its
settings.- Since:
- 3.4.0
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleStructure.Builderbuilder(StructureType type, StructureSettings settings) Creates a new builder.static SimpleStructureof(@Nullable ResourceKey resourceKey, StructureType type, StructureSettings settings) Creates a new structure of a type that takes no configuration.static SimpleStructureof(StructureType type, StructureSettings settings) Creates a new structure of a type that takes no configuration.register()Registers this structure under its resource key.default SimpleStructure.BuilderConverts this object back to a builder.type()The structure type, one ofTYPES.default SimpleStructurewithResourceKey(ResourceKey resourceKey) Returns a copy of this structure registered under the given key.default SimpleStructurewithSettings(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
-
Field Details
-
TYPES
-
-
Method Details
-
type
The structure type, one ofTYPES.- Returns:
- the structure type
- 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<SimpleStructure>- 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 SimpleStructure of(@Nullable ResourceKey resourceKey, StructureType type, StructureSettings settings) Creates a new structure of a type that takes no configuration.- Parameters:
resourceKey- the resource key of the structure, or null if not presenttype- the structure type, one ofTYPESsettings- the settings every structure carries- Returns:
- a new structure
- Throws:
IllegalArgumentException- if the type takes configuration of its own- Since:
- 3.4.0
-
of
Creates a new structure of a type that takes no configuration.- Parameters:
type- the structure type, one ofTYPESsettings- the settings every structure carries- Returns:
- a new structure
- Since:
- 3.4.0
-
builder
@AsOf("3.4.0") static SimpleStructure.Builder builder(StructureType type, StructureSettings settings) Creates a new builder.- Parameters:
type- the structure type, one ofTYPESsettings- the settings every structure carries- Returns:
- a new builder
- Since:
- 3.4.0
-