Git Product home page Git Product logo

customhud's People

Contributors

diskree avatar egeesin avatar harvelsx avatar leifb avatar minenash avatar thegameratort avatar togetausername avatar wforst-breeze avatar xathech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

customhud's Issues

Lines with hex colors not positioned correctly on right sections

Having this makes text not show properly in the right sections (top and bottom):

==Section:TopRight==
Looking at: {{tbx, "{tbx}, {tby}, {tbz}", "the sky"}} with a 
light level of &{ff7c0aff}{light}/{light_sky}&f

Chunk co-ords:
(chunk): {cx}, {cy}, {cz}
(inside chunk): {icx}, {icy}, {icz}
&{ffdeadff}Biome: {biome}&f

image
Text not aligning properly to the right

Left side doesn't have this problem because text starts from left which is.... left aligned

Small typo

Nothing major, just realized there was a typo for tps variable description. "evert" instead of "every."

image

new math feature?

it would be nice if you could have user set variables and math so you can make things like

{{[hour24*60+minute] > 1112 | [hour24*60+minute] < 360 , "go to bed"}}

here the math bit is separated by the square brackets [] this just converts the hour and minutes to just minutes and tells you when you can sleep and if you could set custom variables it can even be easier to read

==Section:Variables==
TimeToMin=hour24*60+minute]
==Section:TopLeft== 
{{TimeToMin > 1112 | TimeToMin < 360 , "go to bed"}}

Bug: The game can’t launch with non-empty profiles

After I've installed the mod and set up profiles, Minecraft started to crash when I’m trying to launch it and it says the problem is with CustomHUD.
Here’s the crash report: crash-2021-06-10_14.14.22-client.txt
And one of my profiles: profile2.txt (the other one is the same except for it doesn't have lines 10-15)

Idk if that could happen because of other mods, but before that I’ve messed with the Notes mod. I wanted it to run on 1.17 and I know nothing about mods, so I just changed the version in its fabric.mod.json hoping that would work... Minecraft crashed after I clicked on its settings in Mod Menu, and now I can’t launch the game with CustomHUD. Having or not having Mod Menu and Notes doesn’t seem to change anything though, so that could be a coincidence.

CustomHud 3.1 TODO

  • Make registered varables work with flags (sodium, iris, etc compat)
  • Finish Iris Support
  • Noise Router
  • Biome Builder
  • More Chunk Info
  • Target Block's blockstate and block tags (#8)
  • Held Item's lore, enchantments and can placed on's (#23)
  • Status Effects

Iris Support

  • {iris_shadow_half_plane}, {iris_shadow_res}, {iris_shadow_entities}, {iris_shadow_blockentities}, {iris_should_render_translucent}, {iris_should_render_terrain}
  • Distance Terrain/Entity, Shadow Culling, Shadow Terrain, Shadow Entity Batching, Entity Batching

Feature Request: Conditional Operators & Mod Check & CPU Usage

I think it would be neat if you could change colors based on the different values of conditionals. For example, different colors for different fps values or server brands. I also think it would be neat to have a variable to check if a mod is present (e.g. sodium).

{cps} and {rcps} varible

{cps} - clicks per second of left mouse button
{rcps} - clicks per second of right mouse button

{biome} and {biome_id} variables causes a crash with java.lang.IncompatibleClassChangeError

Minecraft version: 1.18.2
Mod version: 1.18 - 1.2.3

Stacktrace:

java.lang.IncompatibleClassChangeError: Found interface net.minecraft.class_5455, but class was expected
	at com.minenash.customhud.HudElements.SupplierElement.lambda$static$68(SupplierElement.java:145)
	at com.minenash.customhud.HudElements.SupplierElement.getString(SupplierElement.java:195)
	at com.minenash.customhud.CustomHudRenderer.render(CustomHudRenderer.java:42)
	at net.minecraft.class_329.handler$zza000$renderCustomHud(class_329.java:1517)
	at net.minecraft.class_329.method_1753(class_329.java:416)
	at net.minecraft.class_757.method_3192(class_757.java:858)
	at net.minecraft.class_310.method_1523(class_310.java:1122)
	at net.minecraft.class_310.method_1514(class_310.java:737)
	at net.minecraft.client.main.Main.main(Main.java:236)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)

typo in wiki

uh so in the wiki, under variable reference there appears to be a typo where it says falst instead of false

image:
image

Estimated TPS variable for multiplayer

I have seen other mods that can estimate server TPS client side. Since the current TPS variable only works in singleplayer, it would be cool if this could be implemented in the form of an estimated TPS variable.

CustomHUD 2.0 Update (read first)

After such a long time, I've finally got around to updating this. This update is going to be huge, with a whole slew of new features.

What's left before full 2.0 release:

  • Make Sodium variables work with flags
  • Finish Iris Support
    • {iris_shadow_half_plane}, {iris_shadow_res}, {iris_shadow_entities}, {iris_shadow_blockentities}, {iris_should_render_translucent}, {iris_should_render_terrain}
    • Distance Terrain/Entity, Shadow Culling, Shadow Terrain, Shadow Entity Batching, Entity Batching
  • (Maybe) A couple other things added to the F3 menu in 1.18. Not sure how useful they are though
    • Noise Router
    • Biome Builder
    • More Chunk Info

Stuff planned after 2.0

  • Item Display Name (either will be overly complex, or will require a refactor to allow a text rather then string to be sent to the CustomHUD render)
  • Target Block's blockstate and block tags (#8)
  • Held Item's lore, enchantments and can placed on's (#23)
  • (maybe) Status Effects
  • GPU Utilization (Will be added when 1.19 comes out

In 2.0.0-beta.1:

  • All the new stuff is documented!
  • Huge refactor needed to allow for conditionals (some variables act a bit differently now)
  • Finally add better conditionals, with comparison support (#2, #14)
    • Also includes 1-deep nesting! (hey, it's better than the previous 0) To nest, use ' instead of " in the inner one
  • Added variable flags:(#5, #26)
    • uppercase (-uc), lowercase (-lc), titlecase (-tc), smallcaps (-sc), and no dashes (-nd) for String variables
    • precision (-p<precision>) and scale (-s<scale>, can either be decimal or fraction) for Decimal variables
  • Added a Statistic variable (#19)
    • Syntax: {stat:<minecraft_statistic_id>} or {stat:<type>:<value>}
    • Since mc stats are ints, you can use the scale and precision flags to get it to the right unit
    • Also has -f flag to use the stat's built-in formatter (doesn't work with scale and precision flags)
    • Updates twice a second for now (it's limited as it has to send and receive a packet from the server to update)
  • Added variables for target block, fluid, and entity (#8)
    • Block: {target_block} (block name) and {target_block_id} (target cord variables already exist)
    • Fluid: {target_fluid}, {target_fluid_id}, {target_fluid_x}/{tfx}, {target_fluid_y}/{tfy}, {target_fluid_z}/{tfz}
    • Entity: {target_entity}, {target_entity_id}, {target_entity_x}/{tex}, {target_entity_y}/{tey}, {target_entity_z}/{tez}
  • Added variables for held items: (#23)
    • Main hand: {item}, {item_id}, {item_dur}, {item_max_dur}, {item_dur_per}, {item_has_dur}
    • Offhand: {oitem}, {oitem_id}, {oitem_dur}, {oitem_max_dur}, {oitem_dur_per}, {oitem_has_dur}
  • Added Region variables (in 1.18, it's the number and file name next to chunk_x and chunk_z)
    • Region: {region_x}/{rex}, {region_z}/{rez}
    • Region Relative: {region_relative_x}/{rrx}, {region_relative_z}/{rrz}
  • Added CPU Usage (and CPU & GPU Temps aren't feasible) (#14)
  • Added Slime Chunk boolean variable ({slime_chunk}) (#13)
  • Added Simulation Distance ({simulation_distance}/{sd})
  • Added Off Heap Memory ({memory_off_heap})
  • Added Sodium Support:
    • {sodium_version}, {sodium_chunk_arena_allocator}, {sodium_staging_buffers}, {sodium_buffer_objects}, {sodium_memory_used}, {sodium_memory_allocated}
    • Currently ignores flags
  • Added (some) Iris Support:
    • {iris_version}, {iris_shaderpack}, {iris_shaderpack_profile}, {iris_shaderpack_changes},
  • Add optional width for sections (#27)
  • Add ability for certain sections to hide when the chat is open (#21)
  • Ability to select font
    • Using the ==Font:<font>== flag
    • 1.18's new illageralt font was modified to allow non-alphanumeric characters to show (aka not be boxes) so that it's usable for the hud
    • Same thing with the alt font (the one used in the enchanting table, the Standard Galactic Alphabet)
    • Made an illageralt2 font that's the same as above, but also displays numbers normally
  • Added ability for other mods to add their own variables
    • Done by using the CustomHudRegistry.register(name, element) method
  • Updated to 1.18.2 (#29)
  • Fixed #18
  • Fixed #7
  • Fixed translation keys (#17, I swore I merged this before, but oh well)
  • Added Portuguese (Portugal) translation (#17)
  • Removed {client_chunk_cache}, {client_chunk_cache_capacity}, and {server_chunk_cache}

Feature Request: comparison operators in conditional check

I'd like to be able to change the display of something based on its value, not just its boolean presence.

e.g.
{{ {hour24} > 6 && {hour24} < 8, &a{hour24}:{minute}, &c{hour24}:{minute} would make the time appear green during the day and red at night.

This could also be useful for numeric stats like FPS, TPS, and memory, or highlighting the correct coords for which dimension you are in.

The 'TextShadow' global flag in the wiki documentation is either incorrect or broken.

Greetings! I have potentially discovered a bug while trying out this mod for the first time in which I would like to make apparent.

https://github.com/Minenash/CustomHUD/wiki/Profile-Structure#global-flags

The example for the 'TextShadow' global flag in the CustomHUD wiki documentation is either incorrect or broken. When following the example configuration for the 'TextShadow' global flag, the in-game hud will display a basic string rather than the formatted text:

image

I have found that this can be fixed by simply adding a single space between the colon and the desired boolean value in the configuration file:
==TextShadow:false== ---> ==TextShadow: false==

This results in the correct formatting of the text:

image

I'm not sure if the wiki documentation is incorrect or if there is an error within the mod itself.

A similar problem also occurred when trying to configure the 'Section Options', more specifically, the 'hide_on_chat' boolean value within the section options. It seems like whatever the problem is, is only affecting the true/false parameters of the configuration file (from what I've tested at least).

I hope this helps, thanks.

Hour variables always return true in numerical conditionals

The hour, hour12, and hour24 variables always return true when used in a numerical conditional.

{{hour24 >= 6 & hour24 < 18, '&aDay'}}{{hour24 >= 18 & hour24 < 19, '&6Evening'}}{{hour24 >= 19 & hour24 < 5, '&8Night'}}{{hour24 >= 5 & hour24 < 6, '&9Morning'}}
Here all four conditionals return true, so at any in-game-time it will say DayEveningNightMorning rather than indicating the current part of the day night cycle.

Game Crash

The game crashes after restarting with the configured config

Feature request:please add a type of css

i have been trying to add a box so its all in a box but i cant get some of the variables to line up correctly. You can see by the ping and by the server brand i had to add a period just to make it line up
screenshot from in game
This is my profile (i think the "|" made githubs code format not format sorry)
==Section:TopLeft==
Minecraft {version} ({client_version}) |
Playing on a {server_brand} server. |
&a{fps}&f/{max_fps} fps {{vsync, "(vsync)", ""}} |
Ping:&a{ping}.&f |
In Game Time:&a{hour}:{minute}{am_pm}&f |
Real Time:&a{real_time:h:ma}&f |
&a{ms_ticks}&f MS Ticks |
{{tps, "&a{tps}&f Tps", ""}} |

==Section:TopRight==
(13 blank lines to get below my minimap)
§1| &cX&aY&bZ: &c{bx} &a{by} &b{bz} §1|
§1| &fBiome:{biome} §1|

1.16 port issues

Trying to fix it myself at this moment, but the mixin.json is named as "modid.mixin.json" which conflicts with some mods that are made in a rush and is just over all not a great practice.

background color

is their anyway to change the color of the background of the mod? thanks

compat with dynamic fps

dynamic fps changes the fps when you tab out of the minecraft window but your mod still reports the frames offered not the frames being produced on screen making the fps counter inaccurate

profile.txt strips leading sign from numbers

When comparing numeral values (e.g. yaw), the mod strips the leading sign (i.e. the minus sign -) from the (right hand side) comparison.

Consider the following example: {{yaw >= -180, "N", "?"}}
Regardless of the actual yaw-value, the mod shows ? instead of N. (In fact, since the smallest yaw-value is -180 the mod should always display N.)

Another example is {{yaw >= -67, "SE", "?"}}.
In this case, the mod displays SE if the actual yaw-value is in between 67.0 and 179.9 and ? if the value is between -179.9 and 66.9—though the expected output would be ? from -179.9 to -66.9 and SE from -67.0 onwards.

Feature request: Compare values

For example, say you'd have

Light: {light}

Currently that I know of, there is no way to compare values, but if there was you could do:

Can Mobs Spawn: {{light} <= 7, "Yes", "No"}

Example of comparisons:

==
>=
<=
!=
>
<
=== (Check for type and value)

For strings just ignore the bigger/smaller than signs

Suggestion: configuration of variables

example text: {example_var:example_configuration}

my idea is that after a variable you can put a : and then some configuration like caps, however this var config system i have no suggestions for

scale other than 1.0 makes bottom and right shifted

image

==Scale:0.7==
==LineSpacing:0==
{{nether, "&c{bx} {bz} &b{by}&r ({facing})", "&a{bx} {bz} &b{by}&r ({facing})"}} 
{{nether, "o &a{nx} {nz}&r", "n &c{nx} {nz}&r"}}
{biome} &7{biome_id}&r
&6{fps} &e{tps}&r
==Section:BottomRight==
{real_time:H:m, d MMM, E}

if scale is set to 1.0 than the date will be exactly at bottom right, but with 0.7 it is in the middle of the screen
I am using sodium if that helps

Item held + Durability

It would be nice to have a variable for the Item held (maybe even the lore? idk) and it's durability as variables
Again, coloring durability would be awesome but i guess that would come as a direct result of the conditional update.
Any news on that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.