Skip to content

Commit

Permalink
Fix better tooltips crash with banners
Browse files Browse the repository at this point in the history
closes #4578
  • Loading branch information
Wide-Cat committed May 9, 2024
1 parent 25d1135 commit fd1d98b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import net.minecraft.util.Formatting;
import net.minecraft.util.collection.DefaultedList;

import java.io.IOException;
import java.util.Comparator;
import java.util.List;

Expand Down Expand Up @@ -284,8 +283,8 @@ private void appendTooltip(ItemStackTooltipEvent event) {
else count = String.format("%d bytes", byteCount);

event.list.add(Text.literal(count).formatted(Formatting.GRAY));
} catch (IOException e) {
e.printStackTrace();
} catch (Exception e) {
event.list.add(Text.literal("Error getting bytes.").formatted(Formatting.RED));
}
}

Expand Down

0 comments on commit fd1d98b

Please sign in to comment.