Interface Content

All Known Implementing Classes:
BiomeCoverContent, BiomeDynamicLayerContent, BiomeFluidContent, BiomePrefabContent, BiomeStaticLayerContent, BiomeTintContent, CaveCoverContent, CavePrefabContent, CaveTypeContent, CoverContent, FileContent, LayerContent, PrefabContent

public interface Content
  • Field Details

    • TYPE_KEY

      static final String TYPE_KEY
      Type dispatch key for the Content TYPE_CODEC
      See Also:
    • EMPTY_ARRAY

      static final Content[] EMPTY_ARRAY
      Empty array of Blobs
    • TYPE_CODEC

      static final CodecMapCodec<Content> TYPE_CODEC
      Type dispatch codec for Content implementations
    • ARRAY_CODEC

      static final ArrayCodec<Content> ARRAY_CODEC
      Array codec for Content arrays
  • Method Details

    • type

      Content.Type type()
      The content Content.Type that this instance represents
      Returns:
      The content type
    • applyTo

      <T> void applyTo(ModifyEvent<T> event) throws Exception
      Applies the content defined in this instance to a specified ModifyEvent. 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 the ModifyEvent.
      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.