nineMinecraft is a joke site.
nineMinecraft is in no way affiliated with Modrinth or 9minecraft. (And frankly, who wants to be affiliated with the latter?)
InGame Info Reborn

InGame Info Reborn

Mod

Inspired by InGame Info XML and it's bringing more modular controls and layouts to hud and also mvvm architecture

Client and server Library

5 downloads
0 followers

This is a spiritual successor of InGame-Info-XML, not a fork. Moreover, this is growing into a general-purpose HUD/GUI lib for both java and zenscript users.

If you like this project, don't forget to give it a star⭐!

Suggestions/PRs are welcome

Overview

This is a library mod that helps you to create in-game overlaid (or focused) GUI with ease.

Snipaste_2025-01-12_12-53-07 (Nothing will pop up without configuration!)

Wiki

Todo List / Features

My Detailed Todo List:

Feature Overview:

  • Approximate Model-View-ViewModel pattern (✔)
  • Add framebuffer to the GUI rendering life cycle (✔)
  • Introduce a custom GUI container (✔)
  • Maintain a list of custom GUI containers so that GUIs can stack together (✔)
  • A GUI container can be ingame-overlaid/focused (runtime switchable) (✔)
  • Introduce feature-rich GUI layout
    • Pivot (✔)
    • Alignment (✔)
    • Padding (✔)
    • Horizontal Group (stack elements horizontally) (✔)
    • Vertical Group (stack elements vertically) (✔)
    • Sized Group (✔)
    • Nesting Groups (group in group) (✔)
    • Adaptive Group (fit elements into it adaptively)
    • Foldout Group
    • Draggable Group
  • Add controls like text, button, input field, etc.
    • Text (✔)
    • Sliding Text (✔)
    • Anim Text (✔)
    • Simple Button (✔)
    • Checkbox
    • Input Field
    • Image (✔)
    • Url Image (✔)
    • GIF
    • Slide Bar
    • Progress Bar (✔)
    • Item (✔)
  • Introduce modular animation options for controls
  • Add CrT/Zenscript support (✔)
  • Ingame spotify support (go to wiki for details) (✔)

How to use

Go to wiki. This example is not for the latest version.

Here's an easy example (requirement: 1.0.0-b5 <= version <= 1.0.0).

./config/ingameinfo/test.ixml

<HorizontalGroup>
    <Text uid = "myUid">
</Group>

TestView.java

public class TestView extends View
{
    @Override
    public String getIxmlFileName() { return "test"; }
}

TestViewModel.java

public class TestViewModel extends ViewModel<TestView>
{
    @Reactive(targetUid = "myUid", property = "text", initiativeSync = true)
    public ReactiveObject<String> myUidText = new ReactiveObject<String>(){};

    @Override
    public void start()
    {
        EventCenter.igiGuiFpsEvent.addListener((fixedFps, renderFps) ->
        {
            myUidText.set("Fixed FPS: " + fixedFps + ", Render FPS: " + renderFps);
        });
    }
}
@SubscribeEvent
public static void onMvvmRegister(MvvmRegisterEvent event)
{
    MvvmRegistry.autoRegister("test", TestViewModel.class);
}
IgiGuiManager.openGui("test");

The default alignment and pivot are the top-left corner. Snipaste_2025-01-22_00-20-57

Zenscript version is as follows (install ProbeZS and ZS IntelliSense for more api details)

#loader preinit

import mods.ingameinfo.mvvm.ViewModel;
import mods.ingameinfo.mvvm.View;
import mods.ingameinfo.mvvm.Mvvm;
import mods.ingameinfo.Types;
import mods.ingameinfo.igievent.EventCenter;

Mvvm.define("test");

View.setIxmlFileName("test");

var myUidText = ViewModel.registerReactiveObject("myUidText", Types.String, "myUid", "text", true);

ViewModel.setStartAction(function()
{
    EventCenter.addIgiGuiFpsEventListener(function(fixedFps as int, renderFps as int)
    {
        myUidText.set("Fixed FPS: " ~ fixedFps ~ ", Render FPS: " ~ renderFps);
    });
});
import mods.ingameinfo.gui.IgiGuiManager;
import mods.ingameinfo.event.IgiGuiInitEvent;

events.onIgiGuiInit(function(event as IgiGuiInitEvent)
{
    IgiGuiManager.openGui("test");
});

Extra java example:

Extra Tips:

  • Go to ./logs/latest.log
  • Find
  [17:03:34] [Client thread/INFO] [ingameinfo]: Registered serviceable elements: 
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - UrlImage
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - SlidingText
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - Text
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - VerticalGroup
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - AnimText
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - SimpleButton
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - EmptyBlock
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - SizedGroup
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - HorizontalGroup
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - ProgressBar
  [17:03:34] [Client thread/INFO] [ingameinfo]:
  [17:03:34] [Client thread/INFO] [ingameinfo]: Notice:
  [17:03:34] [Client thread/INFO] [ingameinfo]: 1. Elements marked with * below are unserviceable in ixml.
  [17:03:34] [Client thread/INFO] [ingameinfo]: 2. You can access style properties from parent elements.
  [17:03:34] [Client thread/INFO] [ingameinfo]:
  [17:03:34] [Client thread/INFO] [ingameinfo]: Element type: Sized* extends Element*
  [17:03:34] [Client thread/INFO] [ingameinfo]: - With style properties:
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - [float] width (with deserializer: BuiltinTypesDeserializer)
  [17:03:34] [Client thread/INFO] [ingameinfo]:     - Setter callback pre: nonNegativeFloatValidation
  [17:03:34] [Client thread/INFO] [ingameinfo]:     - Setter callback post: requestReCalc
  [17:03:34] [Client thread/INFO] [ingameinfo]:   - [float] height (with deserializer: BuiltinTypesDeserializer)
  [17:03:34] [Client thread/INFO] [ingameinfo]:     - Setter callback pre: nonNegativeFloatValidation
  [17:03:34] [Client thread/INFO] [ingameinfo]:     - Setter callback post: requestReCalc
  ...
  • Then you'll know what style properties each element has
  • As a result, you can write your ixml files with ease

Latest Build

In case you want to use the latest action build

  • Go to GitHub Actions
  • Click on the latest workflow
  • Scroll down to the bottom and download the Artifacts
  • Unzip and ingameinfo-[version].jar is the mod file

Credits

External resources


Project members

tttsaurus

Member


Technical information

License
MIT
Client side
required
Server side
required
Project ID