Class StandaloneModelKey<T>

java.lang.Object
net.neoforged.neoforge.client.model.standalone.StandaloneModelKey<T>
Type Parameters:
T - The type returned by the StandaloneModelBaker this key is registered with

public final class StandaloneModelKey<T> extends Object
A key referring to a model file to be loaded and baked as a standalone model (not bound to a block or item).

This key is registered together with a StandaloneModelBaker or UnbakedStandaloneModel in ModelEvent.RegisterStandalone and later used to retrieve the model baked by the StandaloneModelBaker, using ModelManager.getStandaloneModel(StandaloneModelKey).

The key is compared by identity as multiple keys may refer to the same model file while using different bakers.

  • Field Details

    • modelId

      private final net.minecraft.resources.ResourceLocation modelId
  • Constructor Details

    • StandaloneModelKey

      public StandaloneModelKey(net.minecraft.resources.ResourceLocation modelId)
  • Method Details

    • getModelId

      public net.minecraft.resources.ResourceLocation getModelId()
    • toString

      public String toString()
      Overrides:
      toString in class Object