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();
}
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;
}
}
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;
}
Aggregations