Tslat / TslatEntityStatus

A modern damage indicators mod for Minecraft
Mozilla Public License 2.0
2 stars 5 forks source link

Game crashes when looking at any mob (1.19.4, 1.1.2) #18

Closed FrozenEarth-git closed 1 year ago

FrozenEarth-git commented 1 year ago

Running the game with no other mods but Fabric 1.19.4 and TES 1.1.2.

Seems to be an issue with getting the entity's type? This happens when looking at any type of mob, passive or hostile. Lmk if more info is needed.


java.util.NoSuchElementException: No value present
    at java.base/java.util.Optional.orElseThrow(Optional.java:377)
    at net.tslat.tes.util.TESUtil.lambda$getEntityType$0(TESUtil.java:40)
    at java.base/java.util.Map.computeIfAbsent(Map.java:1054)
    at net.tslat.tes.util.TESUtil.getEntityType(TESUtil.java:36)
    at net.tslat.tes.core.hud.element.BuiltinHudElements.renderEntityHealth(BuiltinHudElements.java:58)
    at net.tslat.tes.core.hud.TESHud.renderForHud(TESHud.java:117)
    at net.minecraft.class_757.handler$zkp000$tslatentitystatus$renderTESHud(class_757.java:2597)
    at net.minecraft.class_757.method_3192(class_757.java:918)
    at net.minecraft.class_310.method_1523(class_310.java:1218)
    at net.minecraft.class_310.method_1514(class_310.java:801)
    at net.minecraft.client.main.Main.main(Main.java:237)
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)```
Tslat commented 1 year ago

Does it happen with no other mods present?

From what I remember, this only happened when you used a mod that broke the entitytype tags in fabric

FrozenEarth-git commented 1 year ago

Just the fabric API v.0.86.1 and TES 1.1.2 in there.

FrozenEarth-git commented 1 year ago

With some more testing, I have found this bug only triggers if you open the game, load into a multiplayer server, and look at a mob.

The crash is avoided entirely if you first join a singleplayer world first (you can look at mobs freely) and then join a multiplayer server. As long as you join a singleplayer world first before looking at a mob, it doesn't crash.

Tslat commented 1 year ago

Does the server have other mods?

FrozenEarth-git commented 1 year ago

There's no required mods for the server, just Bukkit/Spigot plugins and their own custom plugins

Tslat commented 1 year ago

Is fabric & fabricapi on the server...?

Think I know what's going on here lol

FrozenEarth-git commented 1 year ago

Not sure how you would want me to check?

Tslat commented 1 year ago

All good, I should be able to resolve it