Class RegisterDebugEntriesEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterDebugEntriesEvent
- All Implemented Interfaces:
IModBusEvent
public final class RegisterDebugEntriesEvent
extends net.neoforged.bus.api.Event
implements IModBusEvent
Event fired when debug entries are registered.
This event is fired during the DebugScreenEntries initialization to allow registration of custom entries.
Existing entries cannot be modified or amended directly. However new lines can be appended to existing groups,
such as the "System Specs", by using DebugScreenDisplayer.addToGroup(Identifier, java.lang.String).
This event is fired on the mod event bus.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<Identifier, DebugScreenEntryStatus> private final Map<Identifier, DebugScreenEntry> private final Map<Identifier, DebugScreenEntryStatus> -
Constructor Summary
ConstructorsConstructorDescriptionRegisterDebugEntriesEvent(Map<Identifier, DebugScreenEntry> entries, Map<Identifier, DebugScreenEntryStatus> defaultProfile, Map<Identifier, DebugScreenEntryStatus> performanceProfile) -
Method Summary
Modifier and TypeMethodDescriptionprivate Map<Identifier, DebugScreenEntryStatus> getProfileMap(DebugScreenProfile profile) voidincludeInProfile(Identifier id, DebugScreenProfile profile, DebugScreenEntryStatus profileStatus) Includes the entry into the given profile.booleanisIncludedInProfile(Identifier id, DebugScreenProfile profile) Returns true if the entry is included into the given profile.booleanReturns true if the given entry id has been registered.voidregister(Identifier id, DebugScreenEntry entry) Registers a newDebugScreenEntryto allow it to be used for debug rendering and state toggling.private @Nullable IllegalStateExceptionvalidateProfile(DebugScreenProfile profile)
-
Field Details
-
entries
-
defaultProfile
-
performanceProfile
-
-
Constructor Details
-
RegisterDebugEntriesEvent
@Internal public RegisterDebugEntriesEvent(Map<Identifier, DebugScreenEntry> entries, Map<Identifier, DebugScreenEntryStatus> defaultProfile, Map<Identifier, DebugScreenEntryStatus> performanceProfile)
-
-
Method Details
-
register
Registers a newDebugScreenEntryto allow it to be used for debug rendering and state toggling.- Parameters:
id- Registration ID for this entry.entry- Screen entry to be registered.
-
isRegistered
Returns true if the given entry id has been registered.- Returns:
- true if the given entry id has been registered
-
includeInProfile
public void includeInProfile(Identifier id, DebugScreenProfile profile, DebugScreenEntryStatus profileStatus) Includes the entry into the given profile.- Parameters:
id- Registration ID for this entry.profile- Debug profile this entry will be included with.profileStatus- Status this entry will be set to when the profile is enabled.
-
isIncludedInProfile
Returns true if the entry is included into the given profile.- Returns:
- true if the entry is included into the given profile
-
getProfileMap
-
validateProfiles
@Internal public Map<DebugScreenProfile, Map<Identifier, DebugScreenEntryStatus>> validateProfiles() -
validateProfile
-