Class ItemPropertiesRegistry

java.lang.Object
dev.architectury.registry.item.ItemPropertiesRegistry

@Environment(CLIENT) public final class ItemPropertiesRegistry extends Object
Registry for registering item properties used for model predicates.
See Also:
  • ItemProperties
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.client.renderer.item.ClampedItemPropertyFunction
    register(net.minecraft.world.level.ItemLike item, net.minecraft.resources.ResourceLocation propertyId, net.minecraft.client.renderer.item.ClampedItemPropertyFunction function)
    Registers a generic item property function for a specific item.
    static net.minecraft.client.renderer.item.ClampedItemPropertyFunction
    registerGeneric(net.minecraft.resources.ResourceLocation propertyId, net.minecraft.client.renderer.item.ClampedItemPropertyFunction function)
    Registers a generic item property function for all items.

    Methods inherited from class java.lang.Object

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

    • registerGeneric

      public static net.minecraft.client.renderer.item.ClampedItemPropertyFunction registerGeneric(net.minecraft.resources.ResourceLocation propertyId, net.minecraft.client.renderer.item.ClampedItemPropertyFunction function)
      Registers a generic item property function for all items.
      Parameters:
      propertyId - the id of the property
      function - the function to be registered
      Returns:
      the function registered
    • register

      public static net.minecraft.client.renderer.item.ClampedItemPropertyFunction register(net.minecraft.world.level.ItemLike item, net.minecraft.resources.ResourceLocation propertyId, net.minecraft.client.renderer.item.ClampedItemPropertyFunction function)
      Registers a generic item property function for a specific item.
      Parameters:
      item - the item to be registered for
      propertyId - the id of the property
      function - the function to be registered
      Returns:
      the function registered