Search in sources :

Example 1 with SpawnPortalParticles

use of uk.co.wehavecookies56.kk.common.network.packet.client.SpawnPortalParticles in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class OrgPortal method process.

@Override
public void process(EntityPlayer player, Side side) {
    if (!player.getCapability(ModCapabilities.CHEAT_MODE, null).getCheatMode())
        player.getCapability(ModCapabilities.PLAYER_STATS, null).setMP(0);
    PacketDispatcher.sendToAllAround(new SpawnPortalParticles(pos), player, 64.0D);
    EntityOrgPortal portal = new EntityOrgPortal(player.world, player, pos, destPos, dimension, true);
    player.world.spawnEntity(portal);
    EntityOrgPortal destPortal = new EntityOrgPortal(player.world, player, destPos, destPos, dimension, false);
    player.world.spawnEntity(destPortal);
    PacketDispatcher.sendToAll(new SyncOrgPortal(pos, destPos, dimension));
    PacketDispatcher.sendTo(new SyncMagicData(player.getCapability(ModCapabilities.MAGIC_STATE, null), player.getCapability(ModCapabilities.PLAYER_STATS, null)), (EntityPlayerMP) player);
}
Also used : SpawnPortalParticles(uk.co.wehavecookies56.kk.common.network.packet.client.SpawnPortalParticles) EntityOrgPortal(uk.co.wehavecookies56.kk.common.entity.magic.EntityOrgPortal) SyncMagicData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncMagicData) SyncOrgPortal(uk.co.wehavecookies56.kk.common.network.packet.client.SyncOrgPortal)

Aggregations

EntityOrgPortal (uk.co.wehavecookies56.kk.common.entity.magic.EntityOrgPortal)1 SpawnPortalParticles (uk.co.wehavecookies56.kk.common.network.packet.client.SpawnPortalParticles)1 SyncMagicData (uk.co.wehavecookies56.kk.common.network.packet.client.SyncMagicData)1 SyncOrgPortal (uk.co.wehavecookies56.kk.common.network.packet.client.SyncOrgPortal)1