Class ClientDebugSubscriptionRegistry

java.lang.Object
net.fabricmc.fabric.api.client.debug.v1.ClientDebugSubscriptionRegistry

public final class ClientDebugSubscriptionRegistry extends Object
A registry for debug subscriptions on the client, allowing listening to registered debug subscriptions on the client.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> void
    register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription)
    Registers a DebugSubscription on the client.
    static <T> void
    register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription, boolean isEnabledFlag)
    Registers a DebugSubscription on the client if the isEnabledFlag parameter is true.

    Methods inherited from class Object

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

    • ClientDebugSubscriptionRegistry

      public ClientDebugSubscriptionRegistry()
  • Method Details

    • register

      public static <T> void register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription)
      Registers a DebugSubscription on the client.
      Type Parameters:
      T - the inner type of the DebugSubscription.
      Parameters:
      debugSubscription - the DebugSubscription to register.
      API Note:
      This will register outside development environments if it is not checked. Surround calls to this method with FabricLoader.isDevelopmentEnvironment() if you do not intend for a debug feature to be present in production.
    • register

      public static <T> void register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription, boolean isEnabledFlag)
      Registers a DebugSubscription on the client if the isEnabledFlag parameter is true.
      Type Parameters:
      T - the inner type of the DebugSubscription.
      Parameters:
      debugSubscription - the DebugSubscription to register.
      isEnabledFlag - the flag determining whether to register this DebugSubscription.
      API Note:
      This will register outside development environments if it is not checked. Surround calls to this method with FabricLoader.isDevelopmentEnvironment() if you do not intend for a debug feature to be present in production.