Class TextureStitchEvent.Pre

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.TextureStitchEvent
net.minecraftforge.client.event.TextureStitchEvent.Pre
All Implemented Interfaces:
IModBusEvent
Enclosing class:
TextureStitchEvent

public static class TextureStitchEvent.Pre extends TextureStitchEvent

Fired before a texture atlas is stitched together. This can be used to add custom sprites to be stitched into the atlas.

This event is not cancellable, and does not have a result.

This event is fired on the FMLJavaModLoadingContext.getModEventBus() mod-specific event bus}, only on the logical client.

  • Field Details

  • Constructor Details

  • Method Details

    • addSprite

      public boolean addSprite(ResourceLocation sprite)
      Adds a sprite to be stitched into the texture atlas.

      Callers should check that the atlas which the event is fired for is the atlas they wish to stitch the sprite into, as otherwise they would be stitching the sprite into all atlases.

      Parameters:
      sprite - the location of the sprite