Skip to content

Commit

Permalink
fix screen title
Browse files Browse the repository at this point in the history
  • Loading branch information
MelanX committed Apr 5, 2024
1 parent d041aef commit fc418b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/melanx/datatrader/trader/Trader.java
Expand Up @@ -4,7 +4,6 @@
import de.melanx.datatrader.*;
import net.minecraft.ResourceLocationException;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.SynchedEntityData;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -181,7 +180,8 @@ protected InteractionResult mobInteract(@Nonnull Player player, @Nonnull Interac
return super.mobInteract(player, hand);
}

OptionalInt optInt = player.openMenu(new SimpleMenuProvider((id, inv, player1) -> new TraderMenu(id, inv, this), Component.literal("Test"))); // todo
//noinspection DataFlowIssue
OptionalInt optInt = player.openMenu(new SimpleMenuProvider((id, inv, player1) -> new TraderMenu(id, inv, this), this.hasCustomName() ? this.getCustomName() : this.getDisplayName()));
if (optInt.isPresent()) {
TraderOffers offers = this.getOffers();
if (!offers.isEmpty()) {
Expand Down

0 comments on commit fc418b2

Please sign in to comment.