-
-
Notifications
You must be signed in to change notification settings - Fork 1
Custom Textures
Anaku Senko edited this page Aug 23, 2022
·
2 revisions
- New Texture.
- Start of element on horizontal plane (left to right).
- start of element on virtical plane (top to bottom).
- Width of element.
- Height of element.
- Width of texture.
- height of texture.
/* * Set Identifier to new texture path * */
public static final Identifier MANA_HUD_ELEMENT = new Identifier("mana_demo", "textures/gui/mana_hud_element.png");
/* * register new TextureRecord * */
public static final TextureRecord MANA_ICON = new TextureRecord(MANA_HUD_ELEMENT, 99, 0, 9, 9, 256, 256);
Call method/methods in mod/client init
public static void setNewTextures() {
/* * Set new textures for mana hud element * */
RenderHudFunctions.setDefaultTexture(MANA_HUD_ELEMENT);
/* * set new Y mod increment for mana hud element (default should be bar height + 1) * */
RenderHudFunctions.setYModIncrement(10);
}