promotional bannermobile promotional banner
header
logo

Modern UI

screenshot imagescreenshot imagescreenshot image
  • screenshot thumbnail
  • screenshot thumbnail
  • screenshot thumbnail

Description

logo

Modern UI by Icyllis Milica

 

Description:

Modern UI (by Icyllis Milica) is a desktop application framework designed for standalone 2D and 3D rendering software development. It makes use of modern 3D graphical APIs and technologies to provide real-time rendering with high performance. For good measure, Modern UI improves and optimizes a set of features used by Google Android and its own set of internationalization supporting text engine.

 

Modern UI for Minecraft, is a Minecraft Mod that is based on Modern UI Core Framework and Modern UI Core Extensions. It provides Modern UI bootstrap program in Minecraft environment and Modding API based on Forge/Fabric, to make powerful Graphical User Interface in Minecraft.

 

For client, press Ctrl+K or ⌘+K (by default) to open Action Center screen to configure Modern UI. (Note that you can swipe the Preferences screen to configure fonts)

 

This Mod also includes a powerful text layout engine and text rendering system designed for Minecraft.
This engine provides appropriate methods for processing Unicode text and gives you more readable text in any scale, in 2D/3D. In details:

  • Real-time preview and reload TrueType/OpenType fonts
  • A better font fallback implementation
  • Anti-aliasing text and FreeType font hinting
  • Use improved SDF text rendering in 2D/3D (also use batch rendering)
  • Compute exact font size in device space for native glyph rendering
  • Use Google Noto Color Emoji and support all the Unicode 15.1 Emoji (September 12, 2023)
  • Support Discord/Slack/GitHub/IamCal/JoyPixels emoji shortcodes in Chatting
  • Configurable bidirectional text heuristic algorithm
  • Configurable text shadow and raw font size
  • Unicode line breaking and CSS line-break & word-break
  • Fast, exact and asynchronous Unicode text layout computation
  • Faster and more memory efficient rectangle packing algorithm for glyphs
  • Use real grayscale texture (1 byte-per-pixel, whereas Minecraft is 4 bpp)
  • Compatible with OptiFine, Sodium (Rubidium), Iris (Oculus) and many mods
  • Compatible with Minecraft's JSON font definition (bitmap fonts, TTF fonts)

 

Additionally, this Mod provides many utilities which improve game performance and gaming experience. Currently, we have:

  • Changing screen background color
  • Gaussian blur to screen backdrop image
  • Fade-in animation to screen background
  • More window modes: Fullscreen (borderless), Maximized (borderless)
  • Framerate limit and master volume fading on window inactive (out of focus) and minimized
  • Pausing single-player game when Inventory is open
  • Changing GUI scale option to Slider and providing hint text
  • Playing a "Ding" sound when Minecraft loads and reaches the Main Menu
  • Enabling smooth scrolling in Vanilla's Selection List and Forge's Scroll Panel
  • Pressing "C" to Zoom that is the same as OptiFine
  • A fancy tooltip style
  • Choose rounded border or normal border (with anti-aliasing)
  • Add title break and control title line spacing
  • Center the title line, support RTL layout direction
  • Exactly position the tooltip to pixel grid (smooth movement)
  • Tooltip auto text wrapping, center title, title break, auto line spacing
  • Change background color and border color (with gradient and animation)

 

Core Features:

  • 2D Graphics Library of Multiple Graphics APIs
  • Intermediate Representation and ASTs of Shading Languages
  • Signed distance function and vector graphics rendering
  • Markdown support (and some HTML tags)
  • Image post-processing effects
  • Fast matrix and vector calculation
  • Image format conversion
  • Animation and transition framework
  • Event loop and multi-threading framework
  • Text shaping and complex text layout engine
  • MVVM and lifecycle handling
  • Automatic RTL (right-to-left) UI layout

 

Modern Text Engine for Minecraft:

  • Support color Emoji, use Google Noto Color Emoji 15.1, based on Unicode 15.1 Emoji list;
  • Support Emoji shortcodes in chat, for example :rofl: to rolling on the floor laughing, support Discord and Slack shortcodes;
  • You can use TTF or OTF fonts, configure the font base size, set the baseline shift, and set whether to drop text shadow;
  • Scalable vector graphics, automatic switching resolution level (up to 96px), native (non-synthetic) Bold and Italic rendering;
  • Supports distance field text rendering in 3D world, but sharpens font atlas in 2D GUI; This enhances a former feature:
  •   *Render all characters smoothly on any scale (like when you're away from a sign, or a very small text in GUI)
  • Support multilayer text, layout multiple paragraphs together, streaming layout algorithm, and introduce fast layout cache;
  • Support fast digit replacement, high-precision layout and alignment, and smoothly draw fast changing digits (fixed width);
  • Support mip-mapping, anti-aliasing, linear sampling and supersampling anti-aliasing (SSAA);
  • Better and more efficient layout of BiDi text paragraphs (e.g. Arabic, Yiddish); Use sharpen font atlases;
  • Configurable BiDi text heuristic algorithm to control text direction more accurately; Support to fix invalid surrogate pairs;
  • Use HarfBuzz text shaping, support combining characters rendering, like Thai, Devanagari, Bengali and Tamil;
  • Support grapheme cluster break, support Unicode line breaking algorithm;
  • Support context-aware and locale-based word break and line break;
  • Support pixelated font rendering, support fixed resolution level, support pixel alignment;
  • Support bitmap replacement, rendering smoothly for fast changing numbers, support emoji rendering;
  • Optimize the layout algorithm, increase your FPS by about 10% when drawing texts in GUI
  • Use grayscale pixels to store texture, reduce GPU memory usage
  • Reduce unnecessary RAM usage and greatly reduce object creation

 

Customize Fonts
Press Ctrl+K or ⌘+K (by default) to open Action Center, go to Preferences, swipe the screen to the second page, and you will see Font settings.

  • Preferred font family is your most wanted one. It can be either an OS font or a TrueType/OpenType font (collection) file.
  • Fallback font families are used when the preferred font family is unavailable.

Modern Text Engine:
Modern UI follows Minecraft's JSON font definition, only glyph provider type 'legacy_unicode' and 'unihex' are ignored. Modern UI font families mentioned above will serve as fallback font families for Minecraft fonts. Default Font Behavior (in Preferences > Text Layout) gives you an option to remove some glyph providers from the Minecraft default font (minecraft:default). To avoid using vanilla ASCII fonts, just set it to Keep Other. Note this option is only valid if you have not turned on Force Unicode Font. If you want to use vanilla Unicode font, just download the OTF version of GNU Unifont.

 

Additional Features for Minecraft:

  • Support setting window mode, such as fullscreen borderless, windowed borderless;
  • Undo/Redo and Unicode word iterator for all text fields;
  • GUI screen background fade-in animation and 2-pass gaussian convolution blur effect, configurable background gradient color;
  • Smooth rounded tooltip style, support RTL layout, configurable background and border color;
  • Play a "ding" sound effect when the game is loaded;
  • Support pausing the game when your inventory is opened;
  • New GUI scale algorithm and slider GUI scale widget (not limited to even numbers, compatible with OptiFine);
  • Add smooth scrolling for vanilla and forge scrolling panels;
  • Async network handler; Server auto-shutdown;
  • All features are configurable in configs or Action Center screen (default shortkey Ctrl+K)

 

Modern UI for Fabric removed some features (compared to the Forge version):

  • OptiFine-like zoom, Hide crosshairs in GUI
  • Dump more debugging information, crash report extension

 

Comparison with Caxton text rendering techniques
Caxton mod is known for its MSDF text rendering, you can choose between Caxton and Modern Text Engine.

 

Similarities:

  • Both use HarfBuzz text shaping
  • Both support Unicode text processing
  • Both support Unicode line breaking and grapheme cluster break
  • Both compatible with Iris in raster rendering mode
  • Both have an efficient rectangle packing algorithm, further better than Mojang's

 

Differences:

  • Caxton uses a newer HarfBuzz whereas we use a older one (bundled with JDK 17, it's updated in JDK 21)
  • Caxton uses multi-channel SDF and renders sharper scaling-up texts, whereas we render over-rounded
  • We are compatible with OptiFine, whereas Caxton isn't
  • We support color emoji, whereas Caxton doesn't
  • We support FreeType font hinting whereas Caxton never support it, font hinting helps on low-res monitor
  • We support perfect sampling of native glyph image in screen-space, this is ideal for 2D rendering
  • We support single-channel SDF text rendering without additional GPU resources, we always use 1bpp textures
  • We have smart SDF sampling method for scaling-down texts, whereas Caxton hasn't
  • No need to wait for MSDF texture generation, you can switch fonts in-game with just one click
  • We support various text direction heuristics and line break strategies
  • We don't use additional native libraries, so Modern UI works on macOS
  • We have a slightly higher layout performance than Caxton, and use less RAM

 

Old Features: (1.x version)

  • Provide animation effects and smooth transitions.
  • Use shaders to draw rounded rectangle, circle, ring easily.
  • Reduced CPU computation and increased GPU performance.
  • GUI scale limit was removed and the algorithm was changed.

(Functions or contents that this mod adds to vanilla)

  • Cleaner sidebar in-game menu, blur world renderer, and hide crosshair.
  • Smooth scroll window for game settings / options / statistics.
  • Divide "items" statistics into items and blocks tab, and all stats can be updated in real time.
  • All slider options only apply changes when you stop dragging. (eg. reduced lag when changing render distance)
  • More intelligent keybinding setting, and more smart key conflicts detection.
  • Keybindings search function and filter all conflicts and locate to them.
  • Mouse cursor will be changed to I-beam shape when moved into a text field / text area.

 

Screenshots (2.0+):

compare sign text

Fps CompareArabic renderchinese 3x renderentity font renderHindi Render

 

Screenshots: (outdated 1.x version)

video settingresource packs settingblock statsitem statsexit popup

 

Mod Integration & Compatibility:

Compatible (you should pay attention to):

OptiFine, Sodium, Iris, Create, AoA3

If Shaders are active, Use Modern Text Shaders in 3D is auto disabled, it will cause the outline of glowing text to become invisible.

OptiFabric 1.20.1 is not compatible with Fabric API; Rubidium 0.7.0a is not compatible with Forge API; don't report to us.

 

Mods with similar functions are replaced:

  • Blur (ver 1.15 ~ 1.20; reason: full functional coverage, better optimization)
  • Controlling (ver 1.15; reason: another way of implementation)
  • TipTheScales (ver 1.15 ~ 1.20, forge only; reason: another way of implementation)
  • Inventory Pause (ver 1.18 ~ 1.20; reason: another way of implementation)
  • Emojiful (ver 1.18 ~ 1.20; reason: we support color emoji rendering since 3.5.0)
  • Borderless Window (ver 1.18 ~ 1.20; reason: another way of implementation)
  • Ding (ver 1.18 ~ 1.20; reason: another way of implementation)
  • SmoothScrollingEverywhere (ver 1.18 ~ 1.19; reason: another way of implementation)
  • FPS Reducer (ver 1.18 ~ 1.20; reason: another way of implementation)

 

Conflict:

  • Emojiful (ver 1.16 ~ 1.20; solution: disable Modern UI text engine, via config screen or bootstrap properties)
  • Legendary Tooltips (ver 1.16 ~ 1.20; solution: disable Modern UI tooltip, via config screen)
  • FeyTweaks (ver 1.18 ~ 1.20; solution: disable TextRendererMixin in FeyTweaks' mixin config)
  • SmoothScrollingEverywhere (ver 1.18 ~ 1.19; solution: disable Modern UI smooth scrolling, via config screen)
  • Caxton (ver 1.18 ~ 1.20; solution: disable Modern UI text engine, via config screen or bootstrap properties)
  • ImmediatelyFast (ver 1.18 ~ 1.20; solution: disable ImmediatelyFast's hud_batching, font_atlas_resizing and fast_text_lookup)
  • Sodium (ver 1.20; Sodium is known to be incompatible with Rounded Tooltip, disable Tooltip -> Border Style -> Rounded Corners)
  • Untranslated Items (ver 1.18 ~ 1.20; solution: disable Modern UI text component cache, via config screen)

 

FAQ:

Q: What is the difference between Default Font Behavior and Force Unicode Font?

A: Firstly, Modern UI always redirects Unicode font to Modern UI default typeface. Default Font Behavior is KEEP ALL in 1.19+, then Minecraft default font is used for ASCII characters. KEEP OTHER means that Minecraft default font is no longer used, but additional fonts, for example, in some minigame maps, are still available. This is the difference from Force Unicode Font (IGNORE ALL).

Q: Does Modern UI have a high overhead? Will Modern UI lower application performance?

A: No, Modern UI does not have a significant impact on CPU, GPU, RAM, and VRAM usage. This is because Modern UI itself has good optimization, but at the same time, Modern UI provides a bunch of new features and effects. Modern UI framework is known to be more efficient than Chromium-based applications.
For low-end PCs, screen blur effect may be a performance killer, because Minecraft Vanilla does not allow mipmap generation on render targets. Even so, the blur effect provided by Modern UI is much faster than a mod called 'Blur'.

Q: How to disable all changes to vanilla, I don't want these features.

A: Only GUI scale algorithm is non-configurable, any other features can be disabled in Action Center screen (shortkey Ctrl+K by default), or config files (gameDir/config/ModernUI/).

 

Q: There's an error related to outdated Java versions/or my game crashed due to outdated Java versions (1.16).
A: Since 2.0, Java 1.8.0_201 is required, Java 11.0.9 or above is recommended.

Since 2.4.4, it will show a warning rather than crashing game.

Since 2.6.0, Java 11 or above is required. Since 3.0, Java 16 or above is required.

Whatever game launcher you are using you must ensure it use the Java Runtime Environment you updated rathen than the built-in one or auto-download one. You can get LibericaJDK.

 

Q: There's an error about graphics environment (unsupported OpenGL version)

A: Since 3.7.0 (MC 1.19.2), Modern UI can choose the best rendering pipeline based on the actual environment, Modern UI can support OpenGL 3.3 as a minimum, so macOS users have no worry about this anymore.

Since 3.5.0, all extensions (text engine, blur effect and so on) are backward compatible with OpenGL 3.3, but Modern UI core still requires OpenGL 4.5.

Since 2.0, OpenGL 4.3 is required. Since 3.0, OpenGL 4.5 (or all its ARBs) is required.

OpenGL is a cross-platform graphics API which is used by Minecraft. Modern UI includes an OpenGL rendering pipeline based on OpenGL 4.5.

OpenGL graphics environment is prodived by your operating system, dedicated graphics card (video card) and graphics driver (video driver). If any of these requirements cannot be met, there will be an error. You need to make sure you have a dedicated graphics processor selected for Java applications and the latest graphics card drivers.

For macOS users, macOS stopped OpenGL support at version 4.1. You can try Mesa Zink over MoltenVK over Metal. Custom drivers is supported since Modern UI 3.4.7 (vanilla doesn't support it).

 

Q: Is this mod a client-only mod? Do I need to install it on the server?

A: Modern UI for Minecraft has many features. You should know that there are two interaction models. One is the local, and the other is the client/server. If any mod that is using Modern UI as a dependency for the client/server interaction model, then Modern UI is required on the server side. So Modern UI can be installed only on the client side or only on the server side, but generally needs to be installed on the both side. It depends on your needs.

There's a server version since 3.4.6, which you can find in additional files. This is a slim version of the universal version.

Since MC 1.19.2, there is no reason to install this mod on the server anymore. All server features are deprecated and implemented to Forge API.


Q: Will there be a Fabric version or other versions?
A: Hardly. It's hard to maintain Fabric version since it's a lightweighted API. And you can't keep any other release versions compared to this official one on curseforge without my explicit permission.


Q: How to get start to develop my mod based on Modern UI?
A: This project is still in early stages. The specification is still being written. If you have any questions, feel free to join our Discord server.


Q: Will there be a backport to 1.14.4 or older version?
A: No. They are obsolete. I will not provide maintenance and support for any outdated game versions.

 

Modpacks: Feel free to include this mod in any modpack. I recommend adding this mod to your modpack via CurseForge API instead of distributing files directly to other users.

 

Issues: All issue reports should go to GitHub Page.

 

Join my Discord Server for discussion and suggestions.