Skip to content

Commit

Permalink
Fix incompatibility with GT Modern (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChloePrime authored Dec 14, 2024
1 parent 483ab31 commit 158c22b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public Component getTitle() {
if (this.title == null) {
if (this.menuType != null) {
var key = ForgeRegistries.MENU_TYPES.getKey(this.menuType);
return Component.translatable(key.toString());
return Component.translatable(Optional.ofNullable(key).map(Object::toString).orElseGet(this::toString));
} else {
return Component.translatable(this.toString());
}
Expand Down

0 comments on commit 158c22b

Please sign in to comment.