From 78f2d2c089f98b081cdb92e3d4da38d9cffeb28f Mon Sep 17 00:00:00 2001 From: rtm516 Date: Mon, 27 Apr 2020 21:48:53 +0100 Subject: [PATCH] Added translation to container names (#442) --- .../translators/inventory/holder/BlockInventoryHolder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/inventory/holder/BlockInventoryHolder.java b/connector/src/main/java/org/geysermc/connector/network/translators/inventory/holder/BlockInventoryHolder.java index a9b0d4add..a32354453 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/inventory/holder/BlockInventoryHolder.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/inventory/holder/BlockInventoryHolder.java @@ -38,6 +38,7 @@ import org.geysermc.connector.inventory.Inventory; import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.translators.block.BlockTranslator; import org.geysermc.connector.network.translators.inventory.InventoryTranslator; +import org.geysermc.connector.utils.LocaleUtils; @AllArgsConstructor public class BlockInventoryHolder extends InventoryHolder { @@ -60,7 +61,7 @@ public class BlockInventoryHolder extends InventoryHolder { .intTag("x", position.getX()) .intTag("y", position.getY()) .intTag("z", position.getZ()) - .stringTag("CustomName", inventory.getTitle()).buildRootTag(); + .stringTag("CustomName", LocaleUtils.getLocaleString(inventory.getTitle(), session.getClientData().getLanguageCode())).buildRootTag(); BlockEntityDataPacket dataPacket = new BlockEntityDataPacket(); dataPacket.setData(tag); dataPacket.setBlockPosition(position);