-
-
Notifications
You must be signed in to change notification settings - Fork 1
Miscellaneous
Here's an example implementation:
public class OverlayRendererImpl {
public static void initialize() {
RenderEvents.HUD_RENDERING.register((matrices, delta) -> {
TimerOverlayRenderer.register(matrices, cooldown, maxCooldown, iconAsItem);
});
}
}By defining the cooldown, maxCooldown and iconAsItem, you'll see a icon like the following in your bottom-right corner of you're in-game-HUD:

This will register a key in your menu settings.
public static final KeyMapping SOME_KEY = new KeyMapping("key.some_key_lang", InputConstants.Type.KEYSYM,
GLFW.GLFW_KEY_GRAVE_ACCENT, "key.categories.key_category");
KeyBindingRegistry.register(SOME_KEY);Remember to replace "key.some_key_lang", GLFW.GLFW_KEY_GRAVE_ACCENT and "key.categories.key_category" in the example!
{:.note}
Calling VIPs.cachePatreons(){:.language-java .highlight} returns a List<UUID>{:.language-java .highlight}, where patreons are obtained from the remote CraftedCore repository, a built-in file and, if enabled, the CraftedCore-Config.
This caches an texture at the specified URL and parses it into Minecraft's texture management. This returns the assigned ResourceLocation{:.language-java.highlight} of the texture or null{:.language-java.highlight}, if there was an error parsing the texture.
TextureCache.getTextureId(namespace, type, prefix, fileType, textureURL);
// e.g. the following will return the ResourceLocation (where the "random numbers" are auto-generated):
// modid:textures/entity/custom_skin_<random numbers>.png
TextureCache.getTextureId("modid", "entity", "custom_skin_", "png", new URI("https://example.com/skin.png").toURL());