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);
}
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);
}
Aggregations