From 784cb7330150ad309cb54de81ee978b780256140 Mon Sep 17 00:00:00 2001 From: bundabrg Date: Fri, 31 Jul 2020 04:11:35 +0800 Subject: [PATCH] Test if slot 50 used and under what conditions. (#1028) --- .../translators/inventory/CraftingInventoryTranslator.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/inventory/CraftingInventoryTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/inventory/CraftingInventoryTranslator.java index afcb321a4..f5ebe62df 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/inventory/CraftingInventoryTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/inventory/CraftingInventoryTranslator.java @@ -31,6 +31,7 @@ import com.nukkitx.protocol.bedrock.data.inventory.ContainerType; import com.nukkitx.protocol.bedrock.data.inventory.InventoryActionData; import com.nukkitx.protocol.bedrock.data.inventory.InventorySource; import com.nukkitx.protocol.bedrock.packet.ContainerOpenPacket; +import org.geysermc.connector.GeyserConnector; import org.geysermc.connector.inventory.Inventory; import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.translators.inventory.updater.CursorInventoryUpdater; @@ -46,6 +47,11 @@ public class CraftingInventoryTranslator extends BlockInventoryTranslator { @Override public int bedrockSlotToJava(InventoryActionData action) { + if (action.getSlot() == 50) { + GeyserConnector.getInstance().getLogger().warning("Slot 50 found, please report: " + action); + return 0; + } + if (action.getSource().getContainerId() == ContainerId.UI) { int slotnum = action.getSlot(); if (slotnum >= 32 && 42 >= slotnum) {