Class SkinRegistry

java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.Identifier, SkinDefinition>>
net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<SkinDefinition>
cromveil.combatnumbers.skins.SkinRegistry
All Implemented Interfaces:
net.minecraft.server.packs.resources.PreparableReloadListener

public class SkinRegistry extends net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener<SkinDefinition>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier, net.minecraft.server.packs.resources.PreparableReloadListener.SharedState, net.minecraft.server.packs.resources.PreparableReloadListener.StateKey<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    apply(Map<net.minecraft.resources.Identifier, SkinDefinition> entries, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler)
     
    Reads the PNG bytes for every sprite skin so the server can stream them to clients (whose resource packs won't contain the override textures).
    Map<net.minecraft.resources.Identifier, SkinDefinition>
     
    void
     

    Methods inherited from class net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener

    getPreparedPath, prepare, scanDirectory, scanDirectory, scanDirectoryWithOptionalValues

    Methods inherited from class net.minecraft.server.packs.resources.SimplePreparableReloadListener

    reload

    Methods inherited from class net.neoforged.neoforge.resource.ContextAwareReloadListener

    getContext, getRegistryLookup, injectContext, makeConditionalOps, makeConditionalOps

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener

    getName, prepareSharedState
  • Constructor Details

    • SkinRegistry

      public SkinRegistry()
  • Method Details

    • apply

      protected void apply(Map<net.minecraft.resources.Identifier, SkinDefinition> entries, net.minecraft.server.packs.resources.ResourceManager manager, net.minecraft.util.profiling.ProfilerFiller profiler)
      Specified by:
      apply in class net.minecraft.server.packs.resources.SimplePreparableReloadListener<Map<net.minecraft.resources.Identifier, SkinDefinition>>
    • getAll

      public Map<net.minecraft.resources.Identifier, SkinDefinition> getAll()
    • setOnReload

      public void setOnReload(Runnable callback)
    • buildTexturePacket

      public SyncSpriteTexturePacket buildTexturePacket()
      Reads the PNG bytes for every sprite skin so the server can stream them to clients (whose resource packs won't contain the override textures).
      Returns:
      a texture packet, or null if there are no sprite textures to send.