This commit is contained in:
WayofTime 2015-07-13 17:37:03 -04:00
commit 1bbf76063c
10 changed files with 201 additions and 57 deletions

View file

@ -41,8 +41,8 @@ public class PageAltarRecipe extends PageBase {
guiBase.drawCenteredString(fontRenderer, StatCollector.translateToLocal("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7);
int inputY = (20) + (guiTop + guiBase.ySize / 5); //1 * 20
int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1;
int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20
GuiHelper.drawItemStack(input, inputX, inputY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) {
guiBase.renderToolTip(input, mouseX, mouseY);
@ -51,8 +51,8 @@ public class PageAltarRecipe extends PageBase {
if (output == null) {
output = new ItemStack(Blocks.fire);
}
int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7);
int outputY = (20) + (guiTop + guiBase.xSize / 5); // 1 * 20
int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1;
int outputY = (20) + (guiTop + guiBase.xSize / 5) - 1; // 1 * 20
GuiHelper.drawItemStack(output, outputX, outputY);
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
guiBase.renderToolTip(output, outputX, outputY);

View file

@ -7,6 +7,8 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import WayofTime.alchemicalWizardry.common.achievements.ModAchievements;
import WayofTime.alchemicalWizardry.common.demonVillage.demonHoard.demon.IHoardDemon;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -15,7 +17,6 @@ import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.PlayerCapabilities;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.item.ItemStack;
@ -29,6 +30,7 @@ import net.minecraftforge.common.ISpecialArmor.ArmorProperties;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import net.minecraftforge.event.entity.living.LivingHurtEvent;
@ -52,7 +54,6 @@ import WayofTime.alchemicalWizardry.common.omega.ReagentRegenConfiguration;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.common.Optional;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.common.eventhandler.EventPriority;
@ -806,6 +807,19 @@ public class AlchemicalWizardryEventHooks
}
}
@SubscribeEvent
public void onEntityDeath(LivingDeathEvent event)
{
EntityLivingBase entityLiving = event.entityLiving;
if (entityLiving instanceof IHoardDemon && event.source.getEntity() instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.source.getEntity();
player.addStat(ModAchievements.demons, 1);
}
}
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
if (event.modID.equals("AWWayofTime")) {

View file

@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.achievements;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
@ -32,13 +33,25 @@ public class AchievementTrigger
{
for (Item item : AchievementsRegistry.craftinglist)
{
if (event.crafting != null && event.crafting.getItem() == item)
if (event.crafting != null)
{
Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem());
if (achievement != null)
if (event.crafting.getItem() == item)
{
event.player.addStat(achievement, 1);
Achievement achievement = AchievementsRegistry.getAchievementForItem(event.crafting.getItem());
if (achievement != null)
{
event.player.addStat(achievement, 1);
}
}
if (event.crafting.getItem() instanceof ItemBlock)
{
Achievement achievement = AchievementsRegistry.getAchievementForBlock(((ItemBlock) event.crafting.getItem()).field_150939_a);
if (achievement != null)
{
event.player.addStat(achievement, 1);
}
}
}
}

View file

@ -1,6 +1,9 @@
package WayofTime.alchemicalWizardry.common.achievements;
import WayofTime.alchemicalWizardry.ModBlocks;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.common.items.ItemRitualDiviner;
import WayofTime.alchemicalWizardry.common.items.armour.BoundArmour;
import net.minecraft.item.Item;
import net.minecraft.block.Block;
import net.minecraft.stats.Achievement;
@ -10,40 +13,91 @@ import java.util.List;
public class AchievementsRegistry
{
public final static List<Item> craftinglist = new ArrayList();
public final static List<Item> pickupList = new ArrayList();
public final static List<Item> craftinglist = new ArrayList<Item>();
public final static List<Item> pickupList = new ArrayList<Item>();
public final static List<Block> blockCraftingList = new ArrayList<Block>();
// public final static List<Block> blockPickupList = new ArrayList<Block>();
public static void init()
{
addItemsToCraftingList();
addBlocksToCraftingList();
addItemsToPickupList();
// addBlocksToPickupList();
}
public static void addItemsToCraftingList()
{
craftinglist.add(ModItems.sacrificialDagger);
craftinglist.add(ModItems.itemBloodPack);
craftinglist.add(ModItems.waterSigil);
craftinglist.add(ModItems.airSigil);
craftinglist.add(ModItems.sigilOfHolding);
craftinglist.add(ModItems.itemRitualDiviner);
craftinglist.add(ModItems.sigilOfTheBridge);
craftinglist.add(ModItems.itemSigilOfSupression);
}
public static void addBlocksToCraftingList()
{
blockCraftingList.add(ModBlocks.bloodRune);
blockCraftingList.add(ModBlocks.blockWritingTable);
blockCraftingList.add(ModBlocks.blockTeleposer);
}
public static void addItemsToPickupList()
{
pickupList.add(ModItems.weakBloodOrb);
pickupList.add(ModItems.apprenticeBloodOrb);
pickupList.add(ModItems.daggerOfSacrifice);
pickupList.add(ModItems.magicianBloodOrb);
pickupList.add(ModItems.energySword);
pickupList.add(ModItems.boundHelmet);
pickupList.add(ModItems.boundPlate);
pickupList.add(ModItems.boundLeggings);
pickupList.add(ModItems.boundBoots);
pickupList.add(ModItems.itemComplexSpellCrystal);
pickupList.add(ModItems.masterBloodOrb);
pickupList.add(ModItems.archmageBloodOrb);
pickupList.add(ModItems.transcendentBloodOrb);
}
public static void addBlocksToPickupList()
{
}
public static Achievement getAchievementForItem(Item item)
{
if (item == ModItems.sacrificialDagger)
{
return ModAchievements.firstPrick;
}
if (item == ModItems.weakBloodOrb)
{
return ModAchievements.weakOrb;
}
if (item == ModItems.sacrificialDagger) return ModAchievements.firstPrick;
if (item == ModItems.weakBloodOrb) return ModAchievements.weakOrb;
if (item == ModItems.itemBloodPack) return ModAchievements.bloodLettersPack;
if (item == ModItems.waterSigil) return ModAchievements.waterSigil;
if (item == ModItems.apprenticeBloodOrb) return ModAchievements.apprenticeOrb;
if (item == ModItems.airSigil) return ModAchievements.airSigil;
if (item == ModItems.daggerOfSacrifice) return ModAchievements.daggerOfSacrifice;
if (item == ModItems.magicianBloodOrb) return ModAchievements.magicianOrb;
if (item == ModItems.sigilOfHolding) return ModAchievements.sigilHolding;
if (item == ModItems.energySword) return ModAchievements.boundBlade;
if (item instanceof BoundArmour) return ModAchievements.boundArmor;
if (item == ModItems.itemComplexSpellCrystal) return ModAchievements.complexSpells;
if (item instanceof ItemRitualDiviner) return ModAchievements.ritualDiviner;
if (item == ModItems.masterBloodOrb) return ModAchievements.masterOrb;
if (item == ModItems.sigilOfTheBridge) return ModAchievements.phantomBridgeSigil;
if (item == ModItems.itemSigilOfSupression) return ModAchievements.suppressionSigil;
if (item == ModItems.archmageBloodOrb) return ModAchievements.archmageOrb;
if (item == ModItems.energyBazooka) return ModAchievements.energyBazooka;
if (item == ModItems.transcendentBloodOrb) return ModAchievements.transcendentOrb;
return null;
}
public static Achievement getAchievementForBlock(Block block)
{
if (block == ModBlocks.bloodRune) return ModAchievements.blankRunes;
if (block == ModBlocks.blockWritingTable) return ModAchievements.brewingPotions;
if (block == ModBlocks.blockTeleposer) return ModAchievements.teleposer;
return null;
}
}

View file

@ -1,11 +0,0 @@
package WayofTime.alchemicalWizardry.common.achievements;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
public interface ICraftAchievement
{
Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix);
}

View file

@ -1,11 +0,0 @@
package WayofTime.alchemicalWizardry.common.achievements;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
public interface IPickupAchievement
{
Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item);
}

View file

@ -1,7 +1,7 @@
package WayofTime.alchemicalWizardry.common.achievements;
import WayofTime.alchemicalWizardry.ModBlocks;
import net.minecraft.stats.Achievement;
import net.minecraft.util.StatCollector;
import net.minecraftforge.common.AchievementPage;
import WayofTime.alchemicalWizardry.ModItems;
import cpw.mods.fml.common.FMLCommonHandler;
@ -12,13 +12,55 @@ public class ModAchievements
public static Achievement firstPrick;
public static Achievement weakOrb;
public static Achievement bloodLettersPack;
public static Achievement waterSigil;
public static Achievement blankRunes;
public static Achievement apprenticeOrb;
public static Achievement airSigil;
public static Achievement daggerOfSacrifice;
public static Achievement brewingPotions;
public static Achievement magicianOrb;
public static Achievement sigilHolding;
public static Achievement boundBlade;
public static Achievement boundArmor;
public static Achievement complexSpells;
public static Achievement ritualDiviner;
public static Achievement masterOrb;
public static Achievement phantomBridgeSigil;
public static Achievement teleposer;
public static Achievement suppressionSigil;
public static Achievement archmageOrb;
public static Achievement energyBazooka;
public static Achievement demons;
public static Achievement transcendentOrb;
public static void init()
{
firstPrick = new AchievementsMod(StatCollector.translateToLocal("firstPrick"), 0, 0, ModItems.sacrificialDagger, null);
weakOrb = new AchievementsMod(StatCollector.translateToLocal("weakOrb"), 3, 0, ModItems.weakBloodOrb, firstPrick);
firstPrick = new AchievementsMod("firstPrick", 0, 0, ModItems.sacrificialDagger, null).setSpecial();
weakOrb = new AchievementsMod("weakOrb", 3, 0, ModItems.weakBloodOrb, firstPrick);
bloodLettersPack = new AchievementsMod("bloodLettersPack", 3, 2, ModItems.itemBloodPack, weakOrb);
waterSigil = new AchievementsMod("waterSigil", 6, 2, ModItems.waterSigil, weakOrb);
blankRunes = new AchievementsMod("blankRunes", 4, -2, ModBlocks.bloodRune, weakOrb);
apprenticeOrb = new AchievementsMod("apprenticeOrb", 4, -4, ModItems.apprenticeBloodOrb, blankRunes);
airSigil = new AchievementsMod("airSigil", 6, 1, ModItems.airSigil, apprenticeOrb);
daggerOfSacrifice = new AchievementsMod("daggerSacrifice", 4, -5, ModItems.daggerOfSacrifice, apprenticeOrb);
brewingPotions = new AchievementsMod("brewingPotions", 6, -3, ModBlocks.blockWritingTable, apprenticeOrb);
magicianOrb = new AchievementsMod("magicianOrb", 2, -2, ModItems.magicianBloodOrb, apprenticeOrb);
sigilHolding = new AchievementsMod("sigilHolding", 6, 0, ModItems.sigilOfHolding, magicianOrb);
boundBlade = new AchievementsMod("boundBlade", 0, -2, ModItems.energySword, magicianOrb);
boundArmor = new AchievementsMod("boundArmor", 1, -1, ModItems.boundPlate, magicianOrb);
complexSpells = new AchievementsMod("complexSpells", 1, -4, ModItems.itemComplexSpellCrystal, magicianOrb);
ritualDiviner = new AchievementsMod("ritualDiviner", 1, -3, ModItems.itemRitualDiviner, magicianOrb);
masterOrb = new AchievementsMod("masterOrb", -2, -1, ModItems.masterBloodOrb, boundBlade);
phantomBridgeSigil = new AchievementsMod("phantomBridgeSigil", 6, -1, ModItems.sigilOfTheBridge, masterOrb);
teleposer = new AchievementsMod("teleposer", -4, -1, ModBlocks.blockTeleposer, masterOrb);
suppressionSigil = new AchievementsMod("suppressionSigil", 6, -2, ModItems.itemSigilOfSupression, masterOrb);
archmageOrb = new AchievementsMod("archmageOrb", -1, 2, ModItems.archmageBloodOrb, masterOrb);
energyBazooka = new AchievementsMod("energyBazooka", -3, 2, ModItems.energyBazooka, archmageOrb);
demons = new AchievementsMod("demons", 0, 3, ModItems.demonPlacer, archmageOrb).setSpecial();
transcendentOrb = new AchievementsMod("trancsendentOrb", 0, 5, ModItems.transcendentBloodOrb, demons);
alchemicalWizardryPage = new AchievementPage("AlchemicalWizardry", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()]));
alchemicalWizardryPage = new AchievementPage("Blood Magic", AchievementsMod.achievements.toArray(new Achievement[AchievementsMod.achievements.size()]));
AchievementPage.registerAchievementPage(alchemicalWizardryPage);
AchievementsRegistry.init();
FMLCommonHandler.instance().bus().register(new AchievementTrigger());

View file

@ -94,19 +94,19 @@ public class RitualEffectBinding extends RitualEffect
switch (lightningPoint)
{
case 0:
world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 3, z + 0));
world.addWeatherEffect(new EntityLightningBolt(world, x + 4, y + 3, z));
break;
case 1:
world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 3, z + 0));
world.addWeatherEffect(new EntityLightningBolt(world, x - 4, y + 3, z));
break;
case 2:
world.addWeatherEffect(new EntityLightningBolt(world, x + 0, y + 3, z + 4));
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 3, z + 4));
break;
case 3:
world.addWeatherEffect(new EntityLightningBolt(world, x + 0, y + 3, z - 4));
world.addWeatherEffect(new EntityLightningBolt(world, x, y + 3, z - 4));
break;
case 4:

View file

@ -3,7 +3,9 @@ package WayofTime.alchemicalWizardry.common.tileEntity;
import java.util.Iterator;
import java.util.List;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -146,7 +148,7 @@ public class TETeleposer extends TEInventory
entityCount = 0;
}
EnergyItems.syphonWhileInContainer(focus, damage * transportCount + damage * entityCount);
SoulNetworkHandler.syphonFromNetwork(focus, damage * transportCount + damage * entityCount);
//Teleport
if (worldF.equals(worldObj))

View file

@ -328,7 +328,7 @@ tooltip.attunedcrystal.desc1=A tool to tune alchemy
tooltip.attunedcrystal.desc2=reagent transmission
tooltip.blankspell.desc=Crystal of infinite possibilities.
tooltip.bloodframe.desc=Stirs bees into a frenzy.
tooltip.bloodletterpack.desc=This pack really chaffes...
tooltip.bloodletterpack.desc=This pack really chaffs...
tooltip.bloodlightsigil.desc=I see a light!
tooltip.boundarmor.devprotect=Devilish Protection
tooltip.boundaxe.desc=Axe me about my puns!
@ -393,7 +393,7 @@ tooltip.ritualdiviner.ritualtunedto=Ritual tuned to face:
tooltip.ritualdiviner.waterstones=Water Stones:
tooltip.ritualdiviner.dawnstones=Dawn Stones:
tooltip.ritualdiviner.totalStones=Total Stones:
tooltip.dismatler.desc=You could turn this upside down?
tooltip.dismatler.desc=You can turn this upside down?
tooltip.sacrificialdagger.desc1=A slight draining feeling tickles your fingers
tooltip.sacrificialdagger.desc2=Just a prick of the
tooltip.sacrificialdagger.desc3=finger will suffice...
@ -468,9 +468,50 @@ message.routerfocus.limit=Focus' Item Limit set to:
#Achievements
achievement.alchemicalwizardry:firstPrick=Your First Prick!
achievement.alchemicalwizardry:firstPrick.desc=The first drop of life into the Altar...
achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red...
achievement.alchemicalwizardry:weakOrb.desc=This orb will suffice...for now...
achievement.alchemicalwizardry:firstPrick.desc=Craft a Sacrificial Knife/Orb
achievement.alchemicalwizardry:weakOrb=Faintly Glowing Red
achievement.alchemicalwizardry:weakOrb.desc=Pickup a Weak Blood Orb
achievement.alchemicalwizardry:bloodLettersPack=Gathering More Blood
achievement.alchemicalwizardry:bloodLettersPack.desc=Create a Blood Letter's Pack
achievement.alchemicalwizardry:waterSigil=Infinite Water!
achievement.alchemicalwizardry:waterSigil.desc=Make a Water Sigil with your Weak Blood Orb
achievement.alchemicalwizardry:blankRunes=Stepping Towards Tier 2
achievement.alchemicalwizardry:blankRunes.desc=Make a couple of Blank Runes
achievement.alchemicalwizardry:apprenticeOrb=Getting Stronger
achievement.alchemicalwizardry:apprenticeOrb.desc=Pickup an Apprentice Orb
achievement.alchemicalwizardry:airSigil=Whoosh!
achievement.alchemicalwizardry:airSigil.desc=Craft an Air Sigil
achievement.alchemicalwizardry:daggerSacrifice=Sacrificing Others
achievement.alchemicalwizardry:daggerSacrifice.desc=Pickup a Dagger of Sacrifice
achievement.alchemicalwizardry:brewingPotions=Alchemical Chemistry
achievement.alchemicalwizardry:brewingPotions.desc=Craft an Alchemical Chemistry set
achievement.alchemicalwizardry:magicianOrb=Even Stronger
achievement.alchemicalwizardry:magicianOrb.desc=Pickup a Magician's Orb
achievement.alchemicalwizardry:sigilHolding=Hold All The Sigils!
achievement.alchemicalwizardry:sigilHolding.desc=Make a Sigil of Holding
achievement.alchemicalwizardry:boundBlade=More Pain
achievement.alchemicalwizardry:boundBlade.desc=Create a Bound Blade from a Ritual of Binding
achievement.alchemicalwizardry:boundArmor=Uncrackable
achievement.alchemicalwizardry:boundArmor.desc=Craft Bound Armor from the Armor Forge
achievement.alchemicalwizardry:complexSpells=Not Quite Hemomancy
achievement.alchemicalwizardry:complexSpells.desc=Pickup a Complex Spell Crystal
achievement.alchemicalwizardry:ritualDiviner=Ritual Making
achievement.alchemicalwizardry:ritualDiviner.desc=Craft a Ritual Diviner
achievement.alchemicalwizardry:masterOrb=Getting Very Strong
achievement.alchemicalwizardry:masterOrb.desc=Pickup a Master Orb
achievement.alchemicalwizardry:phantomBridgeSigil=Walking In Mid-Air
achievement.alchemicalwizardry:phantomBridgeSigil.desc=Make the Sigil of the Phantom Bridge
achievement.alchemicalwizardry:teleposer=Teleposed!
achievement.alchemicalwizardry:teleposer.desc=Craft a Teleposer
achievement.alchemicalwizardry:suppressionSigil=Suppress!
achievement.alchemicalwizardry:suppressionSigil.desc=Create a Suppression Sigil
achievement.alchemicalwizardry:archmageOrb=Too Strong
achievement.alchemicalwizardry:archmageOrb.desc=Pickup an Archmage Orb
achievement.alchemicalwizardry:demons=Demon Hunter
achievement.alchemicalwizardry:demons.desc=Kill a Demon
achievement.alchemicalwizardry:trancsendentOrb=OVERPOWERED
achievement.alchemicalwizardry:trancsendentOrb.desc=Pickup a Transcendent Blood Orb
#G-API Downloading
bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"]