use of uk.co.wehavecookies56.kk.common.entity.magic.EntityThundaga in project Kingdom-Keys-Re-Coded by Wehavecookies56.
the class MagicThunder method process.
@Override
public void process(EntityPlayer player, Side side) {
if (!player.getCapability(ModCapabilities.CHEAT_MODE, null).getCheatMode())
player.getCapability(ModCapabilities.PLAYER_STATS, null).remMP(Constants.getCost(Strings.Spell_Thunder));
World world = player.world;
if (!world.isRemote)
switch(player.getCapability(ModCapabilities.MAGIC_STATE, null).getMagicLevel(Strings.Spell_Thunder)) {
case 1:
world.spawnEntity(new EntityThunder(world, player, player.posX, player.posY, player.posZ));
PacketDispatcher.sendToAllAround(new SpawnThunderParticles(player, 1), player, 64.0D);
break;
case 2:
world.spawnEntity(new EntityThundara(world, player, player.posX, player.posY, player.posZ));
PacketDispatcher.sendToAllAround(new SpawnThunderParticles(player, 2), player, 64.0D);
break;
case 3:
world.spawnEntity(new EntityThundaga(world, player, player.posX, player.posY, player.posZ));
PacketDispatcher.sendToAllAround(new SpawnThunderParticles(player, 3), player, 64.0D);
break;
}
PacketDispatcher.sendTo(new SyncMagicData(player.getCapability(ModCapabilities.MAGIC_STATE, null), player.getCapability(ModCapabilities.PLAYER_STATS, null)), (EntityPlayerMP) player);
}
Aggregations