Minenash / CustomHUD

A highly customizable variable-based text HUD for Minecraft
MIT License
82 stars 23 forks source link

{facing_short} displays nothing #61

Closed dibolek closed 2 years ago

dibolek commented 2 years ago

{facing_short} variable displays nothing.

After using condition:

{{facing_short , "true", "false"}}

i got this exception:

The game crashed whilst unexpected error Error: java.lang.NullPointerException: Cannot invoke "com.minenash.customhud.HudElements.HudElement.getBoolean()" because "this.variable" is null

Stacktrace: at com.minenash.customhud.conditionals.Conditional$BooleanVariable.getValue(Conditional.java:82) at com.minenash.customhud.HudElements.ConditionalElement.getString(ConditionalElement.java:22) at com.minenash.customhud.CustomHudRenderer.render(CustomHudRenderer.java:47) at net.minecraft.class_329.handler$zci000$renderCustomHud(class_329.java:1983) at net.minecraft.class_329.method_1753(class_329.java:394)

Minenash commented 2 years ago

Are you using a release version, or did you build the mod yourself?

If a release version, that just got added to the code and the wiki a few days ago and hasn't made it to a release yet

dibolek commented 2 years ago

Are you using a release version, or did you build the mod yourself?

If a release version, that just got added to the code and the wiki a few days ago and hasn't made it to a release yet

I used the 2.1.0 release version. I assumed that since the variable is in the wiki, it is already available to the user. Thanks for the answer. I'm closing this.