Search in sources :

Example 1 with ExchangeGUI

use of com.almuradev.almura.feature.exchange.client.gui.ExchangeGUI in project Almura by AlmuraDev.

the class ClientboundExchangeOpenResponsePacketHandler method handleMessage.

@Override
public void handleMessage(ClientboundExchangeOpenResponsePacket message, RemoteConnection connection, Platform.Type side) {
    if (side.isClient()) {
        final Minecraft client = Minecraft.getMinecraft();
        if (PacketUtil.checkThreadAndEnqueue(client, message, this, connection, side)) {
            final EntityPlayerSP player = client.player;
            final WorldClient world = client.world;
            if (world != null) {
                new ExchangeGUI(player, world, player.getPosition()).display();
            }
        }
    }
}
Also used : ExchangeGUI(com.almuradev.almura.feature.exchange.client.gui.ExchangeGUI) EntityPlayerSP(net.minecraft.client.entity.EntityPlayerSP) Minecraft(net.minecraft.client.Minecraft) WorldClient(net.minecraft.client.multiplayer.WorldClient)

Aggregations

ExchangeGUI (com.almuradev.almura.feature.exchange.client.gui.ExchangeGUI)1 Minecraft (net.minecraft.client.Minecraft)1 EntityPlayerSP (net.minecraft.client.entity.EntityPlayerSP)1 WorldClient (net.minecraft.client.multiplayer.WorldClient)1