MonitoringMinecraft MonitoringMinecraft

Spis Ui Api

Мод NeoForge

Library mod that adds easy to use UI elements like Custom Fonts or animated textures

0 скачиваний 0 подписчиков
Оцените первым

Who It's For?

This library is mainly for use in my mods, to streamline creating ui/gui interfaces. However anyone can use this mod as a dependency to use its features.

Why Use It?

Currently the mod does the following; A new set of drawStrings(), which adds easily accessed custom fonts, aswell as wordwrapping to custom bounding boxes, and setting the alignment to left/center/right.
Quick Example

How Use It?

Github Wiki
Imports

import net.spidrone.uiapi.UIAnimationManager;  
import net.spidrone.uiapi.UIGraphicsHelper;  

Animated Graphics

UIAnimationManager.drawGif(GuiGraphics graphics, String imagePath, int x, int y, int frameWidth, int frameHeight, int totalFrames, int fps, float scaleX, float scaleY, float red, float green, float blue)

Custom drawString()

UIGraphicsHelper.drawCustomFont(GuiGraphics graphics, ResourceLocation fontLocation, String message, int x, int y, int color, boolean dropShadow, TextAlign align)

Custom drawString() with bounding boxes/autowrap/line splitting

UIGraphicsHelper.drawCustomFontBound(GuiGraphics graphics, ResourceLocation fontLocation, String message, char splitChar, int x1, int y1, int x2, int y2, int color, boolean dropShadow, TextAlign align)

not including something like the fontLocation will cause it to use the default font align : LEFT/CENTER/RIGHT

splitChar "$" will cause hi$world to appear on your ui as

hi
world

Register your fonts ttf by placing them in your assets folder assets/modid/font in the same folder include a .json file

{
  "providers": [
    {
      "type": "ttf",
      "file": "spis_ui_api:boldpixels.ttf",
      "shift": [0.0, 0.0],
      "size": 16.0,
      "oversample": 2.0
    }
  ]
}

Declare the fonts resource location in your ui

public static final ResourceLocation BOLD_PIXELS_FONT = ResourceLocation.fromNamespaceAndPath("spis_ui_api", "boldpixels");

Credits

Bold Pixels : https://yukipixels.itch.io/boldpixels
The font is absolutely perfect for minecraft

Extras

Q: Do you support X version
A: This library will mostly be used by me for my own projects, If you'd like to request a version you can join the discord, but nothing before 1.21.1 will be considered

Смотри также

Похожие подборки моды — по версиям Майнкрафта, загрузчикам и жанрам.

Сервера Майнкрафт

Играть интереснее на сервере — выбирай в рейтинге серверов Майнкрафт и заходи прямо сейчас.

SkyBars
SkyBars Java + BE
270 онлайн
1.8 — 26.2 версия
🎮 ВЫЖИВАНИЕ ⚔️ АНАРХИЯ 🚗 ГТА РП 🎤 ГОЛОСОВОЙ ЧАТ 🎁 БЕСПЛАТНЫЙ ДОНАТ 🌟 СМП 💻 ПК+ТЕЛЕФОН
Battle Mine
Battle Mine Java + BE
2 онлайн
1.21.4 — 26.2 версия
ОТКРЫТИЕ! 20 + различных ивентов, 10+ различных боссов, много интересных механник
AxisMine - ВаниллаPlus
6 онлайн
1.21.4 — 26.1.2 версия
Ванильный мир с сотнями уникальных механик и справедливой игрой! /free, pat-pat, emotecraft, Voice.
EVY-MC ЖДЕМ ИМЕННО ТЕБЯ
0 онлайн
1.21.1 — 1.21.11 версия
Уютное выживание с живой экономикой, голосовым чатом и 50 достижениями
MineLauncher
Лаунчер Майнкрафт без лицензии — все версии
Бесплатный лаунчер для ПК и Андроид — все версии 26.2, 1.21.11, 26.1.2, 1.21.8. Fabric, NeoForge, Forge, шейдеры, моды и скины в один клик.
Без лицензии Fabric, NeoForge, Forge Моды, шейдеры, скины Все версии Майнкрафта ПК и Андроид Для слабых ПК Сервера в лаунчере
Скачать бесплатно
Windows и Андроид · Бесплатно · Без лицензии
Наш чат