Class AddDebugSubscriptionFlagsEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.AddDebugSubscriptionFlagsEvent
public final class AddDebugSubscriptionFlagsEvent
extends net.neoforged.bus.api.Event
This event allows mods to register client-side debug subscription flags.
These flags are used to determine when subscriptions are allowed to register and store debug renderer values.
If no flag is registered for a given debug subscription then it will be treated as a always-disabled flag and no debug values will be stored for it.
This event is fired once per tick during ClientDebugSubscriber.requestedSubscriptions().
This event is fired on the logical client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.objects.ObjectBooleanBiConsumer<DebugSubscription<?>> -
Constructor Summary
ConstructorsConstructorDescriptionAddDebugSubscriptionFlagsEvent(it.unimi.dsi.fastutil.objects.ObjectBooleanBiConsumer<DebugSubscription<?>> registrar) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddActiveInDev(Supplier<? extends DebugSubscription<?>> subscription) Mark the given debug subscription as only active in dev.voidaddActiveInDev(DebugSubscription<?> subscription) Mark the given debug subscription as only active in dev.voidaddFlag(Supplier<? extends DebugSubscription<?>> subscription, boolean flag) Register a new flag for the given debug subscription.voidaddFlag(DebugSubscription<?> subscription, boolean flag) Register a new flag for the given debug subscription.
-
Field Details
-
registrar
-
-
Constructor Details
-
AddDebugSubscriptionFlagsEvent
@Internal public AddDebugSubscriptionFlagsEvent(it.unimi.dsi.fastutil.objects.ObjectBooleanBiConsumer<DebugSubscription<?>> registrar)
-
-
Method Details
-
addFlag
Register a new flag for the given debug subscription.- Parameters:
subscription- debug subscription to register flag for.flag- Flag used to conditionally enable or disable the given debug subscription.
-
addFlag
Register a new flag for the given debug subscription.- Parameters:
subscription- Debug subscription to register flag for.flag- Flag used to conditionally enable or disable the given debug subscription.
-
addActiveInDev
Mark the given debug subscription as only active in dev.Using this method will mark your debug subscription as only being enabled in dev a.k.a when FMLEnvironment.isProduction() ==
false.- Parameters:
subscription- debug subscription to register flag for.
-
addActiveInDev
Mark the given debug subscription as only active in dev.Using this method will mark your debug subscription as only being enabled in dev a.k.a when FMLEnvironment.isProduction() ==
false.- Parameters:
subscription- Debug subscription to register flag for.
-