Search in sources :

Example 1 with DemonAuraPacketProcessor

use of WayofTime.bloodmagic.network.DemonAuraPacketProcessor in project BloodMagic by WayofTime.

the class GenericHandler method sendPlayerDemonWillAura.

// @SideOnly(Side.SERVER)
public static void sendPlayerDemonWillAura(EntityPlayer player) {
    if (player instanceof EntityPlayerMP) {
        BlockPos pos = player.getPosition();
        DemonWillHolder holder = WorldDemonWillHandler.getWillHolder(player.getEntityWorld().provider.getDimension(), pos.getX() >> 4, pos.getZ() >> 4);
        if (holder != null) {
            BloodMagicPacketHandler.sendTo(new DemonAuraPacketProcessor(holder), (EntityPlayerMP) player);
        } else {
            BloodMagicPacketHandler.sendTo(new DemonAuraPacketProcessor(new DemonWillHolder()), (EntityPlayerMP) player);
        }
    }
}
Also used : DemonAuraPacketProcessor(WayofTime.bloodmagic.network.DemonAuraPacketProcessor) DemonWillHolder(WayofTime.bloodmagic.soul.DemonWillHolder) EntityPlayerMP(net.minecraft.entity.player.EntityPlayerMP) BlockPos(net.minecraft.util.math.BlockPos)

Aggregations

DemonAuraPacketProcessor (WayofTime.bloodmagic.network.DemonAuraPacketProcessor)1 DemonWillHolder (WayofTime.bloodmagic.soul.DemonWillHolder)1 EntityPlayerMP (net.minecraft.entity.player.EntityPlayerMP)1 BlockPos (net.minecraft.util.math.BlockPos)1