Search in sources :

Example 1 with BloodRune

use of WayofTime.alchemicalWizardry.common.block.BloodRune in project BloodMagic by WayofTime.

the class ModBlocks method init.

public static void init() {
    blockAltar = new BlockAltar();
    bloodRune = new BloodRune();
    speedRune = new SpeedRune();
    efficiencyRune = new EfficiencyRune();
    runeOfSacrifice = new RuneOfSacrifice();
    runeOfSelfSacrifice = new RuneOfSelfSacrifice();
    blockTeleposer = new BlockTeleposer();
    spectralBlock = new SpectralBlock();
    ritualStone = new RitualStone();
    blockMasterStone = new BlockMasterStone();
    imperfectRitualStone = new ImperfectRitualStone();
    bloodSocket = new BlockSocket();
    armourForge = new ArmourForge();
    emptySocket = new EmptySocket();
    largeBloodStoneBrick = new LargeBloodStoneBrick();
    bloodStoneBrick = new BloodStoneBrick();
    blockWritingTable = new BlockWritingTable();
    blockHomHeart = new BlockHomHeart();
    blockPedestal = new BlockPedestal();
    blockPlinth = new BlockPlinth();
    blockConduit = new BlockConduit();
    blockBloodLight = new BlockBloodLightSource();
    blockSpellEffect = new BlockSpellEffect();
    blockSpellParadigm = new BlockSpellParadigm();
    blockSpellModifier = new BlockSpellModifier();
    blockSpellEnhancement = new BlockSpellEnhancement();
    blockSpectralContainer = new BlockSpectralContainer();
    blockDemonPortal = new BlockDemonPortal();
    blockBuildingSchematicSaver = new BlockSchematicSaver();
    blockReagentConduit = new BlockReagentConduit();
    blockAlchemicCalcinator = new BlockAlchemicCalcinator();
    blockCrystalBelljar = new BlockBelljar();
    blockDemonChest = new BlockDemonChest();
    blockCrystal = new BlockCrystal();
    blockMimic = new MimicBlock();
    blockLifeEssence = new LifeEssenceBlock();
    blockEnchantmentGlyph = new BlockEnchantmentGlyph();
    blockStabilityGlyph = new BlockStabilityGlyph();
    blockCrucible = new BlockCrucible();
}
Also used : BlockSchematicSaver(WayofTime.alchemicalWizardry.common.block.BlockSchematicSaver) BlockBelljar(WayofTime.alchemicalWizardry.common.block.BlockBelljar) BlockSpectralContainer(WayofTime.alchemicalWizardry.common.block.BlockSpectralContainer) ImperfectRitualStone(WayofTime.alchemicalWizardry.common.block.ImperfectRitualStone) RuneOfSacrifice(WayofTime.alchemicalWizardry.common.block.RuneOfSacrifice) BlockDemonPortal(WayofTime.alchemicalWizardry.common.block.BlockDemonPortal) SpeedRune(WayofTime.alchemicalWizardry.common.block.SpeedRune) RuneOfSelfSacrifice(WayofTime.alchemicalWizardry.common.block.RuneOfSelfSacrifice) LargeBloodStoneBrick(WayofTime.alchemicalWizardry.common.block.LargeBloodStoneBrick) BlockConduit(WayofTime.alchemicalWizardry.common.block.BlockConduit) BlockAlchemicCalcinator(WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator) BlockPedestal(WayofTime.alchemicalWizardry.common.block.BlockPedestal) SpectralBlock(WayofTime.alchemicalWizardry.common.block.SpectralBlock) BlockCrystal(WayofTime.alchemicalWizardry.common.block.BlockCrystal) BlockSpellEffect(WayofTime.alchemicalWizardry.common.block.BlockSpellEffect) BlockReagentConduit(WayofTime.alchemicalWizardry.common.block.BlockReagentConduit) BlockSocket(WayofTime.alchemicalWizardry.common.block.BlockSocket) BlockBloodLightSource(WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource) BlockHomHeart(WayofTime.alchemicalWizardry.common.block.BlockHomHeart) EmptySocket(WayofTime.alchemicalWizardry.common.block.EmptySocket) BlockDemonChest(WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.BlockDemonChest) BlockSpellParadigm(WayofTime.alchemicalWizardry.common.block.BlockSpellParadigm) BlockSpellEnhancement(WayofTime.alchemicalWizardry.common.block.BlockSpellEnhancement) BlockTeleposer(WayofTime.alchemicalWizardry.common.block.BlockTeleposer) LifeEssenceBlock(WayofTime.alchemicalWizardry.common.block.LifeEssenceBlock) BlockEnchantmentGlyph(WayofTime.alchemicalWizardry.common.block.BlockEnchantmentGlyph) ArmourForge(WayofTime.alchemicalWizardry.common.block.ArmourForge) BlockWritingTable(WayofTime.alchemicalWizardry.common.block.BlockWritingTable) EfficiencyRune(WayofTime.alchemicalWizardry.common.block.EfficiencyRune) BlockStabilityGlyph(WayofTime.alchemicalWizardry.common.block.BlockStabilityGlyph) BlockPlinth(WayofTime.alchemicalWizardry.common.block.BlockPlinth) BloodStoneBrick(WayofTime.alchemicalWizardry.common.block.BloodStoneBrick) LargeBloodStoneBrick(WayofTime.alchemicalWizardry.common.block.LargeBloodStoneBrick) BlockSpellModifier(WayofTime.alchemicalWizardry.common.block.BlockSpellModifier) BlockCrucible(WayofTime.alchemicalWizardry.common.block.BlockCrucible) MimicBlock(WayofTime.alchemicalWizardry.common.block.MimicBlock) BlockAltar(WayofTime.alchemicalWizardry.common.block.BlockAltar) BloodRune(WayofTime.alchemicalWizardry.common.block.BloodRune) BlockMasterStone(WayofTime.alchemicalWizardry.common.block.BlockMasterStone) RitualStone(WayofTime.alchemicalWizardry.common.block.RitualStone) ImperfectRitualStone(WayofTime.alchemicalWizardry.common.block.ImperfectRitualStone)

Example 2 with BloodRune

use of WayofTime.alchemicalWizardry.common.block.BloodRune in project BloodMagic by WayofTime.

the class UpgradedAltars method checkAltarIsValid.

public static boolean checkAltarIsValid(World world, int x, int y, int z, int altarTier) {
    switch(altarTier) {
        case 1:
            return true;
        case 2:
            for (AltarComponent ac : secondTierAltar) {
                if (ac.isBloodRune()) {
                    Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (!(testBlock instanceof BloodRune)) {
                        if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta)))
                            return false;
                    }
                } else {
                    Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) {
                        if (!checkSpecials(ac, new BlockStack(block, metadata)))
                            return false;
                    }
                }
            }
            return true;
        case 3:
            for (AltarComponent ac : thirdTierAltar) {
                if (ac.isBloodRune()) {
                    Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (!(testBlock instanceof BloodRune)) {
                        if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta)))
                            return false;
                    }
                } else {
                    Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) {
                        if (!checkSpecials(ac, new BlockStack(block, metadata)))
                            return false;
                    }
                }
            }
            return true;
        case 4:
            for (AltarComponent ac : fourthTierAltar) {
                if (ac.isBloodRune()) {
                    Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (!(testBlock instanceof BloodRune)) {
                        if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta)))
                            return false;
                    }
                } else {
                    Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) {
                        if (!checkSpecials(ac, new BlockStack(block, metadata)))
                            return false;
                    }
                }
            }
            return true;
        case 5:
            for (AltarComponent ac : fifthTierAltar) {
                if (ac.isBloodRune()) {
                    Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (!(testBlock instanceof BloodRune)) {
                        if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta)))
                            return false;
                    }
                } else {
                    Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) {
                        if (!checkSpecials(ac, new BlockStack(block, metadata)))
                            return false;
                    }
                }
            }
            return true;
        case 6:
            for (AltarComponent ac : sixthTierAltar) {
                if (ac.isBloodRune()) {
                    Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int testMeta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (!(testBlock instanceof BloodRune)) {
                        if (!checkRuneSpecials(ac, new BlockStack(testBlock, testMeta)))
                            return false;
                    }
                } else {
                    Block block = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    int metadata = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
                    if (((ac.getBlock() != block) || (ac.getMetadata() != metadata)) && !(ac.getBlock() == Blocks.stonebrick && !world.isAirBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ()))) {
                        if (!checkSpecials(ac, new BlockStack(block, metadata)))
                            return false;
                    }
                }
            }
            return true;
        default:
            return false;
    }
}
Also used : IAltarComponent(WayofTime.alchemicalWizardry.api.tile.IAltarComponent) Block(net.minecraft.block.Block) BlockStack(WayofTime.alchemicalWizardry.api.BlockStack) BloodRune(WayofTime.alchemicalWizardry.common.block.BloodRune)

Example 3 with BloodRune

use of WayofTime.alchemicalWizardry.common.block.BloodRune in project BloodMagic by WayofTime.

the class UpgradedAltars method getUpgrades.

public static AltarUpgradeComponent getUpgrades(World world, int x, int y, int z, int altarTier) {
    if (world.isRemote) {
        return null;
    }
    AltarUpgradeComponent upgrades = new AltarUpgradeComponent();
    List<AltarComponent> list = UpgradedAltars.getAltarUpgradeListForTier(altarTier);
    for (AltarComponent ac : list) {
        if (ac.isUpgradeSlot()) {
            // Currently checks the getRuneEffect.
            // TODO Change so that it uses the metadata instead, with the BlockID.
            Block testBlock = world.getBlock(x + ac.getX(), y + ac.getY(), z + ac.getZ());
            int meta = world.getBlockMetadata(x + ac.getX(), y + ac.getY(), z + ac.getZ());
            if (testBlock instanceof BloodRune) {
                if (testBlock instanceof IFadedRune && altarTier > ((IFadedRune) testBlock).getAltarTierLimit(meta)) {
                    return UpgradedAltars.getUpgrades(world, x, y, z, ((IFadedRune) testBlock).getAltarTierLimit(meta));
                }
                switch(((BloodRune) testBlock).getRuneEffect(meta)) {
                    case 1:
                        upgrades.addSpeedUpgrade();
                        break;
                    case 2:
                        upgrades.addEfficiencyUpgrade();
                        break;
                    case 3:
                        upgrades.addSacrificeUpgrade();
                        break;
                    case 4:
                        upgrades.addSelfSacrificeUpgrade();
                        break;
                    case 5:
                        upgrades.addaltarCapacitiveUpgrade();
                        break;
                    case 6:
                        upgrades.addDisplacementUpgrade();
                        break;
                    case 7:
                        upgrades.addorbCapacitiveUpgrade();
                        break;
                    case 8:
                        upgrades.addBetterCapacitiveUpgrade();
                        break;
                    case 9:
                        upgrades.addAccelerationUpgrade();
                        break;
                }
            }
        }
    }
    return upgrades;
}
Also used : IAltarComponent(WayofTime.alchemicalWizardry.api.tile.IAltarComponent) IFadedRune(WayofTime.alchemicalWizardry.api.altarRecipeRegistry.IFadedRune) Block(net.minecraft.block.Block) BloodRune(WayofTime.alchemicalWizardry.common.block.BloodRune)

Aggregations

BloodRune (WayofTime.alchemicalWizardry.common.block.BloodRune)3 IAltarComponent (WayofTime.alchemicalWizardry.api.tile.IAltarComponent)2 Block (net.minecraft.block.Block)2 BlockStack (WayofTime.alchemicalWizardry.api.BlockStack)1 IFadedRune (WayofTime.alchemicalWizardry.api.altarRecipeRegistry.IFadedRune)1 ArmourForge (WayofTime.alchemicalWizardry.common.block.ArmourForge)1 BlockAlchemicCalcinator (WayofTime.alchemicalWizardry.common.block.BlockAlchemicCalcinator)1 BlockAltar (WayofTime.alchemicalWizardry.common.block.BlockAltar)1 BlockBelljar (WayofTime.alchemicalWizardry.common.block.BlockBelljar)1 BlockBloodLightSource (WayofTime.alchemicalWizardry.common.block.BlockBloodLightSource)1 BlockConduit (WayofTime.alchemicalWizardry.common.block.BlockConduit)1 BlockCrucible (WayofTime.alchemicalWizardry.common.block.BlockCrucible)1 BlockCrystal (WayofTime.alchemicalWizardry.common.block.BlockCrystal)1 BlockDemonPortal (WayofTime.alchemicalWizardry.common.block.BlockDemonPortal)1 BlockEnchantmentGlyph (WayofTime.alchemicalWizardry.common.block.BlockEnchantmentGlyph)1 BlockHomHeart (WayofTime.alchemicalWizardry.common.block.BlockHomHeart)1 BlockMasterStone (WayofTime.alchemicalWizardry.common.block.BlockMasterStone)1 BlockPedestal (WayofTime.alchemicalWizardry.common.block.BlockPedestal)1 BlockPlinth (WayofTime.alchemicalWizardry.common.block.BlockPlinth)1 BlockReagentConduit (WayofTime.alchemicalWizardry.common.block.BlockReagentConduit)1