use of uk.co.wehavecookies56.kk.common.network.packet.client.SyncOrgPortal 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);
}
Aggregations