Renamed nomenclature to Demonic Will instead of souls - still missing a few spots

This commit is contained in:
WayofTime 2016-01-09 10:47:36 -05:00
parent 9eb49dd5a9
commit 61e6cf2a14
42 changed files with 334 additions and 339 deletions

View file

@ -11,11 +11,11 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.soul.ISoul;
import WayofTime.bloodmagic.api.soul.IDemonWill;
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import WayofTime.bloodmagic.util.helper.TextHelper;
public class ItemMonsterSoul extends Item implements ISoul
public class ItemMonsterSoul extends Item implements IDemonWill
{
public static String[] names = { "base" };
@ -47,13 +47,13 @@ public class ItemMonsterSoul extends Item implements ISoul
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
{
tooltip.add(TextHelper.localize("tooltip.BloodMagic.souls", getSouls(stack)));
tooltip.add(TextHelper.localize("tooltip.BloodMagic.will", getWill(stack)));
super.addInformation(stack, player, tooltip, advanced);
}
@Override
public double getSouls(ItemStack soulStack)
public double getWill(ItemStack soulStack)
{
NBTHelper.checkNBT(soulStack);
@ -63,7 +63,7 @@ public class ItemMonsterSoul extends Item implements ISoul
}
@Override
public void setSouls(ItemStack soulStack, double souls)
public void setWill(ItemStack soulStack, double souls)
{
NBTHelper.checkNBT(soulStack);
@ -73,21 +73,21 @@ public class ItemMonsterSoul extends Item implements ISoul
}
@Override
public double drainSouls(ItemStack soulStack, double drainAmount)
public double drainWill(ItemStack soulStack, double drainAmount)
{
double souls = getSouls(soulStack);
double souls = getWill(soulStack);
double soulsDrained = Math.min(drainAmount, souls);
setSouls(soulStack, souls - soulsDrained);
setWill(soulStack, souls - soulsDrained);
return soulsDrained;
}
@Override
public ItemStack createSoul(int meta, double number)
public ItemStack createWill(int meta, double number)
{
ItemStack soulStack = new ItemStack(this, 1, meta);
setSouls(soulStack, number);
setWill(soulStack, number);
return soulStack;
}
}

View file

@ -15,14 +15,14 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.entity.projectile.EntitySoulArrow;
import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
public class ItemSoulBow extends ItemBow
public class ItemSentientBow extends ItemBow
{
public ItemSoulBow()
public ItemSentientBow()
{
super();
setUnlocalizedName(Constants.Mod.MODID + ".soulBow");
setUnlocalizedName(Constants.Mod.MODID + ".sentientBow");
this.setCreativeTab(BloodMagic.tabBloodMagic);
}
@ -51,7 +51,7 @@ public class ItemSoulBow extends ItemBow
f = 1.0F;
}
EntityArrow entityarrow = new EntitySoulArrow(worldIn, playerIn, f * 2.0F, 0);
EntityArrow entityarrow = new EntitySentientArrow(worldIn, playerIn, f * 2.0F, 0);
if (f == 1.0F)
{
@ -109,13 +109,13 @@ public class ItemSoulBow extends ItemBow
if (i >= 18)
{
return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_2", "inventory");
return new ModelResourceLocation("bloodmagic:ItemSentientBow_pulling_2", "inventory");
} else if (i > 13)
{
return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_1", "inventory");
return new ModelResourceLocation("bloodmagic:ItemSentientBow_pulling_1", "inventory");
} else if (i > 0)
{
return new ModelResourceLocation("bloodmagic:ItemSoulBow_pulling_0", "inventory");
return new ModelResourceLocation("bloodmagic:ItemSentientBow_pulling_0", "inventory");
}
return null;

View file

@ -17,9 +17,9 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.soul.ISoul;
import WayofTime.bloodmagic.api.soul.ISoulWeapon;
import WayofTime.bloodmagic.api.soul.PlayerSoulHandler;
import WayofTime.bloodmagic.api.soul.IDemonWill;
import WayofTime.bloodmagic.api.soul.IDemonWillWeapon;
import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler;
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import WayofTime.bloodmagic.registry.ModItems;
import WayofTime.bloodmagic.util.helper.TextHelper;
@ -27,17 +27,17 @@ import WayofTime.bloodmagic.util.helper.TextHelper;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
public class ItemSoulSword extends ItemSword implements ISoulWeapon
public class ItemSentientSword extends ItemSword implements IDemonWillWeapon
{
public int[] soulBracket = new int[] { 16 };
public double[] damageAdded = new double[] { 1 };
public double[] soulDrainPerSwing = new double[] { 0.1 };
public ItemSoulSword()
public ItemSentientSword()
{
super(ModItems.soulToolMaterial);
setUnlocalizedName(Constants.Mod.MODID + ".soul.sword");
setUnlocalizedName(Constants.Mod.MODID + ".sentientSword");
setHasSubtypes(true);
setNoRepair();
setCreativeTab(BloodMagic.tabBloodMagic);
@ -51,7 +51,7 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon
if (getActivated(stack))
{
double soulsRemaining = PlayerSoulHandler.getTotalSouls(player);
double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(player);
int level = getLevel(stack, soulsRemaining);
double drain = level >= 0 ? soulDrainPerSwing[level] : 0;
@ -90,7 +90,7 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon
{
NBTHelper.checkNBT(stack);
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.soul.sword.desc"));
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sentientSword.desc"));
if (getActivated(stack))
tooltip.add(TextHelper.localize("tooltip.BloodMagic.activated"));
@ -107,7 +107,7 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon
double drain = this.getDrainOfActivatedSword(stack);
if (drain > 0)
{
double soulsRemaining = PlayerSoulHandler.getTotalSouls(player);
double soulsRemaining = PlayerDemonWillHandler.getTotalDemonWill(player);
if (drain > soulsRemaining)
{
@ -115,7 +115,7 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon
return false;
} else
{
PlayerSoulHandler.consumeSouls(player, drain);
PlayerDemonWillHandler.consumeDemonWill(player, drain);
}
}
@ -138,17 +138,17 @@ public class ItemSoulSword extends ItemSword implements ISoulWeapon
}
@Override
public List<ItemStack> getRandomSoulDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting)
public List<ItemStack> getRandomDemonWillDrop(EntityLivingBase killedEntity, EntityLivingBase attackingEntity, ItemStack stack, int looting)
{
List<ItemStack> soulList = new ArrayList<ItemStack>();
if (getActivated(stack))
{
ISoul soul = ((ISoul) ModItems.monsterSoul);
IDemonWill soul = ((IDemonWill) ModItems.monsterSoul);
for (int i = 0; i <= looting; i++)
{
ItemStack soulStack = soul.createSoul(0, (getDamageOfActivatedSword(stack) - 7) / 2 * attackingEntity.worldObj.rand.nextDouble() + 0.5);
ItemStack soulStack = soul.createWill(0, (getDamageOfActivatedSword(stack) - 7) / 2 * attackingEntity.worldObj.rand.nextDouble() + 0.5);
soulList.add(soulStack);
}
}

View file

@ -11,12 +11,12 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.soul.ISoul;
import WayofTime.bloodmagic.api.soul.ISoulGem;
import WayofTime.bloodmagic.api.soul.IDemonWill;
import WayofTime.bloodmagic.api.soul.IDemonWillGem;
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import WayofTime.bloodmagic.util.helper.TextHelper;
public class ItemSoulGem extends Item implements ISoulGem
public class ItemSoulGem extends Item implements IDemonWillGem
{
public static String[] names = { "petty", "lesser", "common", "greater", "grand" };
@ -49,7 +49,7 @@ public class ItemSoulGem extends Item implements ISoulGem
for (int i = 0; i < names.length; i++)
{
ItemStack stack = new ItemStack(this, 1, i);
this.setSouls(stack, this.getMaxSouls(stack));
this.setWill(stack, this.getMaxWill(stack));
list.add(stack);
}
}
@ -59,26 +59,26 @@ public class ItemSoulGem extends Item implements ISoulGem
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
{
tooltip.add(TextHelper.localize("tooltip.BloodMagic.soulGem." + names[stack.getItemDamage()]));
tooltip.add(TextHelper.localize("tooltip.BloodMagic.souls", getSouls(stack)));
tooltip.add(TextHelper.localize("tooltip.BloodMagic.will", getWill(stack)));
super.addInformation(stack, player, tooltip, advanced);
}
@Override
public ItemStack fillSoulGem(ItemStack soulGemStack, ItemStack soulStack)
public ItemStack fillDemonWillGem(ItemStack soulGemStack, ItemStack soulStack)
{
if (soulStack != null && soulStack.getItem() instanceof ISoul)
if (soulStack != null && soulStack.getItem() instanceof IDemonWill)
{
ISoul soul = (ISoul) soulStack.getItem();
double soulsLeft = getSouls(soulGemStack);
IDemonWill soul = (IDemonWill) soulStack.getItem();
double soulsLeft = getWill(soulGemStack);
if (soulsLeft < getMaxSouls(soulGemStack))
if (soulsLeft < getMaxWill(soulGemStack))
{
double newSoulsLeft = Math.min(soulsLeft + soul.getSouls(soulStack), getMaxSouls(soulGemStack));
soul.drainSouls(soulStack, newSoulsLeft - soulsLeft);
double newSoulsLeft = Math.min(soulsLeft + soul.getWill(soulStack), getMaxWill(soulGemStack));
soul.drainWill(soulStack, newSoulsLeft - soulsLeft);
setSouls(soulGemStack, newSoulsLeft);
if (soul.getSouls(soulStack) <= 0)
setWill(soulGemStack, newSoulsLeft);
if (soul.getWill(soulStack) <= 0)
{
return null;
}
@ -89,7 +89,7 @@ public class ItemSoulGem extends Item implements ISoulGem
}
@Override
public double getSouls(ItemStack soulGemStack)
public double getWill(ItemStack soulGemStack)
{
NBTHelper.checkNBT(soulGemStack);
@ -99,7 +99,7 @@ public class ItemSoulGem extends Item implements ISoulGem
}
@Override
public void setSouls(ItemStack soulGemStack, double souls)
public void setWill(ItemStack soulGemStack, double souls)
{
NBTHelper.checkNBT(soulGemStack);
@ -109,18 +109,18 @@ public class ItemSoulGem extends Item implements ISoulGem
}
@Override
public double drainSouls(ItemStack soulGemStack, double drainAmount)
public double drainWill(ItemStack soulGemStack, double drainAmount)
{
double souls = getSouls(soulGemStack);
double souls = getWill(soulGemStack);
double soulsDrained = Math.min(drainAmount, souls);
setSouls(soulGemStack, souls - soulsDrained);
setWill(soulGemStack, souls - soulsDrained);
return soulsDrained;
}
@Override
public int getMaxSouls(ItemStack soulGemStack)
public int getMaxWill(ItemStack soulGemStack)
{
switch (soulGemStack.getMetadata())
{