Search in sources :

Example 1 with BoundArmour

use of WayofTime.alchemicalWizardry.common.items.armour.BoundArmour in project BloodMagic by WayofTime.

the class ModItems method init.

public static void init() {
    weakBloodOrb = new EnergyBattery(5000).setUnlocalizedName("weakBloodOrb");
    apprenticeBloodOrb = new ApprenticeBloodOrb(25000).setUnlocalizedName("apprenticeBloodOrb");
    magicianBloodOrb = new MagicianBloodOrb(150000).setUnlocalizedName("magicianBloodOrb");
    masterBloodOrb = new MasterBloodOrb(1000000).setUnlocalizedName("masterBloodOrb");
    archmageBloodOrb = new ArchmageBloodOrb(10000000).setUnlocalizedName("archmageBloodOrb");
    transcendentBloodOrb = new TranscendentBloodOrb(30000000).setUnlocalizedName("transcendentBloodOrb");
    energyBlaster = new EnergyBlast().setUnlocalizedName("energyBlast");
    energySword = new EnergySword().setUnlocalizedName("energySword");
    lavaCrystal = new LavaCrystal().setUnlocalizedName("lavaCrystal");
    waterSigil = new SigilWater().setUnlocalizedName("waterSigil");
    lavaSigil = new SigilLava().setUnlocalizedName("lavaSigil");
    voidSigil = new SigilVoid().setUnlocalizedName("voidSigil");
    blankSlate = new AWBaseItems().setUnlocalizedName("blankSlate");
    reinforcedSlate = new AWBaseItems().setUnlocalizedName("reinforcedSlate");
    sacrificialDagger = new SacrificialDagger().setUnlocalizedName("sacrificialDagger");
    daggerOfSacrifice = new DaggerOfSacrifice().setUnlocalizedName("daggerOfSacrifice");
    airSigil = new SigilAir().setUnlocalizedName("airSigil");
    sigilOfTheFastMiner = new SigilOfTheFastMiner().setUnlocalizedName("sigilOfTheFastMiner");
    sigilOfElementalAffinity = new SigilOfElementalAffinity().setUnlocalizedName("sigilOfElementalAffinity");
    sigilOfHaste = new SigilOfHaste().setUnlocalizedName("sigilOfHaste");
    sigilOfHolding = new SigilOfHolding().setUnlocalizedName("sigilOfHolding");
    divinationSigil = new SigilDivination().setUnlocalizedName("divinationSigil");
    waterScribeTool = new WaterScribeTool().setUnlocalizedName("waterScribeTool");
    fireScribeTool = new FireScribeTool().setUnlocalizedName("fireScribeTool");
    earthScribeTool = new EarthScribeTool().setUnlocalizedName("earthScribeTool");
    airScribeTool = new AirScribeTool().setUnlocalizedName("airScribeTool");
    activationCrystal = new ActivationCrystal();
    boundPickaxe = new BoundPickaxe().setUnlocalizedName("boundPickaxe");
    boundAxe = new BoundAxe().setUnlocalizedName("boundAxe");
    boundShovel = new BoundShovel().setUnlocalizedName("boundShovel");
    boundHelmet = new BoundArmour(0).setUnlocalizedName("boundHelmet");
    boundPlate = new BoundArmour(1).setUnlocalizedName("boundPlate");
    boundLeggings = new BoundArmour(2).setUnlocalizedName("boundLeggings");
    boundBoots = new BoundArmour(3).setUnlocalizedName("boundBoots");
    weakBloodShard = new BloodShard().setUnlocalizedName("weakBloodShard");
    growthSigil = new SigilOfGrowth().setUnlocalizedName("growthSigil");
    blankSpell = new BlankSpell().setUnlocalizedName("blankSpell");
    alchemyFlask = new AlchemyFlask().setUnlocalizedName("alchemyFlask");
    standardBindingAgent = new StandardBindingAgent().setUnlocalizedName("standardBindingAgent");
    mundanePowerCatalyst = new MundanePowerCatalyst().setUnlocalizedName("mundanePowerCatalyst");
    averagePowerCatalyst = new AveragePowerCatalyst().setUnlocalizedName("averagePowerCatalyst");
    greaterPowerCatalyst = new GreaterPowerCatalyst().setUnlocalizedName("greaterPowerCatalyst");
    mundaneLengtheningCatalyst = new MundaneLengtheningCatalyst().setUnlocalizedName("mundaneLengtheningCatalyst");
    averageLengtheningCatalyst = new AverageLengtheningCatalyst().setUnlocalizedName("averageLengtheningCatalyst");
    greaterLengtheningCatalyst = new GreaterLengtheningCatalyst().setUnlocalizedName("greaterLengtheningCatalyst");
    incendium = new AlchemyReagent().setUnlocalizedName("incendium");
    magicales = new AlchemyReagent().setUnlocalizedName("magicales");
    sanctus = new AlchemyReagent().setUnlocalizedName("sanctus");
    aether = new AlchemyReagent().setUnlocalizedName("aether");
    simpleCatalyst = new AlchemyReagent().setUnlocalizedName("simpleCatalyst");
    crepitous = new AlchemyReagent().setUnlocalizedName("crepitous");
    crystallos = new AlchemyReagent().setUnlocalizedName("crystallos");
    terrae = new AlchemyReagent().setUnlocalizedName("terrae");
    aquasalus = new AlchemyReagent().setUnlocalizedName("aquasalus");
    tennebrae = new AlchemyReagent().setUnlocalizedName("tennebrae");
    demonBloodShard = new BloodShard().setUnlocalizedName("demonBloodShard");
    sigilOfWind = new SigilOfWind().setUnlocalizedName("sigilOfWind");
    telepositionFocus = new TelepositionFocus(1).setUnlocalizedName("telepositionFocus");
    enhancedTelepositionFocus = new EnhancedTelepositionFocus().setUnlocalizedName("enhancedTelepositionFocus");
    reinforcedTelepositionFocus = new ReinforcedTelepositionFocus().setUnlocalizedName("reinforcedTelepositionFocus");
    demonicTelepositionFocus = new DemonicTelepositionFocus().setUnlocalizedName("demonicTelepositionFocus");
    imbuedSlate = new AWBaseItems().setUnlocalizedName("imbuedSlate");
    demonicSlate = new AWBaseItems().setUnlocalizedName("demonicSlate");
    duskScribeTool = new DuskScribeTool().setUnlocalizedName("duskScribeTool");
    sigilOfTheBridge = new SigilOfTheBridge().setUnlocalizedName("sigilOfTheBridge");
    armourInhibitor = new ArmourInhibitor().setUnlocalizedName("armourInhibitor");
    creativeFiller = new CheatyItem().setUnlocalizedName("cheatyItem");
    demonPlacer = new DemonPlacer().setUnlocalizedName("demonPlacer");
    creativeDagger = new CreativeDagger().setUnlocalizedName("creativeDagger");
    weakFillingAgent = new WeakFillingAgent().setUnlocalizedName("weakFillingAgent");
    standardFillingAgent = new StandardFillingAgent().setUnlocalizedName("standardFillingAgent");
    enhancedFillingAgent = new EnhancedFillingAgent().setUnlocalizedName("enhancedFillingAgent");
    weakBindingAgent = new WeakBindingAgent().setUnlocalizedName("weakBindingAgent");
    itemRitualDiviner = new ItemRitualDiviner().setUnlocalizedName("ritualDiviner");
    sigilOfMagnetism = new SigilOfMagnetism().setUnlocalizedName("sigilOfMagnetism");
    itemKeyOfDiablo = new ItemDiabloKey().setUnlocalizedName("itemDiabloKey");
    energyBazooka = new EnergyBazooka().setUnlocalizedName("energyBazooka");
    itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil");
    itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal");
    bucketLife = new LifeBucket(ModBlocks.blockLifeEssence).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc);
    itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance");
    baseItems = new ItemComponents().setUnlocalizedName("baseItems");
    baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems");
    itemSigilOfSupression = new SigilOfSupression().setUnlocalizedName("itemSigilOfSupression");
    itemFluidSigil = new SigilFluid().setUnlocalizedName("itemFluidSigil");
    itemSeerSigil = new SigilSeer().setUnlocalizedName("itemSeerSigil");
    customTool = new ItemSpellMultiTool().setUnlocalizedName("multiTool");
    SpellParadigmTool.customTool = customTool;
    itemCombinationalCatalyst = new CombinationalCatalyst().setUnlocalizedName("itemCombinationalCatalyst");
    itemAttunedCrystal = new ItemAttunedCrystal().setUnlocalizedName("itemAttunedCrystal");
    itemTankSegmenter = new ItemTankSegmenter().setUnlocalizedName("itemTankSegmenter");
    itemDestinationClearer = new ItemDestinationClearer().setUnlocalizedName("destinationClearer");
    dawnScribeTool = new DawnScribeTool().setUnlocalizedName("dawnScribeTool");
    itemBloodPack = new ItemBloodLetterPack().setUnlocalizedName("itemBloodPack");
    itemHarvestSigil = new SigilHarvest().setUnlocalizedName("itemHarvestSigil");
    itemCompressionSigil = new SigilPackRat().setUnlocalizedName("itemCompressionSigil");
    itemAssassinSigil = new SigilOfTheAssassin().setUnlocalizedName("itemAssassinSigil");
    boundHelmetWater = new OmegaArmourWater(0).setUnlocalizedName("boundHelmetWater");
    boundPlateWater = new OmegaArmourWater(1).setUnlocalizedName("boundPlateWater");
    boundLeggingsWater = new OmegaArmourWater(2).setUnlocalizedName("boundLeggingsWater");
    boundBootsWater = new OmegaArmourWater(3).setUnlocalizedName("boundBootsWater");
    boundHelmetEarth = new OmegaArmourEarth(0).setUnlocalizedName("boundHelmetEarth");
    boundPlateEarth = new OmegaArmourEarth(1).setUnlocalizedName("boundPlateEarth");
    boundLeggingsEarth = new OmegaArmourEarth(2).setUnlocalizedName("boundLeggingsEarth");
    boundBootsEarth = new OmegaArmourEarth(3).setUnlocalizedName("boundBootsEarth");
    boundHelmetWind = new OmegaArmourWind(0).setUnlocalizedName("boundHelmetWind");
    boundPlateWind = new OmegaArmourWind(1).setUnlocalizedName("boundPlateWind");
    boundLeggingsWind = new OmegaArmourWind(2).setUnlocalizedName("boundLeggingsWind");
    boundBootsWind = new OmegaArmourWind(3).setUnlocalizedName("boundBootsWind");
    boundHelmetFire = new OmegaArmourFire(0).setUnlocalizedName("boundHelmetFire");
    boundPlateFire = new OmegaArmourFire(1).setUnlocalizedName("boundPlateFire");
    boundLeggingsFire = new OmegaArmourFire(2).setUnlocalizedName("boundLeggingsFire");
    boundBootsFire = new OmegaArmourFire(3).setUnlocalizedName("boundBootsFire");
    inputRoutingFocus = new InputRoutingFocus().setUnlocalizedName("inputRoutingFocus");
    outputRoutingFocus = new OutputRoutingFocus().setUnlocalizedName("outputRoutingFocus");
    itemIncense = new ItemIncense().setUnlocalizedName("bloodMagicIncenseItem");
    ritualDismantler = new ItemRitualDismantler().setUnlocalizedName("ritualDismantler");
}
Also used : SigilOfHaste(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHaste) SigilOfMagnetism(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfMagnetism) SigilBloodLight(WayofTime.alchemicalWizardry.common.items.sigil.SigilBloodLight) WeakFillingAgent(WayofTime.alchemicalWizardry.common.items.potion.WeakFillingAgent) SigilOfGrowth(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfGrowth) OmegaArmourEarth(WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth) GreaterPowerCatalyst(WayofTime.alchemicalWizardry.common.items.potion.GreaterPowerCatalyst) ItemAttunedCrystal(WayofTime.alchemicalWizardry.common.items.energy.ItemAttunedCrystal) WeakBindingAgent(WayofTime.alchemicalWizardry.common.items.potion.WeakBindingAgent) MundanePowerCatalyst(WayofTime.alchemicalWizardry.common.items.potion.MundanePowerCatalyst) SigilOfHolding(WayofTime.alchemicalWizardry.common.items.sigil.holding.SigilOfHolding) SigilOfEnderSeverance(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfEnderSeverance) MundaneLengtheningCatalyst(WayofTime.alchemicalWizardry.common.items.potion.MundaneLengtheningCatalyst) SigilPackRat(WayofTime.alchemicalWizardry.common.items.sigil.SigilPackRat) SigilOfTheAssassin(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheAssassin) SigilAir(WayofTime.alchemicalWizardry.common.items.sigil.SigilAir) OmegaArmourWater(WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWater) SigilVoid(WayofTime.alchemicalWizardry.common.items.sigil.SigilVoid) AlchemyFlask(WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask) OmegaArmourFire(WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire) SigilSeer(WayofTime.alchemicalWizardry.common.items.sigil.SigilSeer) CombinationalCatalyst(WayofTime.alchemicalWizardry.common.items.potion.CombinationalCatalyst) SigilOfTheFastMiner(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheFastMiner) ItemDestinationClearer(WayofTime.alchemicalWizardry.common.items.energy.ItemDestinationClearer) BoundArmour(WayofTime.alchemicalWizardry.common.items.armour.BoundArmour) SigilWater(WayofTime.alchemicalWizardry.common.items.sigil.SigilWater) StandardBindingAgent(WayofTime.alchemicalWizardry.common.items.potion.StandardBindingAgent) SigilDivination(WayofTime.alchemicalWizardry.common.items.sigil.SigilDivination) EnhancedFillingAgent(WayofTime.alchemicalWizardry.common.items.potion.EnhancedFillingAgent) OutputRoutingFocus(WayofTime.alchemicalWizardry.common.items.routing.OutputRoutingFocus) AlchemyReagent(WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent) GreaterLengtheningCatalyst(WayofTime.alchemicalWizardry.common.items.potion.GreaterLengtheningCatalyst) StandardFillingAgent(WayofTime.alchemicalWizardry.common.items.potion.StandardFillingAgent) SigilOfSupression(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfSupression) AverageLengtheningCatalyst(WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst) SigilFluid(WayofTime.alchemicalWizardry.common.items.sigil.SigilFluid) SigilOfElementalAffinity(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfElementalAffinity) OmegaArmourWind(WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWind) ItemTankSegmenter(WayofTime.alchemicalWizardry.common.items.energy.ItemTankSegmenter) AveragePowerCatalyst(WayofTime.alchemicalWizardry.common.items.potion.AveragePowerCatalyst) SigilLava(WayofTime.alchemicalWizardry.common.items.sigil.SigilLava) SigilOfTheBridge(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfTheBridge) ItemSpellMultiTool(WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool) InputRoutingFocus(WayofTime.alchemicalWizardry.common.items.routing.InputRoutingFocus) SigilOfWind(WayofTime.alchemicalWizardry.common.items.sigil.SigilOfWind) SigilHarvest(WayofTime.alchemicalWizardry.common.items.sigil.SigilHarvest)

Example 2 with BoundArmour

use of WayofTime.alchemicalWizardry.common.items.armour.BoundArmour in project BloodMagic by WayofTime.

the class ArmourForge method onBlockActivated.

@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int idk, float what, float these, float are) {
    if (world.isRemote) {
        return false;
    }
    int armourType = getArmourType(world, x, y, z);
    if (armourType == -1) {
        return false;
    }
    int direction = getDirectionForArmourType(world, x, y, z, armourType);
    if (!isParadigmValid(armourType, direction, world, x, y, z)) {
        return false;
    }
    List<ArmourComponent> list = null;
    ItemStack armourPiece = null;
    switch(armourType) {
        case 0:
            list = plateList;
            armourPiece = new ItemStack(ModItems.boundPlate, 1, 0);
            break;
        case 1:
            list = leggingsList;
            armourPiece = new ItemStack(ModItems.boundLeggings, 1, 0);
            break;
        case 2:
            list = helmetList;
            armourPiece = new ItemStack(ModItems.boundHelmet, 1, 0);
            break;
        case 3:
            list = bootsList;
            armourPiece = new ItemStack(ModItems.boundBoots, 1, 0);
            break;
    }
    if (list == null) {
        return false;
    }
    if (armourPiece == null) {
        return false;
    }
    if (armourPiece.getTagCompound() == null) {
        armourPiece.setTagCompound(new NBTTagCompound());
    }
    for (ArmourComponent ac : list) {
        int xOff = ac.getXOff();
        int zOff = ac.getZOff();
        TileEntity tileEntity;
        switch(direction) {
            case 1:
                tileEntity = world.getTileEntity(x + xOff, y, z - zOff);
                break;
            case 2:
                tileEntity = world.getTileEntity(x + zOff, y, z + xOff);
                break;
            case 3:
                tileEntity = world.getTileEntity(x - xOff, y, z + zOff);
                break;
            case 4:
                tileEntity = world.getTileEntity(x - zOff, y, z - xOff);
                break;
            case 5:
                tileEntity = world.getTileEntity(x + xOff, y + zOff, z);
                break;
            case 6:
                tileEntity = world.getTileEntity(x, y + zOff, z + xOff);
                break;
            default:
                tileEntity = null;
        }
        if (tileEntity instanceof TESocket) {
            ItemStack itemStack = ((TESocket) tileEntity).getStackInSlot(0);
            int xCoord = tileEntity.xCoord;
            int yCoord = tileEntity.yCoord;
            int zCoord = tileEntity.zCoord;
            ((TESocket) tileEntity).setInventorySlotContents(0, null);
            world.setBlockToAir(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
            for (int i = 0; i < 8; i++) {
                SpellHelper.sendIndexedParticleToAllAround(world, xCoord, yCoord, zCoord, 20, world.provider.dimensionId, 1, xCoord, yCoord, zCoord);
            }
            if (itemStack != null) {
                Item item = itemStack.getItem();
                if (item instanceof ArmourUpgrade) {
                    ((BoundArmour) armourPiece.getItem()).hasAddedToInventory(armourPiece, itemStack.copy());
                    ((TESocket) tileEntity).setInventorySlotContents(0, null);
                }
            }
        }
    }
    if (armourPiece != null) {
        int xOff = (world.rand.nextInt(11) - 5);
        int zOff = (int) (Math.sqrt(25 - xOff * xOff) * (world.rand.nextInt(2) - 0.5) * 2);
        world.addWeatherEffect(new EntityLightningBolt(world, x + xOff, y + 5, z + zOff));
        world.spawnEntityInWorld(new EntityItem(world, x, y + 1, z, armourPiece));
    }
    return true;
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) EntityItem(net.minecraft.entity.item.EntityItem) Item(net.minecraft.item.Item) BoundArmour(WayofTime.alchemicalWizardry.common.items.armour.BoundArmour) ArmourComponent(WayofTime.alchemicalWizardry.common.ArmourComponent) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) TESocket(WayofTime.alchemicalWizardry.common.tileEntity.TESocket) ArmourUpgrade(WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade) EntityLightningBolt(net.minecraft.entity.effect.EntityLightningBolt) ItemStack(net.minecraft.item.ItemStack) EntityItem(net.minecraft.entity.item.EntityItem)

Example 3 with BoundArmour

use of WayofTime.alchemicalWizardry.common.items.armour.BoundArmour in project BloodMagic by WayofTime.

the class RitualEffectUnbinding method performEffect.

@Override
public void performEffect(IMasterRitualStone ritualStone) {
    String owner = ritualStone.getOwner();
    int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
    World world = ritualStone.getWorld();
    int x = ritualStone.getXCoord();
    int y = ritualStone.getYCoord();
    int z = ritualStone.getZCoord();
    if (currentEssence < this.getCostPerRefresh()) {
        SoulNetworkHandler.causeNauseaToPlayer(owner);
    } else {
        int d0 = 0;
        AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y + 1, (double) z, (double) (x + 1), (double) (y + 2), (double) (z + 1)).expand(d0, d0, d0);
        List list = world.getEntitiesWithinAABB(EntityItem.class, axisalignedbb);
        Iterator iterator = list.iterator();
        EntityItem item;
        boolean drain = false;
        while (iterator.hasNext()) {
            final int sanctusDrain = 1000;
            item = (EntityItem) iterator.next();
            ItemStack itemStack = item.getEntityItem();
            if (itemStack == null) {
                continue;
            }
            boolean hasSanctus = this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, false);
            if (hasSanctus) {
                if (itemStack.getItem() instanceof IBindable && !EnergyItems.getOwnerName(itemStack).equals("")) {
                    world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z - 5));
                    world.addWeatherEffect(new EntityLightningBolt(world, x, y + 1, z + 5));
                    world.addWeatherEffect(new EntityLightningBolt(world, x - 5, y + 1, z));
                    world.addWeatherEffect(new EntityLightningBolt(world, x + 5, y + 1, z));
                    EnergyItems.setItemOwner(itemStack, "");
                    this.canDrainReagent(ritualStone, ReagentRegistry.sanctusReagent, sanctusDrain, true);
                    drain = true;
                    ritualStone.setActive(false);
                    break;
                }
            }
            if (itemStack.getItem() == ModItems.boundHelmet) {
                ritualStone.setVar1(5);
            } else if (itemStack.getItem() == ModItems.boundPlate) {
                ritualStone.setVar1(8);
            } else if (itemStack.getItem() == ModItems.boundLeggings) {
                ritualStone.setVar1(7);
            } else if (itemStack.getItem() == ModItems.boundBoots) {
                ritualStone.setVar1(4);
            } else if (UnbindingRegistry.isRequiredItemValid(itemStack)) {
                ritualStone.setVar1(UnbindingRegistry.getIndexForItem(itemStack) + 9);
            }
            if (ritualStone.getVar1() > 0 && ritualStone.getVar1() <= 8) {
                item.setDead();
                doLightning(world, x, y, z);
                ItemStack[] inv = ((BoundArmour) itemStack.getItem()).getInternalInventory(itemStack);
                int bloodSockets = 0;
                if (itemStack.getItem() == ModItems.boundHelmet) {
                    bloodSockets = 5;
                } else if (itemStack.getItem() == ModItems.boundPlate) {
                    bloodSockets = 8;
                } else if (itemStack.getItem() == ModItems.boundLeggings) {
                    bloodSockets = 7;
                } else if (itemStack.getItem() == ModItems.boundBoots) {
                    bloodSockets = 4;
                }
                if (inv != null) {
                    for (ItemStack internalItem : inv) {
                        if (internalItem != null) {
                            doLightning(world, x, y, z);
                            EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, internalItem.copy());
                            world.spawnEntityInWorld(newItem);
                        }
                    }
                }
                EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, new ItemStack(ModBlocks.bloodSocket, bloodSockets));
                world.spawnEntityInWorld(newItem);
                ritualStone.setActive(false);
                drain = true;
                break;
            } else if (ritualStone.getVar1() >= 9) {
                item.setDead();
                doLightning(world, x, y, z);
                List<ItemStack> spawnedItem = UnbindingRegistry.getOutputForIndex(ritualStone.getVar1() - 9);
                if (spawnedItem != null) {
                    for (ItemStack itemStack1 : spawnedItem) {
                        EntityItem newItem = new EntityItem(world, x + 0.5, y + 1, z + 0.5, itemStack1.copy());
                        world.spawnEntityInWorld(newItem);
                    }
                }
                ritualStone.setActive(false);
                drain = true;
                break;
            }
        }
        if (drain) {
            SoulNetworkHandler.syphonFromNetwork(owner, this.getCostPerRefresh());
        }
    }
    if (world.rand.nextInt(10) == 0) {
        SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 1, x, y, z);
    }
}
Also used : AxisAlignedBB(net.minecraft.util.AxisAlignedBB) IBindable(WayofTime.alchemicalWizardry.api.items.interfaces.IBindable) BoundArmour(WayofTime.alchemicalWizardry.common.items.armour.BoundArmour) EntityLightningBolt(net.minecraft.entity.effect.EntityLightningBolt) World(net.minecraft.world.World) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) List(java.util.List) ItemStack(net.minecraft.item.ItemStack) EntityItem(net.minecraft.entity.item.EntityItem)

Aggregations

BoundArmour (WayofTime.alchemicalWizardry.common.items.armour.BoundArmour)3 EntityLightningBolt (net.minecraft.entity.effect.EntityLightningBolt)2 EntityItem (net.minecraft.entity.item.EntityItem)2 ItemStack (net.minecraft.item.ItemStack)2 ItemSpellMultiTool (WayofTime.alchemicalWizardry.api.items.ItemSpellMultiTool)1 ArmourUpgrade (WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade)1 IBindable (WayofTime.alchemicalWizardry.api.items.interfaces.IBindable)1 ArmourComponent (WayofTime.alchemicalWizardry.common.ArmourComponent)1 OmegaArmourEarth (WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth)1 OmegaArmourFire (WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourFire)1 OmegaArmourWater (WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWater)1 OmegaArmourWind (WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWind)1 ItemAttunedCrystal (WayofTime.alchemicalWizardry.common.items.energy.ItemAttunedCrystal)1 ItemDestinationClearer (WayofTime.alchemicalWizardry.common.items.energy.ItemDestinationClearer)1 ItemTankSegmenter (WayofTime.alchemicalWizardry.common.items.energy.ItemTankSegmenter)1 AlchemyFlask (WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask)1 AlchemyReagent (WayofTime.alchemicalWizardry.common.items.potion.AlchemyReagent)1 AverageLengtheningCatalyst (WayofTime.alchemicalWizardry.common.items.potion.AverageLengtheningCatalyst)1 AveragePowerCatalyst (WayofTime.alchemicalWizardry.common.items.potion.AveragePowerCatalyst)1 CombinationalCatalyst (WayofTime.alchemicalWizardry.common.items.potion.CombinationalCatalyst)1