Search in sources :

Example 1 with EntityDoubleEdge

use of uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityDoubleEdge in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class ItemChakram method onItemRightClick.

@Override
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
    Entity entity;
    switch(weapon) {
        case Strings.Ashes:
            entity = new EntityAshes(world, player);
            break;
        case Strings.BlazeofGlory:
            entity = new EntityBlazeofGlory(world, player);
            break;
        case Strings.EternalFlames:
            entity = new EntityEternalFlames(world, player);
            break;
        case Strings.Ifrit:
            entity = new EntityIfrit(world, player);
            break;
        case Strings.Prometheus:
            entity = new EntityPrometheus(world, player);
            break;
        case Strings.Prominence:
            entity = new EntityProminence(world, player);
            break;
        case Strings.MoulinRouge:
            entity = new EntityMoulinRouge(world, player);
            break;
        case Strings.FerrisWheel:
            entity = new EntityFerrisWheels(world, player);
            break;
        case Strings.Combustion:
            entity = new EntityCombustion(world, player);
            break;
        case Strings.Burnout:
            entity = new EntityBurnout(world, player);
            break;
        case Strings.OmegaTrinity:
            entity = new EntityOmegaTrinity(world, player);
            break;
        case Strings.Doldrums:
            entity = new EntityDoledrum(world, player);
            break;
        case Strings.Outbreak:
            entity = new EntityOutbreak(world, player);
            break;
        case Strings.Inferno:
            entity = new EntityInferno(world, player);
            break;
        case Strings.SizzlingEdge:
            entity = new EntitySizzlingEdge(world, player);
            break;
        case Strings.DoubleEdge:
            entity = new EntityDoubleEdge(world, player);
            break;
        default:
            entity = new EntityEternalFlames(world, player);
            break;
    }
    if (!player.getCapability(ModCapabilities.PLAYER_STATS, null).getRecharge()) {
        if (!player.isSneaking()) {
            world.playSound(player.posX, player.posY, player.posZ, SoundEvents.ENTITY_GHAST_SHOOT, SoundCategory.PLAYERS, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F), false);
            world.spawnEntity(entity);
            ((EntityThrowable) entity).setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0, 1f, 1);
            if (!player.getCapability(ModCapabilities.CHEAT_MODE, null).getCheatMode())
                player.getCapability(ModCapabilities.PLAYER_STATS, null).remMP(7);
            player.swingArm(hand);
        }
        return ActionResult.newResult(EnumActionResult.SUCCESS, player.getHeldItemMainhand());
    }
    return ActionResult.newResult(EnumActionResult.FAIL, player.getHeldItemMainhand());
}
Also used : EntityDoledrum(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityDoledrum) Entity(net.minecraft.entity.Entity) EntityThrowable(net.minecraft.entity.projectile.EntityThrowable) EntityOmegaTrinity(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityOmegaTrinity) EntityAshes(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityAshes) EntityMoulinRouge(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityMoulinRouge) EntitySizzlingEdge(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntitySizzlingEdge) EntityEternalFlames(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityEternalFlames) EntityIfrit(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityIfrit) EntityBurnout(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityBurnout) EntityCombustion(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityCombustion) EntityFerrisWheels(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityFerrisWheels) EntityInferno(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityInferno) EntityDoubleEdge(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityDoubleEdge) EntityOutbreak(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityOutbreak) EntityBlazeofGlory(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityBlazeofGlory) EntityPrometheus(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityPrometheus) EntityProminence(uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityProminence)

Example 2 with EntityDoubleEdge

use of uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityDoubleEdge in project Kingdom-Keys-Re-Coded by Wehavecookies56.

the class ItemLances method onItemRightClick.

@Override
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
    Entity entity;
    switch(weapon) {
        /*case Strings.Ashes:
                entity = new EntityAshes(world, player);
                break;
            case Strings.BlazeofGlory:
                entity = new EntityBlazeofGlory(world, player);
                break;
            case Strings.EternalFlames:
                entity = new EntityEternalFlames(world, player);
                break;
            case Strings.Ifrit:
                entity = new EntityIfrit(world, player);
                break;
            case Strings.Prometheus:
                entity = new EntityPrometheus(world, player);
                break;
            case Strings.Prominence:
                entity = new EntityProminence(world, player);
                break;
            case Strings.MoulinRouge:
                entity = new EntityMoulinRouge(world, player);
                break;
            case Strings.FerrisWheel:
                entity = new EntityFerrisWheels(world, player);
                break;
            case Strings.Combustion:
                entity = new EntityCombustion(world, player);
                break;
            case Strings.Burnout:
                entity = new EntityBurnout(world, player);
                break;
            case Strings.OmegaTrinity:
                entity = new EntityOmegaTrinity(world, player);
                break;
            case Strings.Doldrums:
                entity = new EntityDoledrum(world, player);
                break;
            case Strings.Outbreak:
                entity = new EntityOutbreak(world, player);
                break;
            case Strings.Inferno:
                entity = new EntityInferno(world, player);
                break;
            case Strings.SizzlingEdge:
                entity= new EntitySizzlingEdge(world, player);
                break;
            case Strings.DoubleEdge:
                entity= new EntityDoubleEdge(world, player);
                break;*/
        default:
            entity = new EntityZephyr(world, player);
            break;
    }
    if (!player.getCapability(ModCapabilities.PLAYER_STATS, null).getRecharge()) {
        if (!player.isSneaking()) {
            world.playSound(player.posX, player.posY, player.posZ, SoundEvents.ENTITY_GHAST_SHOOT, SoundCategory.PLAYERS, 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F), false);
            world.spawnEntity(entity);
            // setHeadingFromThrower(player, player.rotationPitch, player.rotationYaw, 0, 1f, 1);
            ((EntityLance) entity).setAim(player, 2, 0);
            if (!player.getCapability(ModCapabilities.CHEAT_MODE, null).getCheatMode())
                player.getCapability(ModCapabilities.PLAYER_STATS, null).remMP(7);
            player.swingArm(hand);
        }
        return ActionResult.newResult(EnumActionResult.SUCCESS, player.getHeldItemMainhand());
    }
    return ActionResult.newResult(EnumActionResult.FAIL, player.getHeldItemMainhand());
}
Also used : Entity(net.minecraft.entity.Entity) EntityLance(uk.co.wehavecookies56.kk.common.entity.projectiles.lances.EntityLance) EntityZephyr(uk.co.wehavecookies56.kk.common.entity.projectiles.lances.EntityZephyr)

Aggregations

Entity (net.minecraft.entity.Entity)2 EntityThrowable (net.minecraft.entity.projectile.EntityThrowable)1 EntityAshes (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityAshes)1 EntityBlazeofGlory (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityBlazeofGlory)1 EntityBurnout (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityBurnout)1 EntityCombustion (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityCombustion)1 EntityDoledrum (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityDoledrum)1 EntityDoubleEdge (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityDoubleEdge)1 EntityEternalFlames (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityEternalFlames)1 EntityFerrisWheels (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityFerrisWheels)1 EntityIfrit (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityIfrit)1 EntityInferno (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityInferno)1 EntityMoulinRouge (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityMoulinRouge)1 EntityOmegaTrinity (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityOmegaTrinity)1 EntityOutbreak (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityOutbreak)1 EntityPrometheus (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityPrometheus)1 EntityProminence (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntityProminence)1 EntitySizzlingEdge (uk.co.wehavecookies56.kk.common.entity.projectiles.chakrams.EntitySizzlingEdge)1 EntityLance (uk.co.wehavecookies56.kk.common.entity.projectiles.lances.EntityLance)1 EntityZephyr (uk.co.wehavecookies56.kk.common.entity.projectiles.lances.EntityZephyr)1