Download dmsafai — Minecraft Mods — MetaMods

dmsafai

Active

Downloads

3

Last update

1 year ago

Versions

1.20.1
Client
Fabric
Utils

dmsafai

Are you annoyed by endless stack traces when common errors occur? This mod solves the problem by making error messages more concise and understandable.

How it works

The modification intercepts standard error handlers and instead of displaying the full stack trace, shows only the main error message. This significantly simplifies problem diagnosis and makes log files more readable.

Examples of handled errors

  • Recipe generation failures
  • Element parsing errors
  • Model loading issues
  • Recipe reading errors

Before and after comparison

Invalid model files

Before installing the mod:

[17:28:56] [Worker-ResourceReload-5/ERROR]: Failed to load model <filename>.json
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    at jdk.internal.util.Preconditions$1.apply(Preconditions.java:55) ~[?:?]
    at jdk.internal.util.Preconditions$1.apply(Preconditions.java:52) ~[?:?]
    at jdk.internal.util.Preconditions$4.apply(Preconditions.java:213) ~[?:?]
    at jdk.internal.util.Preconditions$4.apply(Preconditions.java:210) ~[?:?]
    at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98) ~[?:?]
    at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) ~
    ...

After installing the mod:

Resolved by adding a check for empty strings

Loot tables with missing items

Before installing the mod:

[Worker-ResourceReload-7/ERROR]: Couldn't parse element loot_tables:foo/bar
com.google.gson.JsonSyntaxException: Expected name to be an item, was unknown string 'foo:bar'
    at net.minecraft.class_3518.method_17995(class_3518.java:145) ~[client-intermediary.jar:?]
    at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?]
    at net.minecraft.class_3518.method_15256(class_3518.java:145) ~[client-intermediary.jar:?]
    at net.minecraft.class_3518.method_15288(class_3518.java:153) ~[client-intermediary.jar:?]
    at net.minecraft.class_77$class_78.method_413(class_77.java:55) ~[client-intermediary.jar:?]
    at net.minecraft.class_77$class_78.method_443(class_77.java:40) ~[client-intermediary.jar:?]
    at net.minecraft.class_85$class_90.method_441(class_85.java:151) ~[client-intermediary.jar:?]
    at net.minecraft.class_85$class_90.method_424(class_85.java:129) ~[client-intermediary.jar:?]
    at net.minecraft.class_79$class_5337.method_29319(class_79.java:86) ~[client-intermediary.jar:?]
    at net.minecraft.class_79$class_5337.method_517(class_79.java:74) ~[client-intermediary.jar:?]
    at net.minecraft.class_5330$class_5333.deserialize(class_5330.java:102) ~[client-intermediary.jar:?]

After installing the mod:

[Worker-ResourceReload-7/ERROR]: Couldn't parse element loot_tables:foo/bar: Expected name to be an item, was unknown string 'foo:bar'
Project members
fionera

fionera

Developer

Created: 16 Aug 2024

ID: 50419