More demon village tweaks, adding more event functionality

This commit is contained in:
WayofTime 2014-11-30 17:56:10 -05:00
parent 1115eaf9a7
commit d439ac92fc
14 changed files with 83 additions and 31 deletions

View file

@ -187,6 +187,9 @@ public class BlockTeleposer extends BlockContainer
int metaI = worldI.getBlockMetadata(xi, yi, zi);
int metaF = worldF.getBlockMetadata(xf, yf, zf);
//TODO Teleposer event
worldI.playSoundEffect(xi, yi, zi, "mob.endermen.portal", 1.0F, 1.0F);
worldF.playSoundEffect(xf, yf, zf, "mob.endermen.portal", 1.0F, 1.0F);

View file

@ -43,7 +43,7 @@ import com.google.gson.GsonBuilder;
public class TEDemonPortal extends TileEntity
{
boolean printDebug = false;
public static boolean printDebug = false;
public static int buildingGridDelay = 25;
public static int roadGridDelay = 10;
@ -334,11 +334,14 @@ public class TEDemonPortal extends TileEntity
this.incrementPoints();
this.assignPoints();
if(printDebug)
AlchemicalWizardry.logger.info("Roads: " + roadCooldown + " Buildings: " + houseCooldown);
if(buildingStage >= 0 && buildingStage <=2)
{
if(printDebug)
AlchemicalWizardry.logger.info("BuildingStage = " + buildingStage);
if(printDebug)
AlchemicalWizardry.logger.info("Tier = " + this.tier);
this.createPortalBuilding(buildingStage, nextDemonPortalName, tier);
buildingStage++;
@ -1138,6 +1141,7 @@ public class TEDemonPortal extends TileEntity
public int createPortalBuilding(int buildingTier) //TODO Telepose block next time, then build the new building.
{
if(printDebug)
AlchemicalWizardry.logger.info("Hello, I am here!");
int x = 0;
int z = 0;
@ -1345,6 +1349,7 @@ public class TEDemonPortal extends TileEntity
}
} else
{
if(printDebug)
AlchemicalWizardry.logger.info("This ISN'T valid!");
}
}

View file

@ -5,6 +5,7 @@ import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -75,7 +76,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
return par1ItemStack;
}
EnergyItems.addEssenceToMaximum(itemTag.getString("ownerName"), 200, this.getMaxEssence());
SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, this.getMaxEssence());
EnergyItems.hurtPlayer(par3EntityPlayer, 200);
return par1ItemStack;
}

View file

@ -83,6 +83,7 @@ public class EnergyItems extends Item implements IBindable
return true;
}
@Deprecated
public static boolean syphonWhileInContainer(ItemStack ist, int damageToBeDone)
{
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals("")))

View file

@ -62,6 +62,11 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
{
return par1ItemStack;
}
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 0))
{
return par1ItemStack;
}
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;

View file

@ -151,7 +151,11 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
return;
}
SoulNetworkHandler.syphonFromNetwork(orbStack, lpPerTick);
if(!SoulNetworkHandler.syphonFromNetworkWhileInContainer(orbStack, lpPerTick))
{
return;
}
progress++;
if (worldObj.getWorldTime() % 4 == 0)

View file

@ -17,13 +17,13 @@ import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipe;
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import WayofTime.alchemicalWizardry.common.IBindingAgent;
import WayofTime.alchemicalWizardry.common.ICatalyst;
import WayofTime.alchemicalWizardry.common.IFillingAgent;
import WayofTime.alchemicalWizardry.common.NewPacketHandler;
import WayofTime.alchemicalWizardry.common.alchemy.CombinedPotionRegistry;
import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.items.potion.AlchemyFlask;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
@ -737,7 +737,7 @@ public class TEWritingTable extends TileEntity implements IInventory, ISidedInve
if (getStackInSlot(6) == null)
{
if (!EnergyItems.syphonWhileInContainer(getStackInSlot(0), amountUsed * acceleration))
if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer(getStackInSlot(0), amountUsed * acceleration))
{
return;
}
@ -775,7 +775,7 @@ public class TEWritingTable extends TileEntity implements IInventory, ISidedInve
SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord);
}
if (!EnergyItems.syphonWhileInContainer(getStackInSlot(0), amountUsed * acceleration))
if (!SoulNetworkHandler.syphonFromNetworkWhileInContainer(getStackInSlot(0), amountUsed * acceleration))
{
return;
}