Class GuideRegistration

java.lang.Object
ke.ric.api.GuideRegistration

public final class GuideRegistration extends Object
Owner-scoped registration facade for immutable addon guide definitions.
  • Method Details

    • register

      public void register(GuideDefinition definition)
    • registerProductionDestination

      public void registerProductionDestination(RecipeItemRef item, String qualifier, GuideDestination destination)
      Register an exact logical ingredient destination inside its owning addon callback.
    • registerProductionDestination

      public void registerProductionDestination(RecipeItemRef item, String qualifier, GuideDestination destination, Supplier<org.bukkit.inventory.ItemStack> preview)
      Register one exact producer and its optional visible output. The supplier is evaluated only for requested ingredients; Core projects its appearance onto a fresh credential-free item. Return null or throw when the current preset is unavailable to retain the ordinary fallback.
    • registerProductionDestination

      public void registerProductionDestination(RecipeItemRef item, String qualifier, GuideDestination destination, Supplier<org.bukkit.inventory.ItemStack> preview, boolean preferProduction)
      Explicitly opt a declared ingredient into its full production guide before individual recipes.
    • registerTagProductionDestination

      public void registerTagProductionDestination(String customTag, GuideDestination destination)
      A tag destination is selected only from a declared custom_tag, never from its representative icon.
    • findTagProductionDestination

      public Optional<GuideRegistration.OwnedProductionDestination> findTagProductionDestination(String customTag)
    • findProductionDestination

      public Optional<GuideRegistration.OwnedProductionDestination> findProductionDestination(RecipeItemRef item, String qualifier)
      Exact typed matching; a qualified ingredient never silently falls back to its base item.
    • registerItemUse

      public void registerItemUse(String id, RecipeItemRef input, RecipeItemRef output, GuideDestination destination, String label, Predicate<org.bukkit.entity.Player> visibility)
      Register a nonrecipe relationship with explicit logical identities and viewer visibility. Output appearances are resolved by Core's authoritative typed item resolver when displayed. IDs are unique within the owning addon; destination guides must share that owner.
    • findItemUses

      public List<GuideRegistration.OwnedItemUse> findItemUses(RecipeItemRef input, org.bukkit.entity.Player viewer)
      Discovery is checked before any entries, output identities or counts are exposed.
    • createProductionPreview

      public org.bukkit.inventory.ItemStack createProductionPreview(RecipeItemRef item, String qualifier)
      Resolve from the current registration each time; provider-owned items remain opaque.
    • clear

      public int clear()
      Clear only the current callback owner's guides before replacing them.
    • find

      public Optional<GuideDefinition> find(String id)
    • find

      public Optional<GuideDefinition> find(String ownerId, String id)
      Finds a guide only while the same addon still owns its normalized ID.
    • ownedGuides