Package mindustry.mod

Class DataImagePacker

java.lang.Object
mindustry.mod.DataImagePacker

public class DataImagePacker extends Object
Manages data patch images.
  • Field Details

  • Constructor Details

    • DataImagePacker

      public DataImagePacker()
  • Method Details

    • pack

      public void pack(arc.struct.Seq<ImageAsset> images)
      Packs a new set of images. If images are already packed, disposes of the old ones.
    • unload

      public void unload()
    • addTexture

      public void addTexture(String name, byte[] pngData)
      Decodes PNG bytes and registers them into the atlas under "netRegionPrefix + name", replacing any existing image with the same name. Safe to call from any thread.
    • removeTextureQueued

      public void removeTextureQueued(String name)
      Queues a texture for removal. Will run after any pending addTexture(java.lang.String, byte[]) calls so that races do not occur.
    • printStats

      public void printStats(arc.graphics.g2d.PixmapPacker mainPacker, arc.graphics.g2d.PixmapPacker envPacker)