MinecraftUtils API provides a collection of general Minecraft-related utility functions to simplify common tasks in mod development.
Accessing MinecraftUtils
Get an instance using dependency injection:Sending chat messages
sendMessage
Queue messages to be displayed in the player’s chat, client-side only.The simple
sendMessage(String) variant prefixes messages with [Essential] and should only be used for Essential-specific information. For custom messages, use the two-parameter version or UTextComponent.sendChatMessageAndFormat
Send messages with Minecraft’s I18n translation and formatting.Server detection
isHypixel
Check if the player is currently connected to the Hypixel server.Resource handling
getResourceImage
Load a ResourceLocation into memory as a BufferedImage for use in dynamic textures.Environment detection
isDevelopment
Check if the game is running in a development environment rather than production.API reference
Methods
Sends a message prefixed with
[Essential] to the player’s chat.Sends a formatted message with a custom prefix:
$prefix&r$message.Sends a message translated and formatted using Minecraft’s I18n utility.
Sends a message translated with I18n using the given parameters.
Returns whether the player is currently on the Hypixel server.
Loads a ResourceLocation into memory as a BufferedImage. Returns null if loading fails.
Returns true if the game is launched in a development environment.