From eb9284faf7537f7674d31e07fd673e82f3ddb869 Mon Sep 17 00:00:00 2001 From: WayofTime Date: Fri, 16 Jan 2015 10:36:50 -0500 Subject: [PATCH] 1.3.0b --- .../AlchemicalWizardry.java | 24 +++---- .../alchemicalWizardry/ModItems.java | 61 +++++++++--------- .../rituals/RitualEffectItemRouting.java | 62 +++++++++++++++++-- 3 files changed, 95 insertions(+), 52 deletions(-) diff --git a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index 532dac44..3391a473 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/src/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -114,10 +114,6 @@ import WayofTime.alchemicalWizardry.common.harvest.PamHarvestCompatRegistry; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; import WayofTime.alchemicalWizardry.common.items.thaumcraft.ItemSanguineArmour; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmEarth; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWater; -import WayofTime.alchemicalWizardry.common.omega.OmegaParadigmWind; -import WayofTime.alchemicalWizardry.common.omega.OmegaRegistry; import WayofTime.alchemicalWizardry.common.potion.PotionAmphibian; import WayofTime.alchemicalWizardry.common.potion.PotionBoost; import WayofTime.alchemicalWizardry.common.potion.PotionDeaf; @@ -136,7 +132,6 @@ import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray; import WayofTime.alchemicalWizardry.common.potion.PotionSoulHarden; import WayofTime.alchemicalWizardry.common.renderer.AlchemyCircleRenderer; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAlphaPact; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBiomeChanger; @@ -154,15 +149,12 @@ import WayofTime.alchemicalWizardry.common.rituals.RitualEffectGrowth; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectHarvest; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectHealing; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectInterdiction; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectItemRouting; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectItemSuction; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectJumping; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLava; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLeap; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectLifeConduit; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectMagnetic; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectOmegaStalling; -import WayofTime.alchemicalWizardry.common.rituals.RitualEffectOmegaTest; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSoulBound; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSpawnWard; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectSummonMeteor; @@ -1279,11 +1271,11 @@ public class AlchemicalWizardry Rituals.registerRitual("AW028SpawnWard", 1, 150000, new RitualEffectSpawnWard(), "Ward of Sacrosanctity", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false)); Rituals.registerRitual("AW029VeilOfEvil", 1, 150000, new RitualEffectVeilOfEvil(), "Veil of Evil", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false)); Rituals.registerRitual("AW030FullStomach", 1, 100000, new RitualEffectFullStomach(), "Requiem of the Satiated Stomach", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/SimpleTransCircle.png"), 0, 0, 0, 255, 0, 0.501, 0.501, 0, 1.5, false)); - Rituals.registerRitual("AW031Convocation",isDemonRitualCreativeOnly ? 10 : 2, 15000000, new RitualEffectDemonPortal(), "Convocation of the Damned", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleDemon.png"), 220, 22, 22, 255, 0, 0.501, 0.501, 0, 5, false)); - Rituals.registerRitual("AW032", 1, 100, new RitualEffectOmegaTest(), "Symmetry of the Omega"); - Rituals.registerRitual("AW033", 2, 100, new RitualEffectOmegaStalling(), "Omega Stalling"); - Rituals.registerRitual("AW034", 2, 100, new RitualEffectAlphaPact(), "Alpha Pact"); - Rituals.registerRitual("AW035", 1, 100, new RitualEffectItemRouting(), "Ritual of the Phantom Hands"); + Rituals.registerRitual("AW031Convocation", isDemonRitualCreativeOnly ? 10 : 2, 15000000, new RitualEffectDemonPortal(), "Convocation of the Damned", new AlchemyCircleRenderer(new ResourceLocation("alchemicalwizardry:textures/models/TransCircleDemon.png"), 220, 22, 22, 255, 0, 0.501, 0.501, 0, 5, false)); +// Rituals.registerRitual("AW032", 1, 100, new RitualEffectOmegaTest(), "Symmetry of the Omega"); +// Rituals.registerRitual("AW033", 2, 100, new RitualEffectOmegaStalling(), "Omega Stalling"); +// Rituals.registerRitual("AW034", 2, 100, new RitualEffectAlphaPact(), "Alpha Pact"); +// Rituals.registerRitual("AW035", 1, 100, new RitualEffectItemRouting(), "Ritual of the Phantom Hands"); //Rituals.registerRitual(1,100,new RitualEffectApiaryOverclock(),"Apiary Overclock")); } @@ -1326,9 +1318,9 @@ public class AlchemicalWizardry ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 7), new ReagentStack(ReagentRegistry.reductusReagent, 1000)); ReagentRegistry.registerItemAndReagent(new ItemStack(ModItems.baseAlchemyItems, 1, 8), new ReagentStack(ReagentRegistry.potentiaReagent, 1000)); - OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater(ModItems.boundHelmetWater, ModItems.boundPlateWater, ModItems.boundLeggingsWater, ModItems.boundBootsWater)); - OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth(ModItems.boundHelmetEarth, ModItems.boundPlateEarth, ModItems.boundLeggingsEarth, ModItems.boundBootsEarth)); - OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind(ModItems.boundHelmetWind, ModItems.boundPlateWind, ModItems.boundLeggingsWind, ModItems.boundBootsWind)); +// OmegaRegistry.registerParadigm(ReagentRegistry.aquasalusReagent, new OmegaParadigmWater(ModItems.boundHelmetWater, ModItems.boundPlateWater, ModItems.boundLeggingsWater, ModItems.boundBootsWater)); +// OmegaRegistry.registerParadigm(ReagentRegistry.terraeReagent, new OmegaParadigmEarth(ModItems.boundHelmetEarth, ModItems.boundPlateEarth, ModItems.boundLeggingsEarth, ModItems.boundBootsEarth)); +// OmegaRegistry.registerParadigm(ReagentRegistry.aetherReagent, new OmegaParadigmWind(ModItems.boundHelmetWind, ModItems.boundPlateWind, ModItems.boundLeggingsWind, ModItems.boundBootsWind)); } public static void initDemonPacketRegistiry() diff --git a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java index db4b71d1..55a4dfe3 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/ModItems.java +++ b/src/main/java/WayofTime/alchemicalWizardry/ModItems.java @@ -47,9 +47,6 @@ import WayofTime.alchemicalWizardry.common.items.TranscendentBloodOrb; import WayofTime.alchemicalWizardry.common.items.WaterScribeTool; import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour; import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmour; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourEarth; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWater; -import WayofTime.alchemicalWizardry.common.items.armour.OmegaArmourWind; import WayofTime.alchemicalWizardry.common.items.energy.ItemAttunedCrystal; import WayofTime.alchemicalWizardry.common.items.energy.ItemDestinationClearer; import WayofTime.alchemicalWizardry.common.items.energy.ItemTankSegmenter; @@ -332,21 +329,21 @@ public class ModItems itemCompressionSigil = new ItemPackRatSigil().setUnlocalizedName("itemCompressionSigil"); itemAssassinSigil = new ItemSigilOfTheAssassin().setUnlocalizedName("itemAssassinSigil"); - boundHelmetWater = (OmegaArmour) new OmegaArmourWater(0).setUnlocalizedName("boundHelmetWater"); - boundPlateWater = (OmegaArmour) new OmegaArmourWater(1).setUnlocalizedName("boundPlateWater"); - boundLeggingsWater = (OmegaArmour) new OmegaArmourWater(2).setUnlocalizedName("boundLeggingsWater"); - boundBootsWater = (OmegaArmour) new OmegaArmourWater(3).setUnlocalizedName("boundBootsWater"); - - boundHelmetEarth = (OmegaArmour) new OmegaArmourEarth(0).setUnlocalizedName("boundHelmetEarth"); - boundPlateEarth = (OmegaArmour) new OmegaArmourEarth(1).setUnlocalizedName("boundPlateEarth"); - boundLeggingsEarth = (OmegaArmour) new OmegaArmourEarth(2).setUnlocalizedName("boundLeggingsEarth"); - boundBootsEarth = (OmegaArmour) new OmegaArmourEarth(3).setUnlocalizedName("boundBootsEarth"); - - boundHelmetWind = (OmegaArmour) new OmegaArmourWind(0).setUnlocalizedName("boundHelmetWind"); - boundPlateWind = (OmegaArmour) new OmegaArmourWind(1).setUnlocalizedName("boundPlateWind"); - boundLeggingsWind = (OmegaArmour) new OmegaArmourWind(2).setUnlocalizedName("boundLeggingsWind"); - boundBootsWind = (OmegaArmour) new OmegaArmourWind(3).setUnlocalizedName("boundBootsWind"); - +// boundHelmetWater = (OmegaArmour) new OmegaArmourWater(0).setUnlocalizedName("boundHelmetWater"); +// boundPlateWater = (OmegaArmour) new OmegaArmourWater(1).setUnlocalizedName("boundPlateWater"); +// boundLeggingsWater = (OmegaArmour) new OmegaArmourWater(2).setUnlocalizedName("boundLeggingsWater"); +// boundBootsWater = (OmegaArmour) new OmegaArmourWater(3).setUnlocalizedName("boundBootsWater"); +// +// boundHelmetEarth = (OmegaArmour) new OmegaArmourEarth(0).setUnlocalizedName("boundHelmetEarth"); +// boundPlateEarth = (OmegaArmour) new OmegaArmourEarth(1).setUnlocalizedName("boundPlateEarth"); +// boundLeggingsEarth = (OmegaArmour) new OmegaArmourEarth(2).setUnlocalizedName("boundLeggingsEarth"); +// boundBootsEarth = (OmegaArmour) new OmegaArmourEarth(3).setUnlocalizedName("boundBootsEarth"); +// +// boundHelmetWind = (OmegaArmour) new OmegaArmourWind(0).setUnlocalizedName("boundHelmetWind"); +// boundPlateWind = (OmegaArmour) new OmegaArmourWind(1).setUnlocalizedName("boundPlateWind"); +// boundLeggingsWind = (OmegaArmour) new OmegaArmourWind(2).setUnlocalizedName("boundLeggingsWind"); +// boundBootsWind = (OmegaArmour) new OmegaArmourWind(3).setUnlocalizedName("boundBootsWind"); +// inputRoutingFocus = new InputRoutingFocus().setUnlocalizedName("inputRoutingFocus"); } @@ -457,20 +454,20 @@ public class ModItems GameRegistry.registerItem(ModItems.itemCompressionSigil, "itemCompressionSigil"); GameRegistry.registerItem(ModItems.itemAssassinSigil, "itemAssassinSigil"); - GameRegistry.registerItem(ModItems.boundHelmetWater, "boundHelmetWater"); - GameRegistry.registerItem(ModItems.boundPlateWater, "boundPlateWater"); - GameRegistry.registerItem(ModItems.boundLeggingsWater, "boundLeggingsWater"); - GameRegistry.registerItem(ModItems.boundBootsWater, "boundBootsWater"); - - GameRegistry.registerItem(ModItems.boundHelmetEarth, "boundHelmetEarth"); - GameRegistry.registerItem(ModItems.boundPlateEarth, "boundPlateEarth"); - GameRegistry.registerItem(ModItems.boundLeggingsEarth, "boundLeggingsEarth"); - GameRegistry.registerItem(ModItems.boundBootsEarth, "boundBootsEarth"); - - GameRegistry.registerItem(ModItems.boundHelmetWind, "boundHelmetWind"); - GameRegistry.registerItem(ModItems.boundPlateWind, "boundPlateWind"); - GameRegistry.registerItem(ModItems.boundLeggingsWind, "boundLeggingsWind"); - GameRegistry.registerItem(ModItems.boundBootsWind, "boundBootsWind"); +// GameRegistry.registerItem(ModItems.boundHelmetWater, "boundHelmetWater"); +// GameRegistry.registerItem(ModItems.boundPlateWater, "boundPlateWater"); +// GameRegistry.registerItem(ModItems.boundLeggingsWater, "boundLeggingsWater"); +// GameRegistry.registerItem(ModItems.boundBootsWater, "boundBootsWater"); +// +// GameRegistry.registerItem(ModItems.boundHelmetEarth, "boundHelmetEarth"); +// GameRegistry.registerItem(ModItems.boundPlateEarth, "boundPlateEarth"); +// GameRegistry.registerItem(ModItems.boundLeggingsEarth, "boundLeggingsEarth"); +// GameRegistry.registerItem(ModItems.boundBootsEarth, "boundBootsEarth"); +// +// GameRegistry.registerItem(ModItems.boundHelmetWind, "boundHelmetWind"); +// GameRegistry.registerItem(ModItems.boundPlateWind, "boundPlateWind"); +// GameRegistry.registerItem(ModItems.boundLeggingsWind, "boundLeggingsWind"); +// GameRegistry.registerItem(ModItems.boundBootsWind, "boundBootsWind"); GameRegistry.registerItem(ModItems.inputRoutingFocus, "inputRoutingFocus"); //GameRegistry.registerItem(ModItems.itemBloodFrame, "itemBloodFrame"); diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java index 36555e38..a78a605d 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectItemRouting.java @@ -5,13 +5,18 @@ import java.util.List; import java.util.Random; import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.common.Int3; +import WayofTime.alchemicalWizardry.common.items.routing.InputRoutingFocus; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; public class RitualEffectItemRouting extends RitualEffect { @@ -43,16 +48,65 @@ public class RitualEffectItemRouting extends RitualEffect { return; } - + IInventory bufferInventory = (IInventory)bufferTile; for(int i=0; i<4; i++) { - Int3 inputChest = this.getInputBufferChestLocation(i); - TileEntity inputFocusInv = world.getTileEntity(x + inputChest.xCoord, y + inputChest.yCoord, z + inputChest.zCoord); + Int3 inputFocusChest = this.getInputBufferChestLocation(i); + TileEntity inputFocusInv = world.getTileEntity(x + inputFocusChest.xCoord, y + inputFocusChest.yCoord, z + inputFocusChest.zCoord); if(inputFocusInv instanceof IInventory) { - + for(int j=0; j<((IInventory) inputFocusInv).getSizeInventory(); j++) + { + ItemStack stack = ((IInventory) inputFocusInv).getStackInSlot(j); + if(stack != null && stack.getItem() instanceof InputRoutingFocus) + { + InputRoutingFocus inputFocus = (InputRoutingFocus)stack.getItem(); + TileEntity inputChest = world.getTileEntity(inputFocus.xCoord(stack), inputFocus.yCoord(stack), inputFocus.zCoord(stack)); + if(inputChest instanceof IInventory) + { + IInventory inputChestInventory = (IInventory)inputChest; + ForgeDirection syphonDirection = inputFocus.getSetDirection(stack); + boolean[] canSyphonList = new boolean[inputChestInventory.getSizeInventory()]; + if(inputChest instanceof ISidedInventory) + { + int[] validSlots = ((ISidedInventory) inputChest).getAccessibleSlotsFromSide(syphonDirection.ordinal()); + for(int in : validSlots) + { + System.out.println("" + in); + canSyphonList[in] = true; + } + }else + { + for(int n=0; n