Search in sources :

Example 1 with EntityKlobber

use of net.tslat.aoa3.entity.boss.klobber.EntityKlobber in project Advent-Of-Ascension by Tslat.

the class ImmortallisProgressor method onBlockActivated.

@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
    if (!world.isRemote) {
        PlayerDataManager plData;
        switch(place) {
            case 1:
                if (ItemUtil.findInventoryItem(player, new ItemStack(ItemRegister.PROGRESS_COIN0), true, 1)) {
                    if (!player.addItemStackToInventory(new ItemStack(ItemRegister.RETURN_CRYSTAL))) {
                        plData = PlayerUtil.getAdventPlayer(player);
                        plData.sendThrottledChatMessage("message.feedback.item.returnCrystal.noSpace");
                        plData.stats().resetAllTribute();
                        player.entityDropItem(new ItemStack(ItemRegister.PROGRESS_COIN0), 0.5f);
                    } else {
                        player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.goldStart.0", TextFormatting.GOLD));
                        player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.goldStart.1", TextFormatting.GOLD));
                        player.setPositionAndUpdate(28, 20, 2);
                    }
                    return true;
                }
                break;
            case 2:
                if (PlayerUtil.getAdventPlayer(player).stats().getTribute(Enums.Deities.PLUTON) >= 100) {
                    EntityKlobber klobber = new EntityKlobber(world);
                    klobber.setPositionAndUpdate(69, 21, 4);
                    world.spawnEntity(klobber);
                    player.setPositionAndUpdate(67, 21, 2);
                    player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.klobberStart", TextFormatting.DARK_AQUA));
                    return true;
                }
                break;
            case 3:
                if (ItemUtil.findInventoryItem(player, new ItemStack(ItemRegister.PROGRESS_COIN1), true, 1)) {
                    player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.skeletalSpiritsStart", TextFormatting.RED));
                    player.setPositionAndUpdate(81, 21, 2);
                    return true;
                }
                break;
            case 4:
                if (PlayerUtil.getAdventPlayer(player).stats().getTribute(Enums.Deities.EREBON) >= 100) {
                    EntityProshield proshield = new EntityProshield(world);
                    proshield.setPositionAndUpdate(123, 21, 6);
                    world.spawnEntity(proshield);
                    player.setPositionAndUpdate(122, 21, 2);
                    player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.proshieldStart", TextFormatting.DARK_AQUA));
                    return true;
                }
                break;
            case 5:
                if (ItemUtil.findInventoryItem(player, new ItemStack(ItemRegister.PROGRESS_COIN2), true, 1)) {
                    player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.pureGoldStart.0", TextFormatting.GOLD));
                    player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.pureGoldStart.1", TextFormatting.GOLD));
                    player.setPositionAndUpdate(141, 24, 2);
                    return true;
                }
                break;
            case 6:
                if (PlayerUtil.getAdventPlayer(player).stats().getTribute(Enums.Deities.PLUTON) == 200) {
                    EntityMirage mirage = new EntityMirage(world);
                    mirage.setPositionAndUpdate(177, 24, -2);
                    world.spawnEntity(mirage);
                    player.setPositionAndUpdate(168, 24, 7);
                    player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.mirageStart", TextFormatting.DARK_AQUA));
                    return true;
                }
                break;
            case 7:
                if (ItemUtil.findInventoryItem(player, new ItemStack(ItemRegister.PROGRESS_COIN3), true, 1)) {
                    player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.evilSpiritsStart", TextFormatting.RED));
                    player.setPositionAndUpdate(189, 20, 2);
                    return true;
                }
                break;
            case 8:
                if (PlayerUtil.getAdventPlayer(player).stats().getTribute(Enums.Deities.EREBON) == 200) {
                    EntityFlash flash = new EntityFlash(world);
                    flash.setPositionAndUpdate(235, 22, 10);
                    world.spawnEntity(flash);
                    player.setPositionAndUpdate(233, 21, 3);
                    player.sendMessage(StringUtil.getColourLocale("message.feedback.immortallisProgression.flashStart", TextFormatting.DARK_AQUA));
                    return true;
                }
                break;
            case 9:
                if (ItemUtil.findInventoryItem(player, new ItemStack(ItemRegister.PROGRESS_COIN4), true, 1)) {
                    player.setPositionAndUpdate(0, 20, 0);
                    ItemUtil.findInventoryItem(player, new ItemStack(ItemRegister.RETURN_CRYSTAL), true, 1);
                    PlayerUtil.getAdventPlayer(player).stats().resetAllTribute();
                    return true;
                }
                break;
        }
    }
    return true;
}
Also used : EntityProshield(net.tslat.aoa3.entity.boss.proshield.EntityProshield) EntityKlobber(net.tslat.aoa3.entity.boss.klobber.EntityKlobber) EntityMirage(net.tslat.aoa3.entity.boss.mirage.EntityMirage) EntityFlash(net.tslat.aoa3.entity.boss.flash.EntityFlash) ItemStack(net.minecraft.item.ItemStack) PlayerDataManager(net.tslat.aoa3.utils.player.PlayerDataManager)

Aggregations

ItemStack (net.minecraft.item.ItemStack)1 EntityFlash (net.tslat.aoa3.entity.boss.flash.EntityFlash)1 EntityKlobber (net.tslat.aoa3.entity.boss.klobber.EntityKlobber)1 EntityMirage (net.tslat.aoa3.entity.boss.mirage.EntityMirage)1 EntityProshield (net.tslat.aoa3.entity.boss.proshield.EntityProshield)1 PlayerDataManager (net.tslat.aoa3.utils.player.PlayerDataManager)1