▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
GUItem

GUItem

Item models for customizing container GUI.

627
13

What is this?

  • Does not replace existing textures or models of the vanilla game.
  • Use custom item models to decorate the container GUI instead of Glass Panes and Heads.
  • Stack layers of models, then use custom model data to control.
  • Template models for easily creating layer models from textures.
  • An item model definition as an example or direct use.

GUItem

The goal is to imitate the container GUI by covering inventory slots with pieces of the GUI elements.

Models can be created from template models by simply providing textures to the specified texture variable.
The templates and models are categorized from GUI elements, layered from bottom to top:

  • Background
    • The bottom layer that can be displayed.
    • Ignorable or unimportant information that does not affect the reading.
  • Field
    • To declare sections or primary color fill.
  • Pattern
    • Visually interact with.
    • Implicit or direct informing of something.
  • Slot
    • Can insert, take, or preview items.
  • Button
    • Something will happen when interacting with.
    • Must have a placeholder state if the action cannot be available.
  • Icon
    1. Expression of condensed information.
    2. Symbols or graphics representing.
  • Foreground
    • The top layer that can be displayed.
    • Any information that must be shown, even if the items can be covered.

Models can then be composed into the item model definition, and can also be controlled by custom model data by adding some tricks.
Here is an example /give command to get a "check mark button" by using the provided item model definition: /give @s minecraft:recovery_compass[minecraft:item_model='guitem:gui_stack',minecraft:custom_model_data={"strings":["","","","","button","check_mark",""]}]

GUI Pieces

Most pieces are designed to fit a whole slot size:
An animated image that shows how the one-slot pieces act in inventory.

Some pieces have a greater cover area that extends to other slots, representing a complete element or being a foreground/background to the others:
An animated image demonstrating how oversized pieces work in the inventory. An animated image demonstrating how oversized pieces work in the inventory.

Playing with oversized items with caution! They may have their own rules for covering items:
The special covering rules to the oversized item

Reminder

  1. The item model definition, after Minecraft 1.21.6, added oversized_in_gui to control whether the model can exceed a slot (true) or be trimmed to slot size (false, default).
  2. Try combining with the custom fonts as well. Although the container name cannot be changed without reopening the UI, it's still a great option for drawing static content; on the other hand, modeled items handle dynamic content.

Known Issues

  • Item models are rendered slightly dim.
    • It seems like this upstream issue is fixed along with the lightmap algorithm changes made in Minecraft 26.1 snapshot 1.
  • Oversized models sometimes have a smaller UV area, resulting in the wrong scaling of the texture.
  • Some oversized models are missing their top row of pixels(GUI scaled).

Compatibility Info

  • namespace: guitem
  • atlases directory: gui_item

Совместимость

Minecraft: Java Edition

24w40a1.21.x

Поддерживаемые окружения

Клиент

Создатели

Детали

Лицензия:MIT
Опубликован:1 год назад
Обновлён:4 месяца назад
Главная