More demon village tweaks, adding more event functionality
This commit is contained in:
parent
1115eaf9a7
commit
d439ac92fc
|
@ -1,12 +1,12 @@
|
|||
#
|
||||
#Sat Nov 22 10:17:06 EST 2014
|
||||
#Sat Nov 29 10:45:33 EST 2014
|
||||
mod_name=BloodMagic
|
||||
forge_version=10.13.2.1232
|
||||
ccc_version=1.0.4.29
|
||||
nei_version=1.0.3.64
|
||||
//=Dependency Information
|
||||
package_group=com.wayoftime.bloodmagic
|
||||
mod_version=1.2.1a
|
||||
mod_version=1.2.1b
|
||||
minetweaker_version=Dev-1.7.10-3.0.9B
|
||||
mc_version=1.7.10
|
||||
build_number=2
|
||||
mc_version=1.7.10
|
||||
|
|
|
@ -250,7 +250,7 @@ import cpw.mods.fml.common.network.NetworkRegistry;
|
|||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.2.1a", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory")
|
||||
@Mod(modid = "AWWayofTime", name = "AlchemicalWizardry", version = "v1.2.1b", guiFactory = "WayofTime.alchemicalWizardry.client.gui.ConfigGuiFactory")
|
||||
|
||||
public class AlchemicalWizardry
|
||||
{
|
||||
|
|
|
@ -12,8 +12,6 @@ import net.minecraftforge.common.config.Configuration;
|
|||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.ColourThreshold;
|
||||
import WayofTime.alchemicalWizardry.client.renderer.RenderHelper;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.DemonVillagePath;
|
||||
import WayofTime.alchemicalWizardry.common.demonVillage.tileEntity.TEDemonPortal;
|
||||
import WayofTime.alchemicalWizardry.common.items.BoundArmour;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorParadigm;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
@ -135,19 +133,19 @@ public class BloodMagicConfiguration
|
|||
AlchemicalWizardry.ritualDisabledVeilOfEvil = config.get("Ritual Blacklist", "Veil of Evil", false).getBoolean(false);
|
||||
AlchemicalWizardry.ritualDisabledFullStomach = config.get("Ritual Blacklist", "Requiem of the Satiated Stomach", false).getBoolean(false);
|
||||
|
||||
String tempDemonConfigs = "Temp Demon Configs";
|
||||
TEDemonPortal.buildingGridDelay = config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt();
|
||||
TEDemonPortal.roadGridDelay = config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt();
|
||||
TEDemonPortal.demonHoardDelay = config.get(tempDemonConfigs, "Demon Hoard Delay", 40).getInt();
|
||||
TEDemonPortal.demonRoadChance = (float)(config.get(tempDemonConfigs, "Demon Road Chance", 0.6f).getDouble());
|
||||
TEDemonPortal.demonHouseChance = (float)(config.get(tempDemonConfigs, "Demon House Chance", 0.6f).getDouble());
|
||||
TEDemonPortal.demonPortalChance = (float)(config.get(tempDemonConfigs, "Demon Portal Chance", 0.5f).getDouble());
|
||||
TEDemonPortal.demonHoardChance = (float)(config.get(tempDemonConfigs, "Demon Hoard Chance", 1.0f).getDouble());
|
||||
TEDemonPortal.portalTickRate = (float)(config.get(tempDemonConfigs, "Portal Tick Rate", 0.1f).getDouble());
|
||||
|
||||
DemonVillagePath.canGoDown = config.get(tempDemonConfigs, "canRoadGoDown", true).getBoolean();
|
||||
DemonVillagePath.tunnelIfObstructed = config.get(tempDemonConfigs, "tunnelIfObstructed", false).getBoolean();
|
||||
DemonVillagePath.createBridgeInAirIfObstructed = config.get(tempDemonConfigs, "createBridgeInAirIfObstructed", false).getBoolean();
|
||||
// String tempDemonConfigs = "Temp Demon Configs";
|
||||
// TEDemonPortal.buildingGridDelay = config.get(tempDemonConfigs, "Building Grid Delay", 25).getInt();
|
||||
// TEDemonPortal.roadGridDelay = config.get(tempDemonConfigs, "Road Grid Delay", 10).getInt();
|
||||
// TEDemonPortal.demonHoardDelay = config.get(tempDemonConfigs, "Demon Hoard Delay", 40).getInt();
|
||||
// TEDemonPortal.demonRoadChance = (float)(config.get(tempDemonConfigs, "Demon Road Chance", 0.6f).getDouble());
|
||||
// TEDemonPortal.demonHouseChance = (float)(config.get(tempDemonConfigs, "Demon House Chance", 0.6f).getDouble());
|
||||
// TEDemonPortal.demonPortalChance = (float)(config.get(tempDemonConfigs, "Demon Portal Chance", 0.5f).getDouble());
|
||||
// TEDemonPortal.demonHoardChance = (float)(config.get(tempDemonConfigs, "Demon Hoard Chance", 1.0f).getDouble());
|
||||
// TEDemonPortal.portalTickRate = (float)(config.get(tempDemonConfigs, "Portal Tick Rate", 0.1f).getDouble());
|
||||
//
|
||||
// DemonVillagePath.canGoDown = config.get(tempDemonConfigs, "canRoadGoDown", true).getBoolean();
|
||||
// DemonVillagePath.tunnelIfObstructed = config.get(tempDemonConfigs, "tunnelIfObstructed", false).getBoolean();
|
||||
// DemonVillagePath.createBridgeInAirIfObstructed = config.get(tempDemonConfigs, "createBridgeInAirIfObstructed", false).getBoolean();
|
||||
|
||||
BoundArmour.tryComplexRendering = config.get("WimpySettings", "UseFancyBoundArmour", true).getBoolean(true);
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.api.event;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
|
||||
@Cancelable
|
||||
public class ItemDrainInContainerEvent extends SoulNetworkEvent
|
||||
{
|
||||
public ItemStack stack;
|
||||
public ItemDrainInContainerEvent(ItemStack stack, String ownerNetwork, int drainAmount)
|
||||
{
|
||||
super(ownerNetwork, drainAmount);
|
||||
this.stack = stack;
|
||||
}
|
||||
}
|
|
@ -17,12 +17,12 @@ import cpw.mods.fml.common.eventhandler.Event;
|
|||
|
||||
public class Rituals
|
||||
{
|
||||
private int crystalLevel;
|
||||
private int actCost;
|
||||
private RitualEffect effect;
|
||||
private String name;
|
||||
public final int crystalLevel;
|
||||
public final int actCost;
|
||||
public final RitualEffect effect;
|
||||
public final String name;
|
||||
|
||||
private MRSRenderer customRenderer;
|
||||
public final MRSRenderer customRenderer;
|
||||
|
||||
public static Map<String, Rituals> ritualMap = new HashMap();
|
||||
public static List<String> keyList = new LinkedList();
|
||||
|
|
|
@ -13,11 +13,13 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.MinecraftForge;
|
||||
import WayofTime.alchemicalWizardry.api.event.AddToNetworkEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemBindEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainInContainerEvent;
|
||||
import WayofTime.alchemicalWizardry.api.event.ItemDrainNetworkEvent;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
|
||||
public class SoulNetworkHandler
|
||||
{
|
||||
|
@ -34,6 +36,24 @@ public class SoulNetworkHandler
|
|||
return null;
|
||||
}
|
||||
|
||||
public static boolean syphonFromNetworkWhileInContainer(ItemStack ist, int damageToBeDone)
|
||||
{
|
||||
String ownerName = "";
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals("")))
|
||||
{
|
||||
ownerName = ist.getTagCompound().getString("ownerName");
|
||||
}
|
||||
|
||||
ItemDrainInContainerEvent event = new ItemDrainInContainerEvent(ist, ownerName, damageToBeDone);
|
||||
|
||||
if(MinecraftForge.EVENT_BUS.post(event) || event.getResult() == Result.DENY)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return syphonFromNetwork(event.ownerNetwork, event.drainAmount) >= damageToBeDone;
|
||||
}
|
||||
|
||||
public static int syphonFromNetwork(ItemStack ist, int damageToBeDone)
|
||||
{
|
||||
if (ist.getTagCompound() != null && !(ist.getTagCompound().getString("ownerName").equals("")))
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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("")))
|
||||
|
|
|
@ -63,6 +63,11 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 0))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals(""))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"modid": "AWWayofTime",
|
||||
"name": "Blood Magic: Alchemical Wizardry",
|
||||
"description": "Rituals, spells, and more!",
|
||||
"version": "v1.2.0b(1.7.10)",
|
||||
"version": "v1.2.1b(1.7.10)",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "http://www.minecraftforum.net/topic/1899223-",
|
||||
"updateUrl": "",
|
||||
|
|
Loading…
Reference in a new issue