use of uk.co.wehavecookies56.kk.common.entity.magic.EntityKH1Fira in project Kingdom-Keys-Re-Coded by Wehavecookies56.
the class MagicKH1Fire 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_Fire));
World world = player.world;
switch(player.getCapability(ModCapabilities.MAGIC_STATE, null).getMagicLevel(Strings.Spell_Fire)) {
case 1:
EntityKH1Fire entityKH1Fire = new EntityKH1Fire(world, player);
world.spawnEntity(entityKH1Fire);
entityKH1Fire.setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0, 1, 0);
PacketDispatcher.sendToAllAround(new SpawnKH1FireParticles(new EntityKH1Fire(world), 1), player, 64.0D);
break;
case 2:
EntityKH1Fira entityKH1Fira = new EntityKH1Fira(world, player);
world.spawnEntity(entityKH1Fira);
entityKH1Fira.setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0, 1, 0);
PacketDispatcher.sendToAllAround(new SpawnKH1FireParticles(new EntityKH1Fira(world), 1), player, 64.0D);
break;
case 3:
EntityKH1Firaga entityKH1Firaga = new EntityKH1Firaga(world, player);
world.spawnEntity(entityKH1Firaga);
entityKH1Firaga.setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0, 1, 0);
PacketDispatcher.sendToAllAround(new SpawnKH1FireParticles(new EntityKH1Firaga(world), 1), player, 64.0D);
break;
}
PacketDispatcher.sendTo(new SyncMagicData(player.getCapability(ModCapabilities.MAGIC_STATE, null), player.getCapability(ModCapabilities.PLAYER_STATS, null)), (EntityPlayerMP) player);
}
Aggregations