Package baritone.api.utils
Interface Helper
- All Known Subinterfaces:
ICommand
public interface Helper
An ease-of-access interface to provide the
Minecraft game instance,
chat and console logging mechanisms, and the Baritone chat prefix.- Since:
- 8/1/2018
- Author:
- Brady
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HelperInstance ofHelper.static final net.minecraft.client.MinecraftDeprecated.static final net.minecraft.client.GuiMessageTagThe tag to assign to chat messages whenSettings.useMessageTagistrue. -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.network.chat.Componentdefault voidSend a message to chat only if chatDebug is ondefault voidlogDirect(boolean logAsToast, net.minecraft.network.chat.Component... components) Send components to chat with the [Baritone] prefixdefault voidSend a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)default voidSend a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)default voidSend a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)default voidSend a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)default voidlogDirect(net.minecraft.network.chat.Component... components) Send components to chat with the [Baritone] prefixdefault voidlogNotification(String message) Send a message as a desktop notificationdefault voidlogNotification(String message, boolean error) Send a message as a desktop notificationdefault voidlogNotificationDirect(String message) Send a message as a desktop notification regardless of desktopNotifications (should only be used for critically important messages)default voidlogNotificationDirect(String message, boolean error) Send a message as a desktop notification regardless of desktopNotifications (should only be used for critically important messages)default voidSend a message to display as a toast popupdefault voidSend a message to display as a toast popupdefault voidlogToast(net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component message) Send a message to display as a toast popupdefault voidlogUnhandledException(Throwable exception)
-
Field Details
-
HELPER
Instance ofHelper. Used for static-context reference. -
mc
Deprecated.The main game instance returned byMinecraft.getInstance(). Deprecated sinceIPlayerContext.minecraft()should be used instead (In the majority of cases). -
MESSAGE_TAG
The tag to assign to chat messages whenSettings.useMessageTagistrue.
-
-
Method Details
-
getPrefix
-
logToast
default void logToast(net.minecraft.network.chat.Component title, net.minecraft.network.chat.Component message) Send a message to display as a toast popup- Parameters:
title- The title to display in the popupmessage- The message to display in the popup
-
logToast
Send a message to display as a toast popup- Parameters:
title- The title to display in the popupmessage- The message to display in the popup
-
logToast
Send a message to display as a toast popup- Parameters:
message- The message to display in the popup
-
logNotification
Send a message as a desktop notification- Parameters:
message- The message to display in the notification
-
logNotification
Send a message as a desktop notification- Parameters:
message- The message to display in the notificationerror- Whether to log as an error
-
logNotificationDirect
Send a message as a desktop notification regardless of desktopNotifications (should only be used for critically important messages)- Parameters:
message- The message to display in the notification
-
logNotificationDirect
Send a message as a desktop notification regardless of desktopNotifications (should only be used for critically important messages)- Parameters:
message- The message to display in the notificationerror- Whether to log as an error
-
logDebug
Send a message to chat only if chatDebug is on- Parameters:
message- The message to display in chat
-
logDirect
Send components to chat with the [Baritone] prefix- Parameters:
logAsToast- Whether to log as a toast notificationcomponents- The components to send
-
logDirect
Send components to chat with the [Baritone] prefix- Parameters:
components- The components to send
-
logDirect
Send a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)- Parameters:
message- The message to display in chatcolor- The color to print that message inlogAsToast- Whether to log as a toast notification
-
logDirect
Send a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)- Parameters:
message- The message to display in chatcolor- The color to print that message in
-
logDirect
Send a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)- Parameters:
message- The message to display in chatlogAsToast- Whether to log as a toast notification
-
logDirect
Send a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command)- Parameters:
message- The message to display in chat
-
logUnhandledException
-