Contents
Interface Content
- All Known Implementing Classes:
BiomeCoverContent, BiomeDynamicLayerContent, BiomeFluidContent, BiomePrefabContent, BiomeStaticLayerContent, BiomeTintContent, CaveCoverContent, CavePrefabContent, CaveTypeContent, CoverContent, FileContent, LayerContent, PrefabContent
public interface Content
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAn enumeration representing various content types for aContentinstance. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ArrayCodec<Content> Array codec for Content arraysstatic final Content[]Empty array of Blobsstatic final CodecMapCodec<Content> Type dispatch codec for Content implementationsstatic final StringType dispatch key for the Content TYPE_CODEC -
Method Summary
Modifier and TypeMethodDescription<T> voidapplyTo(ModifyEvent<T> event) Applies the content defined in this instance to a specifiedModifyEvent.type()The contentContent.Typethat this instance represents
-
Field Details
-
TYPE_KEY
-
EMPTY_ARRAY
Empty array of Blobs -
TYPE_CODEC
Type dispatch codec for Content implementations -
ARRAY_CODEC
Array codec for Content arrays
-
-
Method Details
-
type
Content.Type type()The contentContent.Typethat this instance represents- Returns:
- The content type
-
applyTo
Applies the content defined in this instance to a specifiedModifyEvent. The content will be conditionally loaded and appended to the event's mutable entries if successfully resolved through the event's loader.- Type Parameters:
T- The type of entries managed by theModifyEvent.- Parameters:
event- The modification event to which this content should be applied. It provides access to a loader for resolving content, a list of entries to which the resolved content can be added, and relevant metadata.- Throws:
Exception- If an error occurs during content loading or modification.
-