Class FabricModelPredicateProviderRegistry

java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry

public final class FabricModelPredicateProviderRegistry extends Object
Allows registering model predicate providers for item models.

A registered model predicate providers for an item can be retrieved through ModelPredicateProviderRegistry.get(Item, Identifier).

See Also:
ModelPredicateProviderRegistry
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    register​(net.minecraft.item.Item item, net.minecraft.util.Identifier id, net.minecraft.client.item.UnclampedModelPredicateProvider provider)
    Registers a model predicate provider to a specific item.
    static void
    register​(net.minecraft.util.Identifier id, net.minecraft.client.item.UnclampedModelPredicateProvider provider)
    Registers a model predicate provider that is applicable for any item.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FabricModelPredicateProviderRegistry

      public FabricModelPredicateProviderRegistry()
  • Method Details

    • register

      public static void register(net.minecraft.util.Identifier id, net.minecraft.client.item.UnclampedModelPredicateProvider provider)
      Registers a model predicate provider that is applicable for any item.
      Parameters:
      id - the identifier of the provider
      provider - the provider
    • register

      public static void register(net.minecraft.item.Item item, net.minecraft.util.Identifier id, net.minecraft.client.item.UnclampedModelPredicateProvider provider)
      Registers a model predicate provider to a specific item.
      Parameters:
      item - the item the provider is associated to
      id - the identifier of the provider
      provider - the provider