Class ClientDebugSubscriptionRegistry
java.lang.Object
net.fabricmc.fabric.api.client.debug.v1.ClientDebugSubscriptionRegistry
A registry for debug subscriptions on the client,
allowing listening to registered debug subscriptions on the client.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidregister(net.minecraft.util.debug.DebugSubscription<T> debugSubscription) Registers aDebugSubscriptionon the client.static <T> voidregister(net.minecraft.util.debug.DebugSubscription<T> debugSubscription, boolean isEnabledFlag) Registers aDebugSubscriptionon the client if theisEnabledFlagparameter istrue.
-
Constructor Details
-
ClientDebugSubscriptionRegistry
public ClientDebugSubscriptionRegistry()
-
-
Method Details
-
register
public static <T> void register(net.minecraft.util.debug.DebugSubscription<T> debugSubscription) Registers aDebugSubscriptionon the client.- Type Parameters:
T- the inner type of theDebugSubscription.- Parameters:
debugSubscription- theDebugSubscriptionto 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 aDebugSubscriptionon the client if theisEnabledFlagparameter istrue.- Type Parameters:
T- the inner type of theDebugSubscription.- Parameters:
debugSubscription- theDebugSubscriptionto register.isEnabledFlag- the flag determining whether to register thisDebugSubscription.- 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.
-