Class PonderForeignLabelRegistry

java.lang.Object
com.cake.azimuth.ponder.PonderForeignLabelRegistry

public class PonderForeignLabelRegistry extends Object
Registry for mods that inject ponder scenes into Create. Registered mods will have their label rendered below the ponder scene title using the microfont renderer, attributing the scene to its source mod. This happens when the ponder scene's namespace matches the registered mod ID, but the pondered item does not belong to that mod.
  • Constructor Details

    • PonderForeignLabelRegistry

      public PonderForeignLabelRegistry()
  • Method Details

    • register

      public static void register(String modId, String label)
      Register a mod as a ponder labeling mod. When a ponder scene's namespace matches the given modId, but the item to be pondered does not match that modId, the label will be rendered below the scene title in microfont.
      Parameters:
      modId - The mod's namespace (e.g., "bits_n_bobs")
      label - The label text to display (e.g., "BITS N BOBS"). Will be uppercased for microfont rendering.
    • register

      public static void register(String modId, net.minecraft.network.chat.Component label)
      Register a mod as a ponder labeling mod with a translatable component. Use this for full localisation support — the component will be resolved at render time using the current locale.
      Parameters:
      modId - The mod's namespace (e.g., "bits_n_bobs")
      label - The label component (e.g., Component.translatable("mymod.ponder.label"))
    • getLabel

      public static Optional<String> getLabel(String namespace)
      Look up the label for a given scene namespace.
      Parameters:
      namespace - The ponder scene's namespace (from PonderScene.getNamespace())
      Returns:
      The registered label, or empty if no label is registered for this namespace
    • hasLabel

      public static boolean hasLabel(String namespace)
      Check if a namespace has a registered ponder label.