Search in sources :

Example 1 with PlayerDiedGUI

use of com.almuradev.almura.feature.death.client.gui.PlayerDiedGUI in project Almura by AlmuraDev.

the class ClientboundPlayerDiedPacketHandler method handleMessage.

@Override
public void handleMessage(ClientboundPlayerDiedPacket 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;
            new PlayerDiedGUI(player, message.droppedAmount, message.deathTaxAmount, message.dropCoins, message.canRevive).display();
        }
    }
}
Also used : EntityPlayerSP(net.minecraft.client.entity.EntityPlayerSP) PlayerDiedGUI(com.almuradev.almura.feature.death.client.gui.PlayerDiedGUI) Minecraft(net.minecraft.client.Minecraft) WorldClient(net.minecraft.client.multiplayer.WorldClient)

Aggregations

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