Class RegisterMaterialAtlasesEvent

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

public class RegisterMaterialAtlasesEvent extends net.neoforged.bus.api.Event implements net.neoforged.fml.event.IModBusEvent
Fired for registering texture atlases that will be used with Material or other systems which retrieve the atlas via Minecraft.getTextureAtlas(ResourceLocation) or ModelManager.getAtlas(ResourceLocation).

If an atlas is registered via this event, then it must NOT be used through a TextureAtlasHolder.

This event fires during startup when the ModelManager is constructed.

This event is not cancellable.

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

  • Field Details

  • Constructor Details

  • Method Details

    • register

      public void register(ResourceLocation atlasLocation, ResourceLocation atlasInfoLocation)
      Register a texture atlas with the given name and info location
      Parameters:
      atlasLocation - The name of the texture atlas
      atlasInfoLocation - The location of the atlas info JSON relative to the atlases directory