From 4f9fad22c591ac732c0ff73260e30c92c2bdd52d Mon Sep 17 00:00:00 2001 From: WayofTime Date: Thu, 31 Jul 2014 19:45:40 -0400 Subject: [PATCH] Big commitment~ --- .../AlchemicalWizardry.java | 21 +- .../BloodMagicConfiguration.java | 3 +- .../common/AlchemicalWizardryEventHooks.java | 5 +- .../alchemicalWizardry/common/Int3.java | 6 + .../common/block/SpectralBlock.java | 46 ++- .../demonVillage/BuildingSchematic.java | 58 +++- .../harvest/BloodMagicHarvestHandler.java | 2 + .../harvest/CactusReedHarvestHandler.java | 39 +++ .../common/harvest/GourdHarvestHandler.java | 15 +- .../common/items/BoundArmour.java | 37 ++- .../common/items/SacrificialDagger.java | 8 +- .../common/items/sigil/ItemFluidSigil.java | 216 +++++++++++++- .../common/items/sigil/SigilOfGrowth.java | 10 + .../common/items/sigil/SigilOfTheBridge.java | 36 ++- .../common/potion/PotionSoulFray.java | 18 ++ .../common/rituals/RitualEffectEllipsoid.java | 182 ++++++++++++ .../rituals/RitualEffectEvaporation.java | 266 ++++++++++++++++++ .../common/rituals/RitualEffectGrowth.java | 12 +- .../common/rituals/RitualEffectHarvest.java | 40 ++- .../rituals/RitualEffectSummonPlayer.java | 112 -------- .../rituals/RitualEffectWellOfSuffering.java | 2 +- .../common/tileEntity/TEDemonPortal.java | 80 +++++- .../common/tileEntity/TESpectralBlock.java | 90 ++++++ .../schematics/building/buildings.zip | Bin 766 -> 11314 bytes 24 files changed, 1122 insertions(+), 182 deletions(-) create mode 100644 1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java create mode 100644 1.7.10/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java create mode 100644 1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java create mode 100644 1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java delete mode 100644 1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonPlayer.java create mode 100644 1.7.10/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java index d755db1d..d587a7b1 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/AlchemicalWizardry.java @@ -60,6 +60,7 @@ import WayofTime.alchemicalWizardry.common.entity.mob.EntitySmallEarthGolem; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWaterElemental; import WayofTime.alchemicalWizardry.common.entity.mob.EntityWingedFireDemon; import WayofTime.alchemicalWizardry.common.harvest.BloodMagicHarvestHandler; +import WayofTime.alchemicalWizardry.common.harvest.CactusReedHarvestHandler; import WayofTime.alchemicalWizardry.common.harvest.GourdHarvestHandler; import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner; import WayofTime.alchemicalWizardry.common.items.sigil.SigilOfHolding; @@ -75,11 +76,14 @@ import WayofTime.alchemicalWizardry.common.potion.PotionInhibit; import WayofTime.alchemicalWizardry.common.potion.PotionPlanarBinding; import WayofTime.alchemicalWizardry.common.potion.PotionProjectileProtect; import WayofTime.alchemicalWizardry.common.potion.PotionReciprocation; +import WayofTime.alchemicalWizardry.common.potion.PotionSoulFray; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAnimalGrowth; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectAutoAlchemy; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectBiomeChanger; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectContainment; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectCrushing; +import WayofTime.alchemicalWizardry.common.rituals.RitualEffectEllipsoid; +import WayofTime.alchemicalWizardry.common.rituals.RitualEffectEvaporation; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectExpulsion; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredEarth; import WayofTime.alchemicalWizardry.common.rituals.RitualEffectFeatheredKnife; @@ -122,6 +126,7 @@ import WayofTime.alchemicalWizardry.common.tileEntity.TEPedestal; import WayofTime.alchemicalWizardry.common.tileEntity.TEPlinth; import WayofTime.alchemicalWizardry.common.tileEntity.TESchematicSaver; import WayofTime.alchemicalWizardry.common.tileEntity.TESocket; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEffectBlock; import WayofTime.alchemicalWizardry.common.tileEntity.TESpellEnhancementBlock; @@ -171,6 +176,7 @@ public class AlchemicalWizardry public static Potion customPotionHeavyHeart; public static Potion customPotionFireFuse; public static Potion customPotionPlanarBinding; + public static Potion customPotionSoulFray; public static int customPotionDrowningID; public static int customPotionBoostID; @@ -183,12 +189,13 @@ public class AlchemicalWizardry public static int customPotionHeavyHeartID; public static int customPotionFireFuseID; public static int customPotionPlanarBindingID; + public static int customPotionSoulFrayID; public static boolean isThaumcraftLoaded; public static boolean isForestryLoaded; public static boolean wimpySettings; - public static boolean respawnWithLowerHealth; + public static boolean respawnWithDebuff; public static CreativeTabs tabBloodMagic = new CreativeTabs("tabBloodMagic") { @@ -414,7 +421,7 @@ public class AlchemicalWizardry ItemStack runeOfSelfSacrificeStack = new ItemStack(ModBlocks.runeOfSelfSacrifice); ItemStack miningSigilStackCrafted = new ItemStack(ModItems.sigilOfTheFastMiner); ItemStack divinationSigilStackCrafted = new ItemStack(ModItems.divinationSigil); - ItemStack seerSigilStack = new ItemStack(ModItems.itemSeerSigil); + ItemStack seerSigilStackCrafted = new ItemStack(ModItems.itemSeerSigil); // ItemStack elementalInkWaterStack = new ItemStack(elementalInkWater); // ItemStack elementalInkFireStack = new ItemStack(elementalInkFire); // ItemStack elementalInkEarthStack = new ItemStack(elementalInkEarth); @@ -482,12 +489,14 @@ public class AlchemicalWizardry GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 1), "sbs", "bob", "srs", 's', stoneStack, 'o', magicianBloodOrbStack, 'b', emptyBucketStack, 'r', new ItemStack(ModItems.imbuedSlate))); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 2), "sbs", "bob", "srs", 's', stoneStack, 'o', magicianBloodOrbStack, 'b', waterBucketStack, 'r', new ItemStack(ModItems.imbuedSlate))); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 3), "sws", "ror", "sws", 's', stoneStack, 'o', new ItemStack(ModItems.masterBloodOrb), 'w', weakBloodOrbStack, 'r', new ItemStack(ModItems.demonicSlate))); + GameRegistry.addRecipe(new ShapedBloodOrbRecipe(new ItemStack(ModBlocks.bloodRune, 1, 4), "srs", "beb", "sos", 's', obsidianStack, 'o', new ItemStack(ModItems.masterBloodOrb), 'r', new ItemStack(ModItems.demonicSlate), 'b', emptyBucketStack,'e',new ItemStack(ModBlocks.bloodRune, 1, 1))); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(airSigilStack, "fgf", "fsf", "fof", 'f', featherStack, 'g', ghastTearStack, 's', reinforcedSlateStack, 'o', apprenticeBloodOrbStack)); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(miningSigilStackCrafted, "sps", "hra", "sos", 'o', apprenticeBloodOrbStack, 's', stoneStack, 'p', ironPickaxeStack, 'h', ironShovelStack, 'a', ironAxeStack, 'r', reinforcedSlateStack)); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(runeOfSacrificeStack, "srs", "gog", "srs", 's', stoneStack, 'g', goldIngotStack, 'o', apprenticeBloodOrbStack, 'r', reinforcedSlateStack)); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(runeOfSelfSacrificeStack, "srs", "gog", "srs", 's', stoneStack, 'g', glowstoneDustStack, 'o', apprenticeBloodOrbStack, 'r', reinforcedSlateStack)); GameRegistry.addRecipe(new ShapedBloodOrbRecipe(divinationSigilStackCrafted, "ggg", "gsg", "gog", 'g', glassStack, 's', blankSlateStack, 'o', weakBloodOrbStack)); - GameRegistry.addRecipe(new ShapedBloodOrbRecipe(seerSigilStack, "gbg", "gsg", "gog", 'g', glassStack, 's', divinationSigilStackCrafted, 'o', apprenticeBloodOrbStack,'b', new ItemStack(ModItems.bucketLife))); + GameRegistry.addRecipe(new ShapedBloodOrbRecipe(seerSigilStackCrafted, "gbg", "gsg", "gog", 'g', glassStack, 's', divinationSigilStackCrafted, 'o', apprenticeBloodOrbStack, 'b', new ItemStack(ModItems.bucketLife))); + // GameRegistry.addRecipe(waterScribeToolStack, "f", "i", 'f', featherStack, 'i', elementalInkWaterStack); // GameRegistry.addRecipe(fireScribeToolStack, "f", "i", 'f', featherStack, 'i', elementalInkFireStack); // GameRegistry.addRecipe(earthScribeToolStack, "f", "i", 'f', featherStack, 'i', elementalInkEarthStack); @@ -535,6 +544,7 @@ public class AlchemicalWizardry customPotionHeavyHeart = (new PotionHeavyHeart(customPotionHeavyHeartID,true,0).setIconIndex(0, 0).setPotionName("Heavy Heart")); customPotionFireFuse = (new PotionFireFuse(customPotionFireFuseID,true,0).setIconIndex(0, 0).setPotionName("Fire Fuse")); customPotionPlanarBinding = (new PotionPlanarBinding(customPotionPlanarBindingID,true,0).setIconIndex(0,0).setPotionName("Planar Binding")); + customPotionSoulFray = (new PotionSoulFray(customPotionSoulFrayID,true,0).setIconIndex(0,0).setPotionName("Soul Fray")); ItemStack masterBloodOrbStack = new ItemStack(ModItems.masterBloodOrb); @@ -570,6 +580,7 @@ public class AlchemicalWizardry GameRegistry.registerTileEntity(TESpectralContainer.class,"spectralContainerTileEntity"); GameRegistry.registerTileEntity(TEDemonPortal.class, "containerDemonPortal"); GameRegistry.registerTileEntity(TESchematicSaver.class, "containerSchematicSaver"); + GameRegistry.registerTileEntity(TESpectralBlock.class, "containerSpectralBlock"); //GameRegistry.registerBlock(ModBlocks.blockSpellEffect,"blockSpellEffect"); ModBlocks.bloodRune.setHarvestLevel("pickaxe", 2); ModBlocks.speedRune.setHarvestLevel("pickaxe", 2); @@ -916,6 +927,7 @@ public class AlchemicalWizardry AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.feather), AlchemicalWizardry.customPotionFlight.id, 1 * 60 * 20); AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.arrow), AlchemicalWizardry.customPotionReciprocation.id, 1 * 60 * 20); AlchemicalPotionCreationHandler.addPotion(new ItemStack(Items.ender_pearl),AlchemicalWizardry.customPotionPlanarBinding.id,1*60*20); + AlchemicalPotionCreationHandler.addPotion(new ItemStack(Blocks.soul_sand),AlchemicalWizardry.customPotionSoulFray.id,30*20); } public static void initAltarRecipes() @@ -978,6 +990,8 @@ public class AlchemicalWizardry Rituals.registerRitual("AW023Zephyr", 1, 25000, new RitualEffectItemSuction(),"Call of the Zephyr"); Rituals.registerRitual("AW024Harvest", 1, 20000, new RitualEffectHarvest(), "Reap of the Harvest Moon"); Rituals.registerRitual("AW025Conduit", 2, 2000000, new RitualEffectLifeConduit(), "Cry of the Eternal Soul"); + Rituals.registerRitual("AW026Ellipsoid", 1, 25000, new RitualEffectEllipsoid(), "Ellipsoid"); + Rituals.registerRitual("AW027Evaporation", 1, 1000, new RitualEffectEvaporation(), "Evaporation"); //Rituals.registerRitual(1,100,new RitualEffectApiaryOverclock(),"Apiary Overclock")); } @@ -994,5 +1008,6 @@ public class AlchemicalWizardry { HarvestRegistry.registerHarvestHandler(new BloodMagicHarvestHandler()); HarvestRegistry.registerHarvestHandler(new GourdHarvestHandler()); + HarvestRegistry.registerHarvestHandler(new CactusReedHarvestHandler()); } } diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java index 24c6a94d..f7955d10 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/BloodMagicConfiguration.java @@ -49,6 +49,7 @@ public class BloodMagicConfiguration AlchemicalWizardry.customPotionHeavyHeartID = config.get("Potion ID","HeavyHeart",108).getInt(); AlchemicalWizardry.customPotionFireFuseID = config.get("Potion ID","FireFuse",109).getInt(); AlchemicalWizardry.customPotionPlanarBindingID = config.get("Potion ID","PlanarBinding",110).getInt(); + AlchemicalWizardry.customPotionSoulFrayID = config.get("Potion ID","SoulFray",111).getInt(); MeteorParadigm.maxChance = config.get("meteor", "maxChance", 1000).getInt(); AlchemicalWizardry.doMeteorsDestroyBlocks = config.get("meteor", "doMeteorsDestroyBlocks", true).getBoolean(true); @@ -64,7 +65,7 @@ public class BloodMagicConfiguration AlchemicalWizardry.allowedCrushedOresArray = config.get("oreCrushing", "allowedOres", new String[]{"iron","gold","copper","tin","lead","silver","osmium"}).getStringList(); AlchemicalWizardry.wimpySettings = config.get("WimpySettings","IDontLikeFun",false).getBoolean(false); - AlchemicalWizardry.respawnWithLowerHealth = config.get("WimpySettings", "RespawnWithLowerHealth", true).getBoolean(); + AlchemicalWizardry.respawnWithDebuff = config.get("WimpySettings", "RespawnWithDebuff", true).getBoolean(); } catch (Exception e) { diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java index 1bbbd284..053f2260 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/AlchemicalWizardryEventHooks.java @@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.PlayerCapabilities; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.Vec3; @@ -36,9 +37,9 @@ public class AlchemicalWizardryEventHooks @SubscribeEvent public void onPlayerRespawnEvent(PlayerRespawnEvent event) { - if(AlchemicalWizardry.respawnWithLowerHealth) + if(AlchemicalWizardry.respawnWithDebuff) { - event.player.setHealth(6); + event.player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionSoulFray.id, 20*60*5,0)); } } diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/Int3.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/Int3.java index e1d8d5b4..a345cd05 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/Int3.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/Int3.java @@ -13,4 +13,10 @@ public class Int3 this.yCoord = yCoord; this.zCoord = zCoord; } + + @Override + public boolean equals(Object o) + { + return o instanceof Int3 ? ((Int3)o).xCoord == this.xCoord && ((Int3)o).yCoord == this.yCoord && ((Int3)o).zCoord == this.zCoord : false; + } } diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java index 44b283c0..d3ceb131 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/block/SpectralBlock.java @@ -3,16 +3,22 @@ package WayofTime.alchemicalWizardry.common.block; import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Facing; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class SpectralBlock extends Block +public class SpectralBlock extends BlockContainer { public SpectralBlock() { @@ -26,15 +32,6 @@ public class SpectralBlock extends Block // return 10; // } - /** - * Ticks the block if it's been scheduled - */ - @Override - public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) - { - //if(!par1World.isRemote) - par1World.setBlockToAir(par2, par3, par4); - } @Override @SideOnly(Side.CLIENT) @@ -46,6 +43,7 @@ public class SpectralBlock extends Block @Override public boolean isOpaqueCube() { + Block d; return false; } @@ -54,6 +52,24 @@ public class SpectralBlock extends Block { return 0; } + + @SideOnly(Side.CLIENT) + public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) + { + Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_); + + if (p_149646_1_.getBlockMetadata(p_149646_2_, p_149646_3_, p_149646_4_) != p_149646_1_.getBlockMetadata(p_149646_2_ - Facing.offsetsXForSide[p_149646_5_], p_149646_3_ - Facing.offsetsYForSide[p_149646_5_], p_149646_4_ - Facing.offsetsZForSide[p_149646_5_])) + { + return true; + } + + if (block == this) + { + return false; + } + + return block == this ? false : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_); + } @SideOnly(Side.CLIENT) /** @@ -96,9 +112,9 @@ public class SpectralBlock extends Block return true; } - @Override - public void onBlockAdded(World par1World, int par2, int par3, int par4) - { - par1World.scheduleBlockUpdate(par2, par3, par4, this, 100); - } + @Override + public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) + { + return new TESpectralBlock(); + } } diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java index d9b44222..7eb22ee9 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/demonVillage/BuildingSchematic.java @@ -6,6 +6,7 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.common.Int3; public class BuildingSchematic @@ -84,12 +85,65 @@ public class BuildingSchematic return new Int3(gridX, doorY, gridZ); } + public List getGriddedPositions(ForgeDirection dir) + { + List positionList = new ArrayList(); + + for(BlockSet blockSet : blockList) + { + for(Int3 pos : blockSet.getPositions()) + { + int xOff = pos.xCoord; + int zOff = pos.zCoord; + + switch(dir) + { + case SOUTH: + xOff *= -1; + zOff *= -1; + break; + case WEST: + int temp = zOff; + zOff = xOff * -1; + xOff = temp; + break; + case EAST: + int temp2 = zOff * -1; + zOff = xOff; + xOff = temp2; + break; + default: + } + + Int3 nextPos = new Int3(xOff, 0, zOff); + if(!positionList.contains(nextPos)) + { + positionList.add(nextPos); + } + } + } + + return positionList; + } + public void destroyAllInField(World world, int xCoord, int yCoord, int zCoord, ForgeDirection dir) { - GridSpaceHolder grid = this.createGSH(); + GridSpaceHolder grid = this.createGSH(); //GridSpaceHolder is not aware of the buildings - need to use the schematic + + List positionList = getGriddedPositions(dir); + for(int i=this.getMinY(); i<=this.getMaxY(); i++) { - grid.destroyAllInGridSpaces(world, xCoord, yCoord + i, zCoord, dir); + for(Int3 pos : positionList) + { + Block block = world.getBlock(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); + if(block != ModBlocks.blockDemonPortal) + { + world.setBlockToAir(xCoord + pos.xCoord, yCoord + i, zCoord + pos.zCoord); + } + } + + //grid.destroyAllInGridSpaces(world, xCoord, yCoord + i, zCoord, dir); //Deprecated method } } diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java index 3d02140b..fdf6e3c8 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/BloodMagicHarvestHandler.java @@ -90,6 +90,8 @@ public class BloodMagicHarvestHandler implements IHarvestHandler int plantMeta = seed.getPlantMetadata(world, xCoord, yCoord, zCoord); Block plantBlock = seed.getPlant(world, xCoord, yCoord, zCoord); + world.func_147480_a(xCoord, yCoord, zCoord, false); + world.setBlock(xCoord, yCoord, zCoord, plantBlock, plantMeta, 3); for(ItemStack stack : list) diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java new file mode 100644 index 00000000..e80e3e4f --- /dev/null +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/CactusReedHarvestHandler.java @@ -0,0 +1,39 @@ +package WayofTime.alchemicalWizardry.common.harvest; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.IPlantable; +import WayofTime.alchemicalWizardry.api.harvest.IHarvestHandler; + +public class CactusReedHarvestHandler implements IHarvestHandler +{ + public boolean canHandleBlock(Block block) + { + return block == Blocks.reeds || block == Blocks.cactus; + } + + @Override + public boolean harvestAndPlant(World world, int xCoord, int yCoord, int zCoord, Block block, int meta) + { + if(!this.canHandleBlock(block)) + { + return false; + } + + if(world.getBlock(xCoord, yCoord-1, zCoord) != block || world.getBlock(xCoord, yCoord-2, zCoord) != block) + { + return false; + } + + world.func_147480_a(xCoord, yCoord, zCoord, true); + + return true; + } +} \ No newline at end of file diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java index 74624427..4ea2b7dc 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/harvest/GourdHarvestHandler.java @@ -26,19 +26,8 @@ public class GourdHarvestHandler implements IHarvestHandler { return false; } - - int fortune = 0; - - List list = block.getDrops(world, xCoord, yCoord, zCoord, meta, fortune); - - world.setBlockToAir(xCoord, yCoord, zCoord); - - for(ItemStack stack : list) - { - EntityItem itemEnt = new EntityItem(world, xCoord, yCoord, zCoord, stack); - - world.spawnEntityInWorld(itemEnt); - } + + world.func_147480_a(xCoord, yCoord, zCoord, true); return true; } diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/BoundArmour.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/BoundArmour.java index e756bc86..23f3d126 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/BoundArmour.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/BoundArmour.java @@ -117,12 +117,19 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable ,I return new ArmorProperties(-1, 0, 0); } - if (helmet.getItem().equals(ModItems.boundHelmet) || plate.getItem().equals(ModItems.boundPlate) || leggings.getItem().equals(ModItems.boundLeggings) || boots.getItem().equals(ModItems.boundBoots)) + if (helmet.getItem().equals(ModItems.boundHelmet) && plate.getItem().equals(ModItems.boundPlate) && leggings.getItem().equals(ModItems.boundLeggings) && boots.getItem().equals(ModItems.boundBoots)) { if (source.isUnblockable()) { return new ArmorProperties(-1, 3, 4); } + + if(player.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) + { + int i = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulFray).getAmplifier() + 1; + + return new ArmorProperties(-1, 3, (int)(25*(1.0f - 0.15f*i))); + } return new ArmorProperties(-1, 3, 100000); } @@ -209,7 +216,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable ,I //TODO Make the armour invisible when the player has Invisibility on. if (entity instanceof EntityLivingBase) { - if (((EntityLivingBase) entity).isPotionActive(Potion.invisibility.id)) + if (this.getIsInvisible(stack)) { if (this== ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots) { @@ -265,6 +272,8 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable ,I { tickInternalInventory(itemStack, world, player, 0, false); } + + this.setIsInvisible(itemStack, player.isPotionActive(Potion.invisibility.id)); if (itemStack.getItemDamage() > 0) { @@ -577,6 +586,30 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor,IBindable ,I { return 0; } + + public boolean getIsInvisible(ItemStack armourStack) + { + NBTTagCompound tag = armourStack.getTagCompound(); + if(tag != null) + { + return tag.getBoolean("invisible"); + } + + return false; + } + + public void setIsInvisible(ItemStack armourStack, boolean invisible) + { + NBTTagCompound tag = armourStack.getTagCompound(); + + if(tag == null) + { + armourStack.setTagCompound(new NBTTagCompound()); + tag = armourStack.getTagCompound(); + } + + tag.setBoolean("invisible", invisible); + } @Override @Optional.Method(modid = "Thaumcraft") diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java index 98a41bfd..30b08daf 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/SacrificialDagger.java @@ -82,7 +82,13 @@ public class SacrificialDagger extends Item return par1ItemStack; } - findAndFillAltar(par2World, par3EntityPlayer, 200); + if(par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionSoulFray)) + { + findAndFillAltar(par2World, par3EntityPlayer, 20); + }else + { + findAndFillAltar(par2World, par3EntityPlayer, 200); + } if (par3EntityPlayer.getHealth() <= 0.001f) { diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/ItemFluidSigil.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/ItemFluidSigil.java index fd8931f4..2af9459f 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/ItemFluidSigil.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/ItemFluidSigil.java @@ -1,5 +1,6 @@ package WayofTime.alchemicalWizardry.common.items.sigil; +import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; @@ -21,6 +22,8 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidContainerItem; import net.minecraftforge.fluids.IFluidHandler; import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.common.Int3; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -32,7 +35,8 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem private static final int STATE_PLACE = 2; private static final int STATE_INPUT_TANK = 3; private static final int STATE_DRAIN_TANK = 4; - private static final int maxNumOfStates = 5; + private static final int STATE_BEAST_DRAIN = 5; + private static final int maxNumOfStates = 6; public ItemFluidSigil() { @@ -68,6 +72,9 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem case STATE_DRAIN_TANK: par3List.add("Drain Tank Mode"); break; + case STATE_BEAST_DRAIN: + par3List.add("Beast Mode"); + break; } FluidStack fluid = this.getFluid(par1ItemStack); @@ -118,6 +125,8 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem return this.fillSelectedTank(par1ItemStack, par2World, par3EntityPlayer); case STATE_DRAIN_TANK: return this.drainSelectedTank(par1ItemStack, par2World, par3EntityPlayer); + case STATE_BEAST_DRAIN: + return this.fillItemFromBeastWorld(par1ItemStack, par2World, par3EntityPlayer, true); } return par1ItemStack; @@ -181,11 +190,216 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem case STATE_DRAIN_TANK: cmc.appendText("Now in Drain Tank Mode"); break; + case STATE_BEAST_DRAIN: + cmc.appendText("Now in Beast Mode"); + break; } player.addChatComponentMessage(cmc); } } + public ItemStack fillItemFromBeastWorld(ItemStack container, World world, EntityPlayer player, boolean forceFill) + { + if(world.isRemote) + { + return container; + } + int range = 5; + + float f = 1.0F; + double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double)f; + double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double)f + 1.62D - (double)player.yOffset; + double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double)f; + boolean flag = true; + MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag); + + if (movingobjectposition == null) + { + return container; + } + else + { + if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) + { + int x = movingobjectposition.blockX; + int y = movingobjectposition.blockY; + int z = movingobjectposition.blockZ; + + if (!world.canMineBlock(player, x, y, z)) + { + return container; + } + + if (!player.canPlayerEdit(x, y, z, movingobjectposition.sideHit, container)) + { + return container; + } + + boolean[][][] boolList = new boolean[range * 2 + 1][range * 2 + 1][range * 2 + 1]; + + for (int i = 0; i < 2 * range + 1; i++) + { + for (int j = 0; j < 2 * range + 1; j++) + { + for(int k = 0; k < 2 * range + 1; k++) + { + boolList[i][j][k] = false; + } + } + } + + List positionList = new ArrayList(); + + boolList[range][range][range] = true; + positionList.add(new Int3(range, range, range)); + boolean isReady = false; + + while (!isReady) + { + isReady = true; + + for (int i = 0; i < 2 * range + 1; i++) + { + for (int j = 0; j < 2 * range + 1; j++) + { + for(int k=0; k < 2*range+1;k++) + { + if (boolList[i][j][k]) + { + if (i - 1 >= 0 && !boolList[i - 1][j][k]) + { + Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); + Fluid fluid = FluidRegistry.lookupFluidForBlock(block); + + if (fluid != null) + { + boolList[i - 1][j][k] = true; + positionList.add(new Int3(i-1,j,k)); + isReady = false; + } + } + + if (j - 1 >= 0 && !boolList[i][j - 1][k]) + { + Block block = world.getBlock(x - range + i, y - range + j - 1, z - range + k); + Fluid fluid = FluidRegistry.lookupFluidForBlock(block); + + if (fluid != null) + { + boolList[i][j - 1][k] = true; + positionList.add(new Int3(i,j-1,k)); + isReady = false; + } + } + + if(k - 1 >=0 && !boolList[i][j][k - 1]) + { + Block block = world.getBlock(x - range + i, y - range + j, z - range + k - 1); + Fluid fluid = FluidRegistry.lookupFluidForBlock(block); + + if (fluid != null) + { + boolList[i][j][k - 1] = true; + positionList.add(new Int3(i,j,k-1)); + isReady = false; + } + } + + if (i + 1 <= 2 * range && !boolList[i + 1][j][k]) + { + Block block = world.getBlock(x - range + i + 1, y - range + j, z - range + k); + Fluid fluid = FluidRegistry.lookupFluidForBlock(block); + + if (fluid != null) + { + boolList[i + 1][j][k] = true; + positionList.add(new Int3(i+1,j,k)); + isReady = false; + } + } + + if (j + 1 <= 2 * range && !boolList[i][j + 1][k]) + { + Block block = world.getBlock(x - range + i, y - range + j + 1, z - range + k); + Fluid fluid = FluidRegistry.lookupFluidForBlock(block); + + if (fluid != null) + { + boolList[i][j + 1][k] = true; + positionList.add(new Int3(i,j+1,k)); + isReady = false; + } + } + + if(k + 1 <= 2*range && !boolList[i][j][k+1]) + { + Block block = world.getBlock(x - range + i, y - range + j, z - range + k + 1); + Fluid fluid = FluidRegistry.lookupFluidForBlock(block); + + if (fluid != null) + { + boolList[i][j][k+1] = true; + positionList.add(new Int3(i,j,k+1)); + isReady = false; + } + } + } + } + } + } + } + + for(Int3 pos : positionList) + { + int i = pos.xCoord; + int j = pos.yCoord; + int k = pos.zCoord; + + if(!boolList[i][j][k]) + { + continue; + } + if (world.getBlock(x+i-range, y+j-range, z+k-range) != null && world.getBlock(x+i-range, y+j-range, z+k-range).getMaterial() instanceof MaterialLiquid) + { + //world.setBlockToAir(x+i-range, y+j-range, z+k-range); + Block block = world.getBlock(x+i-range, y+j-range, z+k-range); + if(block == null) + { + continue; + } + Fluid fluid = FluidRegistry.lookupFluidForBlock(block); + + System.out.println("x: " + (i-range) + " y: " + (j-range) + " z: " + (k-range)); + + + if(fluid==null || world.getBlockMetadata(x+i-range, y+j-range, z+k-range) != 0) + { + continue; + } + + + FluidStack fillStack = new FluidStack(fluid,1000); + + int amount = this.fill(container, fillStack, false); + + if((amount > 0 && forceFill) || (amount >=1000 && !forceFill)) + { + //if(!player.capabilities.isCreativeMode) + { + world.setBlockToAir(x+i-range, y+j-range, z+k-range); + + } + + this.fill(container, new FluidStack(fluid,1000), true); + } + } + } + } + + return container; + } + } + public ItemStack fillItemFromWorld(ItemStack container, World world, EntityPlayer player, boolean forceFill) { float f = 1.0F; diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java index 710b3315..92963f18 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfGrowth.java @@ -131,6 +131,11 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer); + + if(par2World.isRemote) + { + return par1ItemStack; + } if (par3EntityPlayer.isSneaking()) { @@ -259,6 +264,11 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade @Override public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) { + if(world.isRemote) + { + return; + } + int range = 5; int verticalRange = 2; int posX = (int) Math.round(player.posX - 0.5f); diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java index a4575728..424b4904 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfTheBridge.java @@ -2,20 +2,20 @@ package WayofTime.alchemicalWizardry.common.items.sigil; import java.util.List; -import javax.swing.Icon; - import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; import WayofTime.alchemicalWizardry.AlchemicalWizardry; import WayofTime.alchemicalWizardry.ModBlocks; import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -205,16 +205,28 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade //for(int iy=posY-verticalRange;iy<=posY+verticalRange;iy++) { Block block = par2World.getBlock(ix, posY + verticalOffset, iz); - - + if (par2World.isAirBlock(ix, posY + verticalOffset, iz)) { par2World.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3); + + TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz); + if(tile instanceof TESpectralBlock) + { + ((TESpectralBlock) tile).setDuration(100); + } if (par2World.rand.nextInt(2) == 0) { incremented++; } + }else if(block == ModBlocks.spectralBlock) + { + TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz); + if(tile instanceof TESpectralBlock) + { + ((TESpectralBlock) tile).setDuration(100); + } } } } @@ -284,12 +296,24 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade { //for(int iy=posY-verticalRange;iy<=posY+verticalRange;iy++) { - Block block = world.getBlock(ix, posY + verticalOffset, iz); + Block block = world.getBlock(ix, posY + verticalOffset, iz); - if (world.isAirBlock(ix, posY + verticalOffset, iz)) { world.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3); + + TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz); + if(tile instanceof TESpectralBlock) + { + ((TESpectralBlock) tile).setDuration(100); + } + }else if(block == ModBlocks.spectralBlock) + { + TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz); + if(tile instanceof TESpectralBlock) + { + ((TESpectralBlock) tile).setDuration(100); + } } } } diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java new file mode 100644 index 00000000..78febaff --- /dev/null +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/potion/PotionSoulFray.java @@ -0,0 +1,18 @@ +package WayofTime.alchemicalWizardry.common.potion; + +import net.minecraft.potion.Potion; + +public class PotionSoulFray extends Potion +{ + public PotionSoulFray(int par1, boolean par2, int par3) + { + super(par1, par2, par3); + } + + @Override + public Potion setIconIndex(int par1, int par2) + { + super.setIconIndex(par1, par2); + return this; + } +} diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java new file mode 100644 index 00000000..29cb11f4 --- /dev/null +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEllipsoid.java @@ -0,0 +1,182 @@ +package WayofTime.alchemicalWizardry.common.rituals; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; + +public class RitualEffectEllipsoid extends RitualEffect +{ + @Override + public void performEffect(IMasterRitualStone ritualStone) + { + String owner = ritualStone.getOwner(); + World worldSave = MinecraftServer.getServer().worldServers[0]; + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); + + if (data == null) + { + data = new LifeEssenceNetwork(owner); + worldSave.setItemData(owner, data); + } + + int currentEssence = data.currentEssence; + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); + + TileEntity tile = world.getTileEntity(x, y+1, z); + + + if(((IInventory) tile).getSizeInventory() < 3) + { + return; + } + + + if(!(tile instanceof IInventory) || ((IInventory)tile).getSizeInventory() < 3) + { + return; + } + + ItemStack item1 = ((IInventory) tile).getStackInSlot(0); + ItemStack item2 = ((IInventory) tile).getStackInSlot(1); + ItemStack item3 = ((IInventory) tile).getStackInSlot(2); + + int xSize = item1 == null ? 0 : item1.stackSize; + int ySize = item2 == null ? 0 : item2.stackSize; + int zSize = item3 == null ? 0 : item3.stackSize; + + int cost = (int)Math.pow((xSize+1)*(ySize+1)*(zSize+1),0.333); + + if (currentEssence < cost) + { + EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); + + if (entityOwner == null) + { + return; + } + + entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); + } else + { + //if(tile instanceof IInventory) + { + int refresh = 1000; + + int j = (int)(world.getWorldTime()%(ySize*2+1)) - ySize; + + for (int i = -xSize; i <= xSize; i++) + { +// for (int j = -ySize; j <= ySize; j++) + { + for(int k = -zSize; k <= zSize; k++) + { + if (Math.pow(i*(ySize - 0.50f)*(zSize - 0.50f),2) + Math.pow(j*(xSize - 0.50f)*(zSize - 0.50f),2) + Math.pow(k*(xSize - 0.50f)*(ySize - 0.50f),2) <= Math.pow((xSize - 1 + 0.50f)*(ySize - 1 + 0.50f)*(zSize - 1 + 0.50f), 2)) + { + continue; + } + + if (Math.pow(i*(ySize + 0.50f)*(zSize + 0.50f),2) + Math.pow(j*(xSize + 0.50f)*(zSize + 0.50f),2) + Math.pow(k*(xSize + 0.50f)*(ySize + 0.50f),2) >= Math.pow((xSize + 0.50f)*(ySize + 0.50f)*(zSize + 0.50f), 2)) + { + continue; + } + + Block block = world.getBlock(x+i, y+j, z+k); + + if(block.isAir(world, x+i, y+j, z+k)) + { + //world.setBlock(x+i, y+j, z+k, Blocks.stone); + TESpectralBlock.createSpectralBlockAtLocation(world, x+i, y+j, z+k, refresh); + } + else + { + TileEntity tile1 = world.getTileEntity(x+i, y+j, z+k); + if(tile instanceof TESpectralBlock) + { + ((TESpectralBlock) tile1).resetDuration(refresh); + } + } + } + } + } + } + + data.currentEssence = currentEssence - cost; + data.markDirty(); + } + } + + @Override + public int getCostPerRefresh() + { + return 0; + } + + @Override + public List getRitualComponentList() + { + ArrayList ellipsoidRitual = new ArrayList(); + + ellipsoidRitual.add(new RitualComponent(-1,0,-1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-1,0,1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(1,0,-1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(1,0,1,RitualComponent.DUSK)); + + ellipsoidRitual.add(new RitualComponent(4,0,0,RitualComponent.FIRE)); + ellipsoidRitual.add(new RitualComponent(5,0,0,RitualComponent.FIRE)); + ellipsoidRitual.add(new RitualComponent(5,0,-1,RitualComponent.FIRE)); + ellipsoidRitual.add(new RitualComponent(5,0,-2,RitualComponent.FIRE)); + ellipsoidRitual.add(new RitualComponent(-4,0,0,RitualComponent.FIRE)); + ellipsoidRitual.add(new RitualComponent(-5,0,0,RitualComponent.FIRE)); + ellipsoidRitual.add(new RitualComponent(-5,0,1,RitualComponent.FIRE)); + ellipsoidRitual.add(new RitualComponent(-5,0,2,RitualComponent.FIRE)); + + ellipsoidRitual.add(new RitualComponent(0,0,4,RitualComponent.AIR)); + ellipsoidRitual.add(new RitualComponent(0,0,5,RitualComponent.AIR)); + ellipsoidRitual.add(new RitualComponent(1,0,5,RitualComponent.AIR)); + ellipsoidRitual.add(new RitualComponent(2,0,5,RitualComponent.AIR)); + ellipsoidRitual.add(new RitualComponent(0,0,-4,RitualComponent.AIR)); + ellipsoidRitual.add(new RitualComponent(0,0,-5,RitualComponent.AIR)); + ellipsoidRitual.add(new RitualComponent(-1,0,-5,RitualComponent.AIR)); + ellipsoidRitual.add(new RitualComponent(-2,0,-5,RitualComponent.AIR)); + + ellipsoidRitual.add(new RitualComponent(3,0,1,RitualComponent.EARTH)); + ellipsoidRitual.add(new RitualComponent(3,0,2,RitualComponent.EARTH)); + ellipsoidRitual.add(new RitualComponent(3,0,3,RitualComponent.EARTH)); + ellipsoidRitual.add(new RitualComponent(2,0,3,RitualComponent.EARTH)); + ellipsoidRitual.add(new RitualComponent(-3,0,-1,RitualComponent.EARTH)); + ellipsoidRitual.add(new RitualComponent(-3,0,-2,RitualComponent.EARTH)); + ellipsoidRitual.add(new RitualComponent(-3,0,-3,RitualComponent.EARTH)); + ellipsoidRitual.add(new RitualComponent(-2,0,-3,RitualComponent.EARTH)); + + ellipsoidRitual.add(new RitualComponent(1,0,-3,RitualComponent.WATER)); + ellipsoidRitual.add(new RitualComponent(2,0,-3,RitualComponent.WATER)); + ellipsoidRitual.add(new RitualComponent(3,0,-3,RitualComponent.WATER)); + ellipsoidRitual.add(new RitualComponent(3,0,-2,RitualComponent.WATER)); + ellipsoidRitual.add(new RitualComponent(-1,0,3,RitualComponent.WATER)); + ellipsoidRitual.add(new RitualComponent(-2,0,3,RitualComponent.WATER)); + ellipsoidRitual.add(new RitualComponent(-3,0,3,RitualComponent.WATER)); + ellipsoidRitual.add(new RitualComponent(-3,0,2,RitualComponent.WATER)); + + return ellipsoidRitual; + } +} diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java new file mode 100644 index 00000000..fd3ac7f7 --- /dev/null +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectEvaporation.java @@ -0,0 +1,266 @@ +package WayofTime.alchemicalWizardry.common.rituals; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.block.material.MaterialLiquid; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.server.MinecraftServer; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; +import WayofTime.alchemicalWizardry.ModBlocks; +import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; +import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; +import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; +import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; +import WayofTime.alchemicalWizardry.common.Int3; +import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock; +import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer; + +public class RitualEffectEvaporation extends RitualEffect +{ + @Override + public void performEffect(IMasterRitualStone ritualStone) + { + String owner = ritualStone.getOwner(); + World worldSave = MinecraftServer.getServer().worldServers[0]; + LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); + + if (data == null) + { + data = new LifeEssenceNetwork(owner); + worldSave.setItemData(owner, data); + } + + int currentEssence = data.currentEssence; + World world = ritualStone.getWorld(); + int x = ritualStone.getXCoord(); + int y = ritualStone.getYCoord(); + int z = ritualStone.getZCoord(); + + if (currentEssence < 0) + { + EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); + + if (entityOwner == null) + { + return; + } + + entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); + } else + { + Block block1 = world.getBlock(x, y-1, z); + int range = this.getRadiusForModifierBlock(block1); + + boolean[][][] boolList = new boolean[range * 2 + 1][range * 2 + 1][range * 2 + 1]; + + for (int i = 0; i < 2 * range + 1; i++) + { + for (int j = 0; j < 2 * range + 1; j++) + { + for(int k = 0; k < 2 * range + 1; k++) + { + boolList[i][j][k] = false; + } + } + } + + boolList[range][range][range] = true; + boolean isReady = false; + + while (!isReady) + { + isReady = true; + + for (int i = 0; i < 2 * range + 1; i++) + { + for (int j = 0; j < 2 * range + 1; j++) + { + for(int k=0; k<2*range+1;k++) + { + if (boolList[i][j][k]) + { + if (i - 1 >= 0 && !boolList[i - 1][j][k]) + { + Block block = world.getBlock(x - range + i - 1, y - range + j, z - range + k); + if(world.isAirBlock(x - range + i - 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + boolList[i - 1][j][k] = true; + isReady = false; + } + } + + if (j - 1 >= 0 && !boolList[i][j - 1][k]) + { + Block block = world.getBlock(x - range + i, y - range + j - 1, z - range + k); + if(world.isAirBlock(x - range + i, y - range + j - 1, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + boolList[i][j - 1][k] = true; + isReady = false; + } + } + + if(k - 1 >=0 && !boolList[i][j][k - 1]) + { + Block block = world.getBlock(x - range + i, y - range + j, z - range + k - 1); + if(world.isAirBlock(x - range + i, y - range + j, z - range + k - 1) || block == ModBlocks.blockSpectralContainer) + { + boolList[i][j][k - 1] = true; + isReady = false; + } + } + + if (i + 1 <= 2 * range && !boolList[i + 1][j][k]) + { + Block block = world.getBlock(x - range + i + 1, y - range + j, z - range + k); + if(world.isAirBlock(x - range + i + 1, y - range + j, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + boolList[i + 1][j][k] = true; + isReady = false; + } + } + + if (j + 1 <= 2 * range && !boolList[i][j + 1][k]) + { + Block block = world.getBlock(x - range + i, y - range + j + 1, z - range + k); + if(world.isAirBlock(x - range + i, y - range + j + 1, z - range + k) || block == ModBlocks.blockSpectralContainer) + { + boolList[i][j + 1][k] = true; + isReady = false; + } + } + + if(k + 1 <= 2*range && !boolList[i][j][k+1]) + { + Block block = world.getBlock(x - range + i, y - range + j, z - range + k + 1); + if(world.isAirBlock(x - range + i, y - range + j, z - range + k + 1) || block == ModBlocks.blockSpectralContainer) + { + boolList[i][j][k+1] = true; + isReady = false; + } + } + } + } + } + } + } + + for (int i = 0; i < 2 * range + 1; i++) + { + for (int j = 0; j < 2 * range + 1; j++) + { + for(int k=0; k<2*range+1;k++) + { + if(!boolList[i][j][k]) + { + continue; + } + + Block block = world.getBlock(x+i-range, y+j-range, z+k-range); + + if(block == ModBlocks.blockSpectralContainer) + { + world.setBlockToAir(x+i-range, y+j-range, z+k-range); + } + } + } + } + + data.currentEssence = currentEssence - this.getCostPerRefresh(); + data.markDirty(); + + ritualStone.setActive(false); + } + } + + @Override + public int getCostPerRefresh() + { + return 0; + } + + @Override + public List getRitualComponentList() + { + ArrayList ellipsoidRitual = new ArrayList(); + + ellipsoidRitual.add(new RitualComponent(-1,0,-1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-1,0,1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(1,0,-1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(1,0,1,RitualComponent.DUSK)); + + ellipsoidRitual.add(new RitualComponent(4,0,0,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(5,0,0,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(5,0,-1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(5,0,-2,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-4,0,0,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-5,0,0,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-5,0,1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-5,0,2,RitualComponent.DUSK)); + + ellipsoidRitual.add(new RitualComponent(0,0,4,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(0,0,5,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(1,0,5,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(2,0,5,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(0,0,-4,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(0,0,-5,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-1,0,-5,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-2,0,-5,RitualComponent.DUSK)); + + ellipsoidRitual.add(new RitualComponent(3,0,1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(3,0,2,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(3,0,3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(2,0,3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-3,0,-1,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-3,0,-2,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-3,0,-3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-2,0,-3,RitualComponent.DUSK)); + + ellipsoidRitual.add(new RitualComponent(1,0,-3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(2,0,-3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(3,0,-3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(3,0,-2,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-1,0,3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-2,0,3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-3,0,3,RitualComponent.DUSK)); + ellipsoidRitual.add(new RitualComponent(-3,0,2,RitualComponent.DUSK)); + + return ellipsoidRitual; + } + + public int getRadiusForModifierBlock(Block block) + { + if(block == null) + { + return 10; + } + + if(block == Blocks.diamond_block) + { + return 30; + } + + if(block == Blocks.gold_block) + { + return 20; + } + + if(block == Blocks.iron_block) + { + return 15; + } + + return 10; + } +} diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java index d0945428..6749f15c 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectGrowth.java @@ -37,7 +37,7 @@ public class RitualEffectGrowth extends RitualEffect int y = ritualStone.getYCoord(); int z = ritualStone.getZCoord(); - if (currentEssence < this.getCostPerRefresh()) + if (currentEssence < this.getCostPerRefresh()*9) { EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); @@ -54,7 +54,7 @@ public class RitualEffectGrowth extends RitualEffect return; } - boolean flag = false; + int flag = 0; for (int i = -1; i <= 1; i++) { @@ -67,15 +67,15 @@ public class RitualEffectGrowth extends RitualEffect { SpellHelper.sendIndexedParticleToAllAround(world, x, y, z, 20, world.provider.dimensionId, 3, x, y, z); block.updateTick(world, x + i, y + 2, z + j, world.rand); - flag = true; + flag++; } } } } - if (flag) + if (flag > 0) { - data.currentEssence = currentEssence - this.getCostPerRefresh(); + data.currentEssence = currentEssence - this.getCostPerRefresh()*flag; data.markDirty(); } } @@ -84,7 +84,7 @@ public class RitualEffectGrowth extends RitualEffect @Override public int getCostPerRefresh() { - return 100; + return 20; } @Override diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java index e971c137..4882a6e5 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectHarvest.java @@ -5,6 +5,7 @@ import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; @@ -37,7 +38,7 @@ public class RitualEffectHarvest extends RitualEffect int x = ritualStone.getXCoord(); int y = ritualStone.getYCoord(); int z = ritualStone.getZCoord(); - int maxCount = 9; + int maxCount = 100; if (currentEssence < this.getCostPerRefresh() * maxCount) { @@ -51,21 +52,23 @@ public class RitualEffectHarvest extends RitualEffect entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); } else { - if (world.getWorldTime() % 20 != 0) + if (world.getWorldTime() % 5 != 0) { return; } - + + Block block = world.getBlock(x, y-1, z); int flag = 0; - int range = 4; + int range = this.getRadiusForModifierBlock(block); + int vertRange = 4; for (int i = -range; i <= range; i++) { - for (int j = -range; j <= range; j++) + for (int j = -vertRange; j <= vertRange; j++) { for(int k = -range; k<=range; k++) { - if(HarvestRegistry.harvestBlock(world, x + i, y + j, z + k)) + if(HarvestRegistry.harvestBlock(world, x + i, y + j, z + k) && flag < maxCount) { flag++; } @@ -87,6 +90,31 @@ public class RitualEffectHarvest extends RitualEffect return 20; } + public int getRadiusForModifierBlock(Block block) + { + if(block == null) + { + return 4; + } + + if(block == Blocks.diamond_block) + { + return 15; + } + + if(block == Blocks.gold_block) + { + return 10; + } + + if(block == Blocks.iron_block) + { + return 6; + } + + return 4; + } + @Override public List getRitualComponentList() { diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonPlayer.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonPlayer.java deleted file mode 100644 index 556f3295..00000000 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectSummonPlayer.java +++ /dev/null @@ -1,112 +0,0 @@ -package WayofTime.alchemicalWizardry.common.rituals; - -import java.util.List; - -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.potion.Potion; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.world.World; -import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable; -import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone; -import WayofTime.alchemicalWizardry.api.rituals.RitualComponent; -import WayofTime.alchemicalWizardry.api.rituals.RitualEffect; -import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; - -public class RitualEffectSummonPlayer extends RitualEffect //Summons a player via the bound item -{ - @Override - public void performEffect(IMasterRitualStone ritualStone) - { - String owner = ritualStone.getOwner(); - World worldSave = MinecraftServer.getServer().worldServers[0]; - LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner); - - if (data == null) - { - data = new LifeEssenceNetwork(owner); - worldSave.setItemData(owner, data); - } - - int currentEssence = data.currentEssence; - World world = ritualStone.getWorld(); - int x = ritualStone.getXCoord(); - int y = ritualStone.getYCoord(); - int z = ritualStone.getZCoord(); - - if (ritualStone.getCooldown() > 0) - { - ritualStone.setCooldown(0); - } - - if (currentEssence < this.getCostPerRefresh()) - { - EntityPlayer entityOwner = SpellHelper.getPlayerForUsername(owner); - - if (entityOwner == null) - { - return; - } - - entityOwner.addPotionEffect(new PotionEffect(Potion.confusion.id, 80)); - } else - { - List entities = world.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x, y + 1, z, x + 1, y + 2, z + 1)); - - if (entities == null) - { - return; - } - - for (EntityItem entityItem : entities) - { - if (entityItem != null && entityItem.getEntityItem().getItem() instanceof IBindable) - { - String str = EnergyItems.getOwnerName(entityItem.getEntityItem()); - - EntityPlayer entityPlayer = SpellHelper.getPlayerForUsername(str); - if(entityPlayer!=null) - { - entityPlayer.posX = x; - entityPlayer.posY = y+1; - entityPlayer.posZ = z; - - if(entityPlayer instanceof EntityPlayerMP) - { - ((EntityPlayerMP)entityPlayer).mcServer.getConfigurationManager().transferPlayerToDimension(((EntityPlayerMP)entityPlayer), 0); - } - - entityItem.setDead(); - - data.currentEssence = currentEssence - this.getCostPerRefresh(); - data.markDirty(); - } - break; - } - } - -// EnergyBlastProjectile proj = new EnergyBlastProjectile(world, x, y+20, z); -// proj.motionX = 0.0d; -// proj.motionZ = 0.0d; -// proj.motionY = -1.0d; -// world.spawnEntityInWorld(proj); - } - } - - @Override - public int getCostPerRefresh() - { - return 0; - } - - @Override - public List getRitualComponentList() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java index 1cf3a37e..bc253a23 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/rituals/RitualEffectWellOfSuffering.java @@ -77,7 +77,7 @@ public class RitualEffectWellOfSuffering extends RitualEffect //tileAltar = (TEAltar)world.getBlockTileEntity(x,y-1,z); int d0 = 10; - int vertRange = 5; + int vertRange = 10; AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) x, (double) y, (double) z, (double) (x + 1), (double) (y + 1), (double) (z + 1)).expand(d0, vertRange, d0); List list = world.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); Iterator iterator1 = list.iterator(); diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEDemonPortal.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEDemonPortal.java index 9b6f08d6..4028a281 100644 --- a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEDemonPortal.java +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEDemonPortal.java @@ -39,6 +39,8 @@ public class TEDemonPortal extends TileEntity public static int buildingGridDelay = 25; public static int roadGridDelay = 10; + public static int[] tierCostList = new int[]{1000,50000}; //Cost to get to NEXT tier + public static List buildingList = new ArrayList(); public Random rand = new Random(); private GridSpace[][] area; @@ -55,6 +57,9 @@ public class TEDemonPortal extends TileEntity public int tier; //Tier of the demon portal - Should select buildings 2 below to this public int totalPoints; + public int yLevelDestination; + public boolean hasLocationChanged; + public TEDemonPortal() { super(); @@ -82,6 +87,10 @@ public class TEDemonPortal extends TileEntity this.houseCooldown = 0; this.roadCooldown = 0; + this.tier = 0; + + this.yLevelDestination = 0; + this.hasLocationChanged = false; } public void initialize() @@ -122,12 +131,24 @@ public class TEDemonPortal extends TileEntity return; } + if(this.hasLocationChanged) + { + if(this.changePortalLocation()) + { + return; + }else + { + this.hasLocationChanged = false; + } + } + if(this.roadCooldown <= 0) { int roadsMade = this.createRandomRoad(); if(roadsMade > 0) { this.roadCooldown = TEDemonPortal.roadGridDelay * roadsMade; + this.totalPoints += this.roadCooldown; } } else if(this.houseCooldown <= 0) @@ -136,10 +157,20 @@ public class TEDemonPortal extends TileEntity if(gridsUsed > 0) { this.houseCooldown = TEDemonPortal.buildingGridDelay * gridsUsed; + this.totalPoints += this.houseCooldown; } } - this.houseCooldown = Math.max(0, this.houseCooldown - 1); + if(this.tier < this.tierCostList.length && this.totalPoints > this.tierCostList[this.tier]) + { + this.tier++; + + if(this.createRandomBuilding(DemonBuilding.BUILDING_PORTAL, tier+1) >= 1) + { + } + } + + this.houseCooldown = Math.max(0, this.houseCooldown - 1); //Current dummy implementation of the increasing costs this.roadCooldown = Math.max(0, this.roadCooldown - 1); } @@ -175,6 +206,8 @@ public class TEDemonPortal extends TileEntity this.tier = par1NBTTagCompound.getInteger("tier"); this.totalPoints = par1NBTTagCompound.getInteger("totalPoints"); + this.yLevelDestination = par1NBTTagCompound.getInteger("yLevelDestination"); + this.hasLocationChanged = par1NBTTagCompound.getBoolean("hasLocationChanged"); } @Override @@ -213,9 +246,11 @@ public class TEDemonPortal extends TileEntity par1NBTTagCompound.setTag("Grid", gridList); - par1NBTTagCompound.setBoolean("init", isInitialized); + par1NBTTagCompound.setBoolean("init", this.isInitialized); par1NBTTagCompound.setInteger("tier", this.tier); par1NBTTagCompound.setInteger("totalPoints", this.totalPoints); + par1NBTTagCompound.setInteger("yLevelDestination", this.yLevelDestination); + par1NBTTagCompound.setBoolean("hasLocationChanged", this.hasLocationChanged); } public int createRandomRoad() //Return the number of road spaces @@ -870,15 +905,17 @@ public class TEDemonPortal extends TileEntity Int3 portalSpace = build.getDoorSpace(chosenDirection); int yOffset = portalSpace.yCoord; - for(int i=0; i<256; i++) - { - Block block = worldObj.getBlock(xCoord + (x)*5, i, zCoord + (z)*5); - if(block == ModBlocks.blockDemonPortal) - { - BlockTeleposer.swapBlocks(worldObj, worldObj, xCoord, i, zCoord, xCoord, yLevel + yOffset, zCoord); - break; - } - } + //TODO + +// for(int i=0; i<256; i++) +// { +// Block block = worldObj.getBlock(xCoord + (x)*5, i, zCoord + (z)*5); +// if(block == ModBlocks.blockDemonPortal) +// { +// BlockTeleposer.swapBlocks(worldObj, worldObj, xCoord, i, zCoord, xCoord, yLevel + yOffset, zCoord); +// break; +// } +// } build.buildAll(worldObj, xCoord + (x)*5, yLevel, zCoord + (z)*5, chosenDirection.getOpposite()); build.setAllGridSpaces(x, z, yLevel, chosenDirection.getOpposite(), GridSpace.MAIN_PORTAL, grid); @@ -1198,4 +1235,25 @@ public class TEDemonPortal extends TileEntity { this.totalPoints += addition; } + + public void setPortalDestination(int yLevel) + { + if(yLevel != this.yCoord) + { + this.hasLocationChanged = true; + this.yLevelDestination = yLevel; + } + } + + public boolean changePortalLocation() + { + if(yLevelDestination == yCoord) + { + return false; + } + + BlockTeleposer.swapBlocks(worldObj, worldObj, xCoord, yCoord, zCoord, xCoord, yLevelDestination, zCoord); + + return true; + } } diff --git a/1.7.10/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java new file mode 100644 index 00000000..bf182598 --- /dev/null +++ b/1.7.10/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TESpectralBlock.java @@ -0,0 +1,90 @@ +package WayofTime.alchemicalWizardry.common.tileEntity; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import net.minecraftforge.common.util.Constants; +import net.minecraftforge.fluids.IFluidBlock; +import WayofTime.alchemicalWizardry.ModBlocks; + +public class TESpectralBlock extends TileEntity +{ + private int ticksRemaining; + + public TESpectralBlock() + { + ticksRemaining = 0; + } + + @Override + public void readFromNBT(NBTTagCompound par1NBTTagCompound) + { + super.readFromNBT(par1NBTTagCompound); + + ticksRemaining = par1NBTTagCompound.getInteger("ticksRemaining"); + } + + @Override + public void writeToNBT(NBTTagCompound par1NBTTagCompound) + { + super.writeToNBT(par1NBTTagCompound); + + par1NBTTagCompound.setInteger("ticksRemaining", ticksRemaining); + } + + @Override + public void updateEntity() + { + super.updateEntity(); + + if(worldObj.isRemote) + { + return; + } + + this.ticksRemaining--; + + if(this.ticksRemaining<=0) + { + worldObj.setBlockToAir(xCoord, yCoord, zCoord); + } + } + + public static boolean createSpectralBlockAtLocation(World world, int x, int y, int z, int duration) + { + if(!world.isAirBlock(x, y, z)) + { + return false; + } + + //if(world.getTileEntity(x, y, z)==null) + { + world.setBlock(x, y, z, ModBlocks.spectralBlock); + TileEntity tile = world.getTileEntity(x, y, z); + if(tile instanceof TESpectralBlock) + { + ((TESpectralBlock) tile).setDuration(duration); + return true; + } + } + + return false; + } + + public void setDuration(int dur) + { + this.ticksRemaining = dur; + } + + public void resetDuration(int dur) + { + if(this.ticksRemaining!s=64EIm z((sPQ=l6a5zVGwfANScg_w~8Xb*^*8iCa$#NI(Yw0Ehu$I{PY(N0#-1)6U)5X=Fy**>sFLVmCl8ti1-P5vaA074PUxf~pN+GmEYcV2h&D z5R0^5YFhUWR2%Rr{2z(KgQQUvWJs_Z|#9TI?z5 z&e45TIxuh{a9XKQF>hW`Jx$VR`c5maOSzK@Tgr84cz%7=ssf=IKr|6}}(tQzI zE{8p17t(=lvz=4w&J+V9b|OwaBW`*SS_x!C=FS|yNuv6CYo z3`yBFDzCtS9SY;PP2 zxOt~E+CPbX)V5^oY^jXpF&I~KnKSgHK{_?^`g|)Z`+|C_vJw935XM;?Qt5>h;;(naaE8r0HmZXdfsM?2Arq zMj=ZLrZ`Uww)utY*7M22YNd=j#3+hdDd;9VjzC{pf*l#wRUGtD5mXb4x`c?)3`wAK zYlWs`kzgCf8UqP*u*ZK7A_fVzV`LMe5H5CHtgTQF^AKe3h@<;aKB)n+Wn*oSwPQMG+i3b?Lp6&XL1*WA`9*8WIdjl>O6O`X9rV^U2c z6rb3ZgIx^|$61$jvY7J=m+Wmv;px1qg-B{4sbO4$m=gPa8VyEjAs&)yyZ|$_5?h|= zs=6lfJ;hpPCRxN#gc32DHl$_Sn~=t16mEq5shA=U&q62Vc_o zUDD8MGicimMJ0irFbzveUZKdN3|m*UWn(^D$FpQ(QrZs|MU}XlEfu9Ea$d<+ zkWi0d`a1F7NcSl27>I>hAx@U(kl}({cek5NN-U%z?1drV*(l||B?^lgW_@#m{53!m zDgN;;Lvt48@SJR<-aw7yl~psZ#d}iX6z<*1#XcYKLxz=PLit5rg=OAc{f}&hw{W6h zXIGSQvIKHMqeNdR%3LQ8Cw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