Class RegisterSpriteDefaultMetadataSectionTypesEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterSpriteDefaultMetadataSectionTypesEvent
All Implemented Interfaces:
IModBusEvent

public class RegisterSpriteDefaultMetadataSectionTypesEvent extends net.neoforged.bus.api.Event implements IModBusEvent
Fired to allow mods to register their own default metadata section types for use during sprite loading. This event is fired once on startup, before the initial resource reload.

It is important to note that this event only affects texture atlases using SpriteLoader.DEFAULT_METADATA_SECTIONS, which includes:

Atlases using the TextureAtlasHolder(TextureManager, ResourceLocation, ResourceLocation, Set) constructor, such as GuiSpriteManager, or SpriteLoader.loadAndStitch(ResourceManager, ResourceLocation, int, Executor, Collection) instead override this list and should instead specify any additional metadata section types in the last parameter, or, if they desire to use the default collection in addition to their own, lazily compute a merged collection.

This event is fired on the mod-specific event bus, only on the logical client.

  • Field Details

  • Constructor Details

    • RegisterSpriteDefaultMetadataSectionTypesEvent

      @Internal public RegisterSpriteDefaultMetadataSectionTypesEvent(Set<MetadataSectionType<?>> defaultTypes)
  • Method Details