From afb12e923bd9eb3e9c48764c9951b513e501fa7f Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Sat, 6 Jun 2020 00:04:05 -0400 Subject: [PATCH] Show villager display name --- .../connector/network/session/GeyserSession.java | 3 ++- .../bedrock/BedrockInventoryTransactionTranslator.java | 5 +++++ .../inventory/MerchantInventoryTranslator.java | 1 + .../translators/java/world/JavaTradeListTranslator.java | 9 ++++++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java index 7597e59f..db4d6aea 100644 --- a/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java +++ b/connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java @@ -30,7 +30,6 @@ import com.github.steveice10.mc.auth.exception.request.InvalidCredentialsExcepti import com.github.steveice10.mc.auth.exception.request.RequestException; import com.github.steveice10.mc.protocol.MinecraftProtocol; import com.github.steveice10.mc.protocol.data.SubProtocol; -import com.github.steveice10.mc.protocol.data.game.entity.metadata.ItemStack; import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode; import com.github.steveice10.mc.protocol.data.game.window.VillagerTrade; import com.github.steveice10.mc.protocol.data.game.world.block.BlockState; @@ -173,6 +172,8 @@ public class GeyserSession implements CommandSender { @Setter private VillagerTrade[] villagerTrades; + @Setter + private long lastInteractedVillagerEid; private MinecraftProtocol protocol; diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockInventoryTransactionTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockInventoryTransactionTranslator.java index 8f96b800..777d4d9e 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockInventoryTransactionTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockInventoryTransactionTranslator.java @@ -45,6 +45,7 @@ import com.nukkitx.protocol.bedrock.packet.InventoryTransactionPacket; import org.geysermc.connector.entity.Entity; import org.geysermc.connector.entity.ItemFrameEntity; +import org.geysermc.connector.entity.living.merchant.AbstractMerchantEntity; import org.geysermc.connector.inventory.Inventory; import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.translators.PacketTranslator; @@ -198,6 +199,10 @@ public class BedrockInventoryTransactionTranslator extends PacketTranslator