Search in sources :

Example 1 with EntityOrgPortal

use of uk.co.wehavecookies56.kk.common.entity.magic.EntityOrgPortal 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)

Example 2 with EntityOrgPortal

use of uk.co.wehavecookies56.kk.common.entity.magic.EntityOrgPortal in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class SyncOrgPortal method process.

@Override
public void process(EntityPlayer player, Side side) {
    EntityOrgPortal portal;
    if (pos != destPos)
        portal = new EntityOrgPortal(player.world, player, pos, destPos, dimension, true);
    else
        portal = new EntityOrgPortal(player.world, player, pos, destPos, dimension, false);
    player.world.spawnEntity(portal);
// player.world.spawnParticle(EnumParticleTypes.CRIT_MAGIC, this.x, this.y, this.z, 0.0D, 0.0D, 0.0D);
}
Also used : EntityOrgPortal(uk.co.wehavecookies56.kk.common.entity.magic.EntityOrgPortal)

Aggregations

EntityOrgPortal (uk.co.wehavecookies56.kk.common.entity.magic.EntityOrgPortal)2 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