Interface StructureSet
- All Known Subinterfaces:
ComposedStructureSet, ReferencedStructureSet
Wraps Minecraft's StructureSet which are just a weighted list of
structures sharing one
placement.- Since:
- 3.4.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordOne structure in a set, with the weight it is chosen by when the set holds several. -
Method Summary
Modifier and TypeMethodDescriptionstatic StructureSetReads a Minecraft structure set, or a keyed structure-set holder, into a wrapper.static ComposedStructureSetof(Structure structure, StructurePlacement placement) Authors a structure set holding a single structure.static ComposedStructureSetof(List<StructureSet.Entry> structures, StructurePlacement placement) Authors a structure set from its entries and placement.static ReferencedStructureSetreference(ResourceKey key) References a structure set already registered under the given key.default StructureSetwrap()Resolves this set's key in Minecraft's structure-set registry and decodes the registered value, keeping the key on the result.Methods inherited from interface Wrapper
asHandle, toMinecraft, unwrap
-
Method Details
-
reference
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
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 setplacement- how the set spreads its structures- Returns:
- an authored structure set
- Since:
- 3.4.0
-
of
Authors a structure set holding a single structure.- Parameters:
structure- the structure in the setplacement- how the set spreads its structure- Returns:
- an authored structure set
- Since:
- 3.4.0
-
decode
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
-