I'm using fabric 1.16.5 to develop a client-side mod for minecraft, and I am trying to get the title of the open inventory (see example below).
In the example, the title is "Sell Items - 0" (with the emoji).
What I've tried:
MinecraftClient.getInstance().player.inventory.getName()
-> Returns "Inventory"MinecraftClient.getInstance().player.inventory.getDisplayName()
-> Returns "Inventory"MinecraftClient.getInstance().player.inventory.getCustomName()
-> Returns null
Because of the results, I'm guessing that inventory is returning the bottom inventory, the survival inventory. How can I get the custom inventory provided by the server (the top inventory).
All help is appreciated.