Class FabricModelPredicateProviderRegistry
java.lang.Object
net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 providerprovider
- 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 toid
- the identifier of the providerprovider
- the provider
-