while (this.gameSettings.keyBindInventory.isPressed())
{
if (this.playerController.func_110738_j())
{
this.thePlayer.func_110322_i();
}
else
{
this.getNetHandler().addToSendQueue(new C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT));
this.displayGuiScreen(new GuiInventory(this.thePlayer));
}
}