In-Game UI Customizations
Relevant source files
The following files were used as context for generating this wiki page:
In-Game UI Customizations in HoloPrint refer to the configurable visual elements and interactive interfaces provided to Minecraft Bedrock Edition (MCBE) players through generated resource packs. These customizations allow users to modify the appearance of holograms, interact with build schematics via specialized control items, and view required resources through a custom material list interface.
The system bridges the web-based configuration tool and the Bedrock engine's JSON UI and Molang scripting capabilities. Users define settings such as texture outlines, tinting, and control item behaviors on the website, which are then compiled into resource pack files including ui/*.json, render_controllers/*.json, and various translation files.
UI Architecture and Data Flow
The customization process begins in the web application where a configuration object (HoloPrintConfig) is constructed based on user input. This data is then processed by the makePack function to generate the necessary assets for the Bedrock client.
The diagram shows how user configurations from the web interface flow through the generator to produce the final UI-related assets in the resource pack.
Sources: src/HoloPrint.js:68-150, src/index.js:589-623
Template Injection
The system uses pre-defined JSON UI templates located in src/packTemplate/ui/. During the pack generation phase, the engine loads these templates and injects dynamic data, such as calculated dimensions and item IDs.
Sources: src/HoloPrint.js:122-133
Material List Interface
The Material List is a primary UI component that displays the total number of blocks required for a specific build. It is implemented as a custom JSON UI panel within the resource pack.
UI Definition
The interface structure is defined in holoprint_material_list.json. It utilizes standard Bedrock UI components like stack_panel for vertical lists and inventory_item_renderer to display block icons.
- Namespace:
holoprint:material_list - Key Components:
scrolling_panel: Handles overflow when the material list is longer than the screen height.entry: A template for individual list items, containing an icon, item name label, and count label.
Sources: src/packTemplate/ui/holoprint_material_list.json:3-120
Dynamic Population
The addMaterialListUI function in HoloPrint.js is responsible for populating the template with actual data from the scanned structure. It performs the following tasks:
- Entry Injection: Appends a new control for each material found in the structure.
- Sizing Calculation: Dynamically adjusts the
sizeof the content panel based on the number of entries to ensure the UI fits the data. - Formatting: Sets specific Molang variables like
$item_translation_keyand$item_countfor each entry.
Sources: src/HoloPrint.js:597-612
| Parameter | Source | Description |
|---|---|---|
$item_id_aux | Block Metadata | The numeric ID and auxiliary value used by the renderer to show the correct item icon. |
$item_count | MaterialList | The formatted string representing the total required quantity. |
$item_translation_key | .lang files | The key used to fetch the localized name of the block. |
Sources: src/HoloPrint.js:600-605, src/packTemplate/ui/holoprint_material_list.json:106-120
Visual Customizations
Users can customize the rendering of the holographic ghost blocks through the web interface. These settings affect the generated render_controllers and textures.
Texture Outlines and Tints
The application can generate outlines for block textures to improve visibility against complex backgrounds.
- Configuration: Users can set
TEXTURE_OUTLINE_WIDTH(0 to 1px),TEXTURE_OUTLINE_COLOR, andTEXTURE_OUTLINE_OPACITY. - Overlay Tint: A global tint (e.g., light blue) can be applied to the hologram, with an option to toggle it in-game using a "White Dye" control item.
Sources: src/HoloPrint.js:467-476, src/index.js:507-525
Opacity Modes
HoloPrint supports two opacity modes:
- Fixed Opacity: A single alpha value is baked into the hologram.
- In-Game Controls: Multiple versions of textures are generated, allowing players to cycle through different transparency levels (e.g., using an Amethyst Shard).
Sources: src/HoloPrint.js:189-195, src/translations/en_US.json:115-117
Control Item Customization
The interaction model relies on standard Minecraft items acting as "control rods" for the hologram. These can be customized to suit the user's preference or to avoid conflicts with other packs.
Control Mapping
By default, HoloPrint assigns specific tasks to common items. Users can rebind these to different item names or tags via the CONTROLS config.
| Control Action | Default Item | Function |
|---|---|---|
TOGGLE_RENDERING | Brick | Toggles visibility of the hologram. |
MOVE_HOLOGRAM | Stick | Shifts the hologram's relative position. |
ROTATE_HOLOGRAM | Copper Ingot | Rotates the hologram around the armor stand. |
TOGGLE_VALIDATING | Iron Ingot | Enables/disables block validation mode. |
CHANGE_LAYER | Leather | Cycles through the vertical layers of the build. |
Sources: src/HoloPrint.js:25-45, src/translations/en_US.json:44-55
Retexturing and Renaming
To improve the user experience, HoloPrint can modify the appearance and names of these control items within the generated pack.
- Retexturing: The
retextureControlItemsfunction overlays a small indicator icon (e.g., a move or rotate icon) onto the standard item texture. - Renaming: The
translateControlItemsfunction appends the control's function to the item's hover name (e.g., "Stick" becomes "Stick\n§uMove Hologram").
Sources: src/HoloPrint.js:616-650, src/HoloPrint.js:770-800
Conclusion
In-Game UI Customizations in HoloPrint provide a sophisticated interface for managing builds in Bedrock Edition. By leveraging dynamic JSON UI generation and automated item retexturing, the system transforms a standard resource pack into a functional building tool equivalent to Java-based schematic mods. The architecture ensures that complex data like material lists and coordinate locks are presented to the user through a native-feeling Minecraft interface.