Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.19.4-fabric' into 1.20-fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
melontini committed Jul 16, 2023
2 parents bd473cd + dd8998d commit 6611aca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## What's new:

### Content

* Fixed item groups not having a name by default. (1.19.3+)

### Danger

* Fixed InstrumentationAccess failing to locate the agent jar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.mojang.datafixers.types.Type;
import me.melontini.dark_matter.DarkMatterLog;
import me.melontini.dark_matter.content.interfaces.AnimatedItemGroup;
import me.melontini.dark_matter.minecraft.util.TextUtil;
import me.melontini.dark_matter.util.MakeSure;
import me.melontini.dark_matter.util.Utilities;
import net.fabricmc.api.EnvType;
Expand Down Expand Up @@ -282,7 +283,7 @@ public ItemGroup build() {
});
builder.icon(() -> ItemGroupBuilder.this.icon.get());

if (this.displayName != null) builder.displayName(this.displayName);
builder.displayName(Objects.requireNonNullElseGet(this.displayName, () -> TextUtil.translatable("itemGroup." + this.identifier.toString().replace(":", "."))));
if (this.texture != null) builder.texture(this.texture);

ItemGroup group = builder.build();
Expand Down

0 comments on commit 6611aca

Please sign in to comment.