diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java index 187ebdd0..a06b451e 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/block/BloodRune.java @@ -21,6 +21,7 @@ public class BloodRune extends Block private IIcon dislocationRuneIcon; private IIcon orbCapacityRuneIcon; private IIcon betterCapacityRuneIcon; + private IIcon accelerationRuneIcon; public BloodRune() { @@ -40,6 +41,7 @@ public class BloodRune extends Block this.dislocationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:DislocationRune"); this.orbCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:OrbCapacityRune"); this.betterCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:BetterCapacityRune"); + this.accelerationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:AccelerationRune"); } public int getRuneEffect(int metaData) @@ -60,6 +62,9 @@ public class BloodRune extends Block case 4: //Better Capacity rune return 8; + + case 5: //Acceleration rune + return 9; } return 0; @@ -79,6 +84,7 @@ public class BloodRune extends Block par3List.add(new ItemStack(par1, 1, 2)); par3List.add(new ItemStack(par1, 1, 3)); par3List.add(new ItemStack(par1, 1, 4)); + par3List.add(new ItemStack(par1, 1, 5)); } else { super.getSubBlocks(par1, par2CreativeTabs, par3List); @@ -106,6 +112,8 @@ public class BloodRune extends Block case 4: return this.betterCapacityRuneIcon; + case 5: + return this.accelerationRuneIcon; default: return blockIcon; } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java index c985fc49..9bf8496f 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/AltarUpgradeComponent.java @@ -10,6 +10,7 @@ public class AltarUpgradeComponent private int altarCapacitiveUpgrades; private int orbCapacitiveUpgrades; private int betterCapacitiveUpgrades; + private int accelerationUpgrades; public AltarUpgradeComponent() { @@ -21,6 +22,7 @@ public class AltarUpgradeComponent altarCapacitiveUpgrades = 0; orbCapacitiveUpgrades = 0; betterCapacitiveUpgrades = 0; + accelerationUpgrades = 0; } public void addSpeedUpgrade() @@ -62,6 +64,11 @@ public class AltarUpgradeComponent { betterCapacitiveUpgrades++; } + + public void addAccelerationUpgrade() + { + accelerationUpgrades++; + } public int getSpeedUpgrades() { @@ -102,4 +109,9 @@ public class AltarUpgradeComponent { return this.betterCapacitiveUpgrades; } + + public int getAccelerationUpgrades() + { + return this.accelerationUpgrades; + } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java index 5ee7d564..43926eb2 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/bloodAltarUpgrade/UpgradedAltars.java @@ -192,6 +192,10 @@ public class UpgradedAltars case 8: upgrades.addBetterCapacitiveUpgrade(); break; + + case 9: + upgrades.addAccelerationUpgrade(); + break; } } } diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java index 467b4651..8f8a8fd5 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/ItemBloodRuneBlock.java @@ -44,6 +44,10 @@ public class ItemBloodRuneBlock extends ItemBlock case 4: name = "betterCapacity"; break; + + case 5: + name = "acceleration"; + break; default: name = "broken"; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java index e551c59b..69e182d4 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/items/sigil/SigilOfMagnetism.java @@ -1,10 +1,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil; -import WayofTime.alchemicalWizardry.AlchemicalWizardry; -import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; -import WayofTime.alchemicalWizardry.common.items.EnergyItems; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; +import java.util.List; + import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; @@ -14,10 +11,14 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.world.World; +import WayofTime.alchemicalWizardry.AlchemicalWizardry; +import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade; +import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding; +import WayofTime.alchemicalWizardry.common.items.EnergyItems; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; -import java.util.List; - -public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade +public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHolding { private static IIcon activeIcon; private static IIcon passiveIcon; diff --git a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java index f2798b51..91e15bf1 100644 --- a/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java +++ b/src/main/java/WayofTime/alchemicalWizardry/common/tileEntity/TEAltar.java @@ -56,6 +56,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui private float capacityMultiplier; private float orbCapacityMultiplier; private float dislocationMultiplier; + private int accelerationUpgrades; private boolean isUpgraded; private boolean isResultBlock; private int bufferCapacity; @@ -169,6 +170,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui progress = par1NBTTagCompound.getInteger("progress"); isResultBlock = par1NBTTagCompound.getBoolean("isResultBlock"); lockdownDuration = par1NBTTagCompound.getInteger("lockdownDuration"); + accelerationUpgrades = par1NBTTagCompound.getInteger("accelerationUpgrades"); } public void setMainFluid(FluidStack fluid) @@ -246,6 +248,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui par1NBTTagCompound.setInteger("progress", progress); par1NBTTagCompound.setInteger("bufferCapacity", bufferCapacity); par1NBTTagCompound.setInteger("lockdownDuration", lockdownDuration); + par1NBTTagCompound.setInteger("accelerationUpgrades", this.accelerationUpgrades); } @Override @@ -567,18 +570,6 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui block.onNeighborBlockChange(worldObj, xCoord, yCoord, zCoord - 1, block); } - int syphonMax = (int) (20 * this.dislocationMultiplier); - int fluidInputted = 0; - int fluidOutputted = 0; - fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); - fluidInputted = Math.min(this.fluidInput.amount, fluidInputted); - this.fluid.amount += fluidInputted; - this.fluidInput.amount -= fluidInputted; - fluidOutputted = Math.min(syphonMax, this.bufferCapacity - this.fluidOutput.amount); - fluidOutputted = Math.min(this.fluid.amount, fluidOutputted); - this.fluidOutput.amount += fluidOutputted; - this.fluid.amount -= fluidOutputted; - if (AlchemicalWizardry.lockdownAltar) { List list = SpellHelper.getPlayersInRange(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, 15, 15); @@ -606,6 +597,21 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui } } } + + if(worldObj.getWorldTime() % Math.max(20 - this.accelerationUpgrades, 1) == 0) + { + int syphonMax = (int) (20 * this.dislocationMultiplier); + int fluidInputted = 0; + int fluidOutputted = 0; + fluidInputted = Math.min(syphonMax, -this.fluid.amount + capacity); + fluidInputted = Math.min(this.fluidInput.amount, fluidInputted); + this.fluid.amount += fluidInputted; + this.fluidInput.amount -= fluidInputted; + fluidOutputted = Math.min(syphonMax, this.bufferCapacity - this.fluidOutput.amount); + fluidOutputted = Math.min(this.fluid.amount, fluidOutputted); + this.fluidOutput.amount += fluidOutputted; + this.fluid.amount -= fluidOutputted; + } if (worldObj.getWorldTime() % 100 == 0) { @@ -861,6 +867,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui this.capacityMultiplier = 1; this.orbCapacityMultiplier = 1; this.dislocationMultiplier = 1; + this.accelerationUpgrades = 0; return; } @@ -878,6 +885,7 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui this.orbCapacityMultiplier = 1; this.dislocationMultiplier = 1; this.upgradeLevel = upgradeState; + this.accelerationUpgrades = 0; return; } @@ -888,11 +896,11 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui this.sacrificeEfficiencyMultiplier = (float) (0.10 * upgrades.getSacrificeUpgrades()); this.selfSacrificeEfficiencyMultiplier = (float) (0.10 * upgrades.getSelfSacrificeUpgrades()); this.capacityMultiplier = (float) ((1 * Math.pow(1.10, upgrades.getBetterCapacitiveUpgrades()) + 0.20 * upgrades.getAltarCapacitiveUpgrades())); - //TODO finalize values this.dislocationMultiplier = (float) (Math.pow(1.2, upgrades.getDisplacementUpgrades())); this.orbCapacityMultiplier = (float) (1 + 0.02 * upgrades.getOrbCapacitiveUpgrades()); this.capacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 10 * capacityMultiplier); this.bufferCapacity = (int) (FluidContainerRegistry.BUCKET_VOLUME * 1 * capacityMultiplier); + this.accelerationUpgrades = upgrades.getAccelerationUpgrades(); if (this.fluid.amount > this.capacity) { diff --git a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang index d9dd708e..dbf3eebd 100644 --- a/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang +++ b/src/main/resources/assets/alchemicalwizardry/lang/en_US.lang @@ -5,6 +5,7 @@ tile.bloodRune.fill.name=Rune of Augmented Capacity tile.bloodRune.empty.name=Rune of Dislocation tile.bloodRune.orb.name=Rune of the Orb tile.bloodRune.betterCapacity.name=Rune of Superior Capacity +tile.bloodRune.acceleration.name=Rune of Acceleration tile.speedRune.name=Speed Rune tile.efficiencyRune.name=Efficiency Rune tile.runeOfSacrifice.name=Rune of Sacrifice diff --git a/src/main/resources/assets/alchemicalwizardry/textures/blocks/AccelerationRune.png b/src/main/resources/assets/alchemicalwizardry/textures/blocks/AccelerationRune.png new file mode 100644 index 00000000..42015ed2 Binary files /dev/null and b/src/main/resources/assets/alchemicalwizardry/textures/blocks/AccelerationRune.png differ