ModularHUD

About

ModularHUD is a datapack for Minecraft 1.14 (and above) that adds a HUD using the actionbar. There are 6 different modules which can be toggled on or off individually, adding them to or removing them from the HUD, each displaying their own information. The display itself can be toggled on or off as well, and there is also a compact mode.

It is entirely multiplayer compatible. Each player has their own HUD which they can customize however they'd like.

It is also entirely survival singleplayer friendly. You do not need to enable cheats in order to set anything up. The datapack automatically does all of this by itself, and the default configuration only gives allows you to display information you would be able to obtain in a normal vanilla survival world. Installing the datapack is as simple as placing the .zip file in your world's datapacks folder and setting up your HUD is as simple as entering /trigger modularhud in the chat.

If you wish to change any of ModularHUD's features for either multiplayer or singleplayer use, there is an in-game configuration for the datapack where modules can be set to be allowed to be toggled, disallowed to be toggled and forced off, forced on, or require a certain item to be in the player's inventory for the module to display. The configuration also allows for the HUD to be allowed to be toggled, disallowed to be toggled and forced off, or forced on, as well as allow or disallow players to customize their HUD. Compact mode can also be forced to a certain setting in the configuration if so desired.

Here's a cropped image example of what the HUD might look like. Check the spoiler below or the image page for full screenshots.

Screenshots

The HUD with all modules except for the Hostile Mobs one enabled, without compact mode, and the customization menu visible:


The HUD with all modules except for the Hostile Mobs one enabled, without compact mode:


The HUD with all modules except for the Hostile Mobs one enabled, with compact mode:


The HUD with only the Position and Time modules enabled, without compact mode:

 




Installation

To install the datapack simply place the .zip file in the datapacks folder located inside your world folder. It will automatically enable itself the next time the world / server is loaded, or when the /reload command is used.





Usage

To enable and customize your HUD use the /trigger modularhud command. A customization menu with clickable buttons will appear for you in the chat, and a click sound will be played for every button you press if the setting can be changed. Only you can see this menu and hear these sounds.

If the display is toggled off it will automatically toggle on when the trigger command is used or when a setting is toggled. This is to avoid the player being confused as to why their HUD isn't displaying when they enable a module when their display is toggled off, avoid the player toggling a bunch of modules due to thinking none are enabled when in fact the display is just toggled off, and to make it simpler to toggle the display back on.

Here's how the customization menu looks when the trigger command is used with the default configuration.



A quick explanation of what each module actually shows:
 - Session: Displays how long you've been playing for since you last started playing in hours and minutes.
 - Position: This module displays your X, Y, and Z coordinates.
 - Hostile Mobs: Counts and displays how many hostile mobs that count towards the hostile mob cap are within a 128 block radius from you. This module is disallowed / disabled in the default configuration, as it is not information the player can normally get in survival mode.
 - Pitch: How far down you are looking in degrees. Useful for when you are elytra flying over the void in the end dimension, or very high up in the overworld, and have no landscape to reference whether you're looking straight ahead, up, or down.
 - Time: Displays the current in-game time of day in a 24 hour digital clock format. This module is set to require the player to have a clock in their inventory to display in the default configuration as this is information the player can otherwise not always get in survival mode. It is also obfuscated in the nether and end dimensions in the default configuration for the same reason.
- Direction: Shows which direction you are facing. Displays both cardinal and intercardinal directions. If compact mode is disabled it also displays which coordinate direction that is.

Other settings:
- Compact Mode: toggles the HUD between a more compact display and the full display.
- Display: simply toggles the HUD on or off.





Configuration

To access the datapack's configuration settings you must use first add yourself to the admin list. (This is done as otherwise there would be no way to not show this to players aren't an operator / op / have cheats enabled.) Doing this will require you to be an operator (op) / have cheats enabled. To add yourself to the admin list use the command /scoreboard players set @s vs_mh_adminlist 1. Then run the datapack's configuration function using the command /function modularhud:admin/configure. A menu with clickable buttons where you can configure the datapack however you'd like will appear for you in the chat. Only players added to the admin list can see this menu and hear the click sounds.

The configuration menu should be fairly self-explanatory. Every button also has a tooltip that tells you what the button does. The color of the asterisk indicates what the state of the feature was when the /function command was run. Configuration changes can be viewed before being applied using the view button, cancelled using the cancel button, and saved using the save button. Saving the configuration will also tell you what changes were saved, similar to what the view button does, as well as save the configuration settings, of course. Once configuration changes are saved, the configuration will be enforced for all players. For offline players this will happen when they log in.

Here's how the datapack's configuration menu looks by default:



Some additional things regarding configuration settings you may be interested in knowing:

Setting the display setting to disallow also disables the trigger command, regardless of the Trigger Command's configuration setting. This is intentional as when the display is disabled players won't be able to see any changes they make in the customization menu that pops up when the trigger command is used.

If a module or compact mode is set to disallow, the player won't see this module in their customization menu. I thought it would be silly to display a disabled feature the player cannot see anywhere else in the first place, so I opted to simply not display it.

If a module or compact mode is set to force on , the module will show that it is forced on in their customization menu. In this case I opted to display this, to make the player aware that they cannot toggle it off. Of course if you want to give everyone a HUD that displays certain modules and not give them the ability to customize it, you can also set the trigger command to disallow, as having it enabled wouldn't make any sense in this case.

If a module is is set to require item, the player will see that they require an item for the module display in their customization menu. There is a tooltip displaying which item is required. If the required item is anywhere in the player's inventory, the module will show up on the HUD, assuming the HUD is set to be displayed. If it isn't in the player's inventory, the module will not show up.

The tooltip of the require item button in the configuration menu as well as the tooltip of the module in the customization menu give you this information as well, but here is a list of which item is required for each module, if set to require the item in the configuration:
 - Session: Clock
 - Position: Map (both empty and filled maps work)
 - Hostile Mobs: Beacon
 - Pitch: Compass
 - Time: Clock
 - Direction: Compass

- Changing which items are required for each module is (currently) not possible in-game. This is 'hardcoded'. If I can figure out a way to do this which I'm happy with I might add it in a future update.





Uninstallation / Removal

To uninstall the datapack use the command /function modularhud:admin/uninstall. This will prompt you in case you accidentally auto-completed the command to the function and pressed enter. You will need to be added to the admin list to see this and continue with or cancel the uninstallation process.

Here is the menu that will appear:



If you press continue on this prompt the datapack will remove all scoreboards it created and disable itself. This way you won't have any scoreboards from the datapack still lingering around. You can then remove the ModularHUD.zip file from the world's datapacks folder to remove it completely. (Leaving it there is fine too - it won't do anything once uninstalled.)

Keep in mind uninstalling it will delete the customization settings for all players and the configuration settings. If you want to just disable the datapack without uninstalling it, you can use the /datapack disable command to disable ModularHUD instead.





Additional Information

If you uninstalled ModularHUD through the function and wish to re-install it and haven't removed the datapack from the world's datapacks folder you can use the /datapack command to enable the ModularHUD datapack again and it will automatically install itself.

Some words on performance:

The hostile mobs module is rather expensive to run. It already only updates once every second (as opposed to every game tick) in order to avoid taking up more cpu time more frequently than is needed. However, if many players each with many hostile mobs around them have this module enabled you may experience a small lagspike once every second. On my system (running a 10 year old Intel Core i7 960) 1 player with 70 hostile mobs within 128 blocks from that player takes up about 2 milliseconds extra for the tick in which the module is updated. Though how expensive this is to run will vary depending on your system, you can expect it to scale linearly with the amount of hostile mobs within 128 blocks of  a player with this module enabled. A game tick can only take a maximum of 50 milliseconds before the server starts lagging, so I would recommend being mindful when enabling this if you have more than 10 or so players that can use it online in a world with normal hostile mob spawning.

Every module other than the session and hostile mobs modules run every game tick as it otherwise doesn't feel smooth enough or looks bad. In some cases running it less frequently would even behaves buggy. A nice example is the time module skipping seconds once in a while or counting irregularly when not ran every tick because a minute in-game is between 16 and 17 game ticks.

If you require better performance due to having a bigger playerbase, I suggest looking at a mod alternative. With datapacks the most you can do to improve performance is run fewer things and run things less frequently. The datapack for the most part already runs as few things as possible for the feature set it has. Running things less frequently would start to impact the quality and usability more than I'm okay with.

All of that scary performance stuff said though; there shouldn't be any performance issues running the datapack in singleplayer or multiplayer with a small amount (less than 10) of players online.



To report any bugs or issues please create a new issue in the Issues tab here on CurseForge.

For any further questions or feature requests feel free to leave a comment.

Download

File Name Status Version Downloads Date
ModularHUD v1.1.1 R 1.14.4 +4 46 26/07/2019
ModularHUD 1.20.2 Updating 1.20.2 Updating Updating
ModularHUD 1.20.1 Updating 1.20.1 Updating Updating
ModularHUD 1.20 Updating 1.20 Updating Updating
ModularHUD 1.19.2 Updating 1.19.2 Updating Updating
ModularHUD 1.19.1 Updating 1.19.1 Updating Updating
ModularHUD 1.19 Updating 1.19 Updating Updating
ModularHUD 1.18 Updating 1.18 Updating Updating
ModularHUD 1.17.1 Updating 1.17.1 Updating Updating
ModularHUD Forge Updating Forge Updating Updating
ModularHUD Fabric Updating Fabric Updating Updating
ModularHUD
ModularHUD

Dear youtuber!
Have you a channel youtube and want to bring your Video to quality visitors?
Do you want your video to appear on our website?
Do you want to become partner with us?
Just 3 steps to become our partner:
Step 1: Make video review for mods, addons, plugins, ... which you like
Step 2: Upload this video to youtube and our link to your video description
Step 3: Send the youtube video link via message to http://fb.com/9lifehack or leave a comment in the post. We will add your video in the our post, it will help you have more view.
JOIN to get more youtube view with us!!!!

Related Posts

Smarty Productivity Happiness

9LifeHack.com - make things smart