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