Search in sources :

Example 1 with EntityFire

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

the class MagicFire 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:
            world.spawnEntity(new EntityFire(world, player, player.posX, player.posY, player.posZ));
            break;
        case 2:
            world.spawnEntity(new EntityFira(world, player, player.posX, player.posY, player.posZ));
            break;
        case 3:
            world.spawnEntity(new EntityFiraga(world, player, player.posX, player.posY, player.posZ));
            break;
    }
    PacketDispatcher.sendTo(new SyncMagicData(player.getCapability(ModCapabilities.MAGIC_STATE, null), player.getCapability(ModCapabilities.PLAYER_STATS, null)), (EntityPlayerMP) player);
}
Also used : EntityFira(uk.co.wehavecookies56.kk.common.entity.magic.EntityFira) EntityFiraga(uk.co.wehavecookies56.kk.common.entity.magic.EntityFiraga) SyncMagicData(uk.co.wehavecookies56.kk.common.network.packet.client.SyncMagicData) World(net.minecraft.world.World) EntityFire(uk.co.wehavecookies56.kk.common.entity.magic.EntityFire)

Aggregations

World (net.minecraft.world.World)1 EntityFira (uk.co.wehavecookies56.kk.common.entity.magic.EntityFira)1 EntityFiraga (uk.co.wehavecookies56.kk.common.entity.magic.EntityFiraga)1 EntityFire (uk.co.wehavecookies56.kk.common.entity.magic.EntityFire)1 SyncMagicData (uk.co.wehavecookies56.kk.common.network.packet.client.SyncMagicData)1