ClientProfile
com.jsmacrosce.jsmacros.client.config.ClientProfile
Client-side profile implementation with client event, library, and helper registrations and client-specific error reporting.
Scripts can access the active profile through the client core:
js
const Client = Java.type('com.jsmacrosce.jsmacros.client.JsMacrosClient');
const profile = Client.clientCore.profile;
Chat.log(profile.getCurrentProfileName());Constructors
new ClientProfile
new ClientProfile(Core<ClientProfile, ?> runner, Logger logger)#Stores the supplied core and logger through the base profile; registry setup and profile loading are not performed here.
Parameters:
runner: client core associated with this profilelogger: logger for diagnostics
Fields
ignoredErrors
Methods
checkJoinedThreadStack
checkJoinedThreadStack(): boolean#Checks whether the current thread is Minecraft's thread or is present in this profile's joined-thread set.
Returns:
true on the Minecraft thread or when the current thread is in the joined-thread setinitRegistries
initRegistries(): void#Initializes base registries, then registers client events, libraries, and helper mappings. Called during profile initialization; not intended for script invocation.
logError
Prints the failure's stack trace, then attempts to queue a chat report when a GUI is available unless its class or a runtime exception's direct cause matches
ignoredErrors. A runtime exception is unwrapped when its message equals its cause's string form. If neither ignore check suppresses it and the runtime exception has a non-null cause but a null message, the comparison can throw NullPointerException. Chat reporting is queued and is not guaranteed to display successfully.Parameters:
ex: non-null failure to report