v1.1.0 release!

This commit is contained in:
WayofTime 2014-07-13 18:18:28 -04:00
parent 96930fc47a
commit 1778cfa737
20 changed files with 233 additions and 57 deletions

View file

@ -22,6 +22,7 @@ public class BloodRune extends Block
private IIcon altarCapacityRuneIcon;
private IIcon dislocationRuneIcon;
private IIcon orbCapacityRuneIcon;
private IIcon betterCapacityRuneIcon;
public BloodRune()
{
@ -40,6 +41,7 @@ public class BloodRune extends Block
this.altarCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:AltarCapacityRune");
this.dislocationRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:DislocationRune");
this.orbCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:OrbCapacityRune");
this.betterCapacityRuneIcon = iconRegister.registerIcon("AlchemicalWizardry:BetterCapacityRune");
}
public int getRuneEffect(int metaData)
@ -57,6 +59,9 @@ public class BloodRune extends Block
case 3: //Orb Capacity rune
return 7;
case 4: //Better Capacity rune
return 8;
}
return 0;
@ -75,6 +80,7 @@ public class BloodRune extends Block
par3List.add(new ItemStack(par1, 1, 1));
par3List.add(new ItemStack(par1, 1, 2));
par3List.add(new ItemStack(par1, 1, 3));
par3List.add(new ItemStack(par1, 1, 4));
} else
{
super.getSubBlocks(par1, par2CreativeTabs, par3List);
@ -98,6 +104,9 @@ public class BloodRune extends Block
case 3:
return this.orbCapacityRuneIcon;
case 4:
return this.betterCapacityRuneIcon;
default:
return blockIcon;

View file

@ -9,6 +9,7 @@ public class AltarUpgradeComponent
private int displacementUpgrades;
private int altarCapacitiveUpgrades;
private int orbCapacitiveUpgrades;
private int betterCapacitiveUpgrades;
public AltarUpgradeComponent()
{
@ -19,6 +20,7 @@ public class AltarUpgradeComponent
displacementUpgrades = 0;
altarCapacitiveUpgrades = 0;
orbCapacitiveUpgrades = 0;
betterCapacitiveUpgrades = 0;
}
public void addSpeedUpgrade()
@ -55,6 +57,11 @@ public class AltarUpgradeComponent
{
orbCapacitiveUpgrades++;
}
public void addBetterCapacitiveUpgrade()
{
betterCapacitiveUpgrades++;
}
public int getSpeedUpgrades()
{
@ -90,4 +97,9 @@ public class AltarUpgradeComponent
{
return this.orbCapacitiveUpgrades;
}
public int getBetterCapacitiveUpgrades()
{
return this.betterCapacitiveUpgrades;
}
}

View file

@ -189,6 +189,10 @@ public class UpgradedAltars
case 7:
upgrades.addorbCapacitiveUpgrade();
break;
case 8:
upgrades.addBetterCapacitiveUpgrade();
break;
}
}
}

View file

@ -137,7 +137,6 @@ public class EntityBileDemon extends EntityDemon
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer);
}
@ -149,11 +148,6 @@ public class EntityBileDemon extends EntityDemon
super.readEntityFromNBT(par1NBTTagCompound);
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
if (par1NBTTagCompound.hasKey("CollarColor"))
{
this.setCollarColor(par1NBTTagCompound.getByte("CollarColor"));
}
attackTimer = par1NBTTagCompound.getByte("attackTimer");
}

View file

@ -138,7 +138,6 @@ public class EntityBoulderFist extends EntityDemon
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
}
/**
@ -149,10 +148,6 @@ public class EntityBoulderFist extends EntityDemon
super.readEntityFromNBT(par1NBTTagCompound);
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
if (par1NBTTagCompound.hasKey("CollarColor"))
{
this.setCollarColor(par1NBTTagCompound.getByte("CollarColor"));
}
this.setCombatTask();
}

View file

@ -147,7 +147,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
}
/**
@ -158,11 +157,6 @@ public class EntityFallenAngel extends EntityDemon implements IRangedAttackMob
super.readEntityFromNBT(par1NBTTagCompound);
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
if (par1NBTTagCompound.hasKey("CollarColor"))
{
this.setCollarColor(par1NBTTagCompound.getByte("CollarColor"));
}
this.setCombatTask();
}

View file

@ -149,7 +149,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
}
/**
@ -159,12 +158,6 @@ public class EntityIceDemon extends EntityDemon implements IRangedAttackMob
{
super.readEntityFromNBT(par1NBTTagCompound);
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
if (par1NBTTagCompound.hasKey("CollarColor"))
{
this.setCollarColor(par1NBTTagCompound.getByte("CollarColor"));
}
this.setCombatTask();
}

View file

@ -133,7 +133,6 @@ public class EntityLowerGuardian extends EntityDemon
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
par1NBTTagCompound.setByte("attackTimer", (byte) attackTimer);
par1NBTTagCompound.setBoolean("isAggro", this.isAggro());
}
@ -146,10 +145,6 @@ public class EntityLowerGuardian extends EntityDemon
super.readEntityFromNBT(par1NBTTagCompound);
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
if (par1NBTTagCompound.hasKey("CollarColor"))
{
this.setCollarColor(par1NBTTagCompound.getByte("CollarColor"));
}
attackTimer = par1NBTTagCompound.getByte("attackTimer");
isAggro = par1NBTTagCompound.getBoolean("isAggro");

View file

@ -138,7 +138,6 @@ public class EntityShade extends EntityDemon
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
}
/**
@ -149,11 +148,6 @@ public class EntityShade extends EntityDemon
super.readEntityFromNBT(par1NBTTagCompound);
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
if (par1NBTTagCompound.hasKey("CollarColor"))
{
this.setCollarColor(par1NBTTagCompound.getByte("CollarColor"));
}
this.setCombatTask();
}

View file

@ -146,7 +146,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
}
/**
@ -157,11 +156,6 @@ public class EntitySmallEarthGolem extends EntityDemon implements IRangedAttackM
super.readEntityFromNBT(par1NBTTagCompound);
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
if (par1NBTTagCompound.hasKey("CollarColor"))
{
this.setCollarColor(par1NBTTagCompound.getByte("CollarColor"));
}
this.setCombatTask();
}

View file

@ -148,7 +148,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
par1NBTTagCompound.setByte("CollarColor", (byte) this.getCollarColor());
}
/**
@ -159,11 +158,6 @@ public class EntityWingedFireDemon extends EntityDemon implements IRangedAttackM
super.readEntityFromNBT(par1NBTTagCompound);
this.setAngry(par1NBTTagCompound.getBoolean("Angry"));
if (par1NBTTagCompound.hasKey("CollarColor"))
{
this.setCollarColor(par1NBTTagCompound.getByte("CollarColor"));
}
this.setCombatTask();
}

View file

@ -17,7 +17,7 @@ public class BloodMagicHarvestHandler implements IHarvestHandler
@Override
public boolean canHandleBlock(Block block)
{
return block == Blocks.wheat || block == Blocks.carrots || block == Blocks.potatoes;
return block == Blocks.wheat || block == Blocks.carrots || block == Blocks.potatoes || block == Blocks.nether_wart;
}
@Override
@ -35,6 +35,10 @@ public class BloodMagicHarvestHandler implements IHarvestHandler
{
return 7;
}
if(block == Blocks.nether_wart)
{
return 3;
}
return 7;
}
@ -116,6 +120,10 @@ public class BloodMagicHarvestHandler implements IHarvestHandler
{
return (IPlantable) Items.potato;
}
if(block == Blocks.nether_wart)
{
return (IPlantable) Items.nether_wart;
}
return null;
}

View file

@ -41,11 +41,15 @@ public class ItemBloodRuneBlock extends ItemBlock
break;
case 3:
name = "test";
name = "orb";
break;
case 4:
name = "betterCapacity";
break;
default:
name = "broken";
name = "broken";
}
return getUnlocalizedName() + "." + name;

View file

@ -84,7 +84,7 @@ public class RitualEffectGrowth extends RitualEffect
@Override
public int getCostPerRefresh()
{
return 100;
return 25;
}
@Override

View file

@ -0,0 +1,180 @@
package WayofTime.alchemicalWizardry.common.rituals;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
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.TEAltar;
public class RitualEffectLifeConduit 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();
TEAltar tileAltar = null;
boolean testFlag = false;
for (int i = -5; i <= 5; i++)
{
for (int j = -5; j <= 5; j++)
{
for (int k = -10; k <= 10; k++)
{
if (world.getTileEntity(x + i, y + k, z + j) instanceof TEAltar)
{
tileAltar = (TEAltar) world.getTileEntity(x + i, y + k, z + j);
testFlag = true;
}
}
}
}
if (!testFlag)
{
return;
}
//tileAltar = (TEAltar)world.getBlockTileEntity(x,y-1,z);
int d0 = 15;
int vertRange = 20;
EntityPlayer entityOwner = null;
List<EntityPlayer> list = SpellHelper.getPlayersInRange(world, x, y, z, d0, vertRange);
for(EntityPlayer player : list)
{
if(SpellHelper.getUsername(player).equals(owner))
{
entityOwner = player;
}
}
if (entityOwner == null)
{
return;
}
int fillAmount = Math.min(currentEssence/2,tileAltar.fill(ForgeDirection.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid,10000), false));
{
tileAltar.fill(ForgeDirection.UP, new FluidStack(AlchemicalWizardry.lifeEssenceFluid,fillAmount), true);
if(entityOwner.getHealth() > 2.0f && fillAmount != 0)
{
entityOwner.setHealth(2.0f);
}
data.currentEssence = currentEssence - fillAmount*2;
}
}
@Override
public int getCostPerRefresh()
{
return 0;
}
@Override
public List<RitualComponent> getRitualComponentList()
{
ArrayList<RitualComponent> conduitRitual = new ArrayList();
conduitRitual.add(new RitualComponent(-1,0,-1,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(-1,0,1,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(1,0,1,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(1,0,-1,RitualComponent.FIRE));
for(int i=0; i<4; i++)
{
conduitRitual.add(new RitualComponent(-2,i,-2,RitualComponent.AIR));
conduitRitual.add(new RitualComponent(-2,i,2,RitualComponent.AIR));
conduitRitual.add(new RitualComponent(2,i,2,RitualComponent.AIR));
conduitRitual.add(new RitualComponent(2,i,-2,RitualComponent.AIR));
}
conduitRitual.add(new RitualComponent(4,1,4,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(4,1,-4,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(-4,1,-4,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(-4,1,4,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(3,1,4,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(4,1,3,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(-3,1,4,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(-4,1,3,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(3,1,-4,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(4,1,-3,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(-3,1,-4,RitualComponent.EARTH));
conduitRitual.add(new RitualComponent(-4,1,-3,RitualComponent.EARTH));
for(int i=0; i<2; i++)
{
conduitRitual.add(new RitualComponent(4,i+2,4,RitualComponent.WATER));
conduitRitual.add(new RitualComponent(4,i+2,-4,RitualComponent.WATER));
conduitRitual.add(new RitualComponent(-4,i+2,-4,RitualComponent.WATER));
conduitRitual.add(new RitualComponent(-4,i+2,4,RitualComponent.WATER));
}
conduitRitual.add(new RitualComponent(4,4,4,RitualComponent.DUSK));
conduitRitual.add(new RitualComponent(4,4,-4,RitualComponent.DUSK));
conduitRitual.add(new RitualComponent(-4,4,-4,RitualComponent.DUSK));
conduitRitual.add(new RitualComponent(-4,4,4,RitualComponent.DUSK));
conduitRitual.add(new RitualComponent(6,0,5,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(5,0,6,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(-6,0,5,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(-5,0,6,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(6,0,-5,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(5,0,-6,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(-6,0,-5,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(-5,0,-6,RitualComponent.FIRE));
for(int i=0; i<2; i++)
{
conduitRitual.add(new RitualComponent(6,i,6,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(6,i,-6,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(-6,i,6,RitualComponent.FIRE));
conduitRitual.add(new RitualComponent(-6,i,-6,RitualComponent.FIRE));
}
for(int i=0; i<3; i++)
{
conduitRitual.add(new RitualComponent(6,i+2,6,RitualComponent.BLANK));
conduitRitual.add(new RitualComponent(6,i+2,-6,RitualComponent.BLANK));
conduitRitual.add(new RitualComponent(-6,i+2,6,RitualComponent.BLANK));
conduitRitual.add(new RitualComponent(-6,i+2,-6,RitualComponent.BLANK));
}
conduitRitual.add(new RitualComponent(6,5,6,RitualComponent.DUSK));
conduitRitual.add(new RitualComponent(6,5,-6,RitualComponent.DUSK));
conduitRitual.add(new RitualComponent(-6,5,6,RitualComponent.DUSK));
conduitRitual.add(new RitualComponent(-6,5,-6,RitualComponent.DUSK));
return conduitRitual;
}
}

View file

@ -867,11 +867,11 @@ public class TEAltar extends TileEntity implements IInventory, IFluidTank, IFlui
this.isUpgraded = checkUpgrade;
this.upgradeLevel = upgradeState;
this.consumptionMultiplier = (float) (0.15 * upgrades.getSpeedUpgrades());
this.consumptionMultiplier = (float) (0.20 * upgrades.getSpeedUpgrades());
this.efficiencyMultiplier = (float) Math.pow(0.85, upgrades.getSpeedUpgrades());
this.sacrificeEfficiencyMultiplier = (float) (0.10 * upgrades.getSacrificeUpgrades());
this.selfSacrificeEfficiencyMultiplier = (float) (0.10 * upgrades.getSelfSacrificeUpgrades());
this.capacityMultiplier = (float) (1 + 0.15 * upgrades.getAltarCapacitiveUpgrades());
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());