More work on the Item Experience Book. Changed the names of the Sanguimancy rituals to be more... majestic.
This commit is contained in:
parent
1d14692a93
commit
7a119adaf9
|
@ -58,6 +58,26 @@ public class ItemExperienceBook extends Item implements IVariantProvider
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void absorbOneLevelExpFromPlayer(ItemStack stack, EntityPlayer player)
|
||||||
|
{
|
||||||
|
float progress = player.experience;
|
||||||
|
if (progress > 0)
|
||||||
|
{
|
||||||
|
double expDeduction = getExperienceAcquiredToNext(player.experienceLevel, player.experience);
|
||||||
|
player.experience = 0;
|
||||||
|
player.experienceTotal -= (int) (expDeduction);
|
||||||
|
|
||||||
|
addExperience(stack, expDeduction);
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
player.experienceLevel--;
|
||||||
|
int expDeduction = getExperienceForNextLevel(player.experienceLevel - 1);
|
||||||
|
player.experienceTotal -= expDeduction;
|
||||||
|
|
||||||
|
addExperience(stack, expDeduction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void setStoredExperience(ItemStack stack, double exp)
|
public static void setStoredExperience(ItemStack stack, double exp)
|
||||||
{
|
{
|
||||||
NBTHelper.checkNBT(stack);
|
NBTHelper.checkNBT(stack);
|
||||||
|
|
|
@ -78,6 +78,7 @@ import WayofTime.bloodmagic.demonAura.WillChunk;
|
||||||
import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler;
|
import WayofTime.bloodmagic.demonAura.WorldDemonWillHandler;
|
||||||
import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
|
import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
|
||||||
import WayofTime.bloodmagic.item.ItemAltarMaker;
|
import WayofTime.bloodmagic.item.ItemAltarMaker;
|
||||||
|
import WayofTime.bloodmagic.item.ItemExperienceBook;
|
||||||
import WayofTime.bloodmagic.item.ItemInscriptionTool;
|
import WayofTime.bloodmagic.item.ItemInscriptionTool;
|
||||||
import WayofTime.bloodmagic.item.ItemUpgradeTome;
|
import WayofTime.bloodmagic.item.ItemUpgradeTome;
|
||||||
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
|
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
|
||||||
|
@ -787,5 +788,18 @@ public class EventHandler
|
||||||
StatTrackerExperience.incrementCounter(armour, event.getOrb().xpValue);
|
StatTrackerExperience.incrementCounter(armour, event.getOrb().xpValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!player.worldObj.isRemote)
|
||||||
|
{
|
||||||
|
for (ItemStack stack : player.inventory.mainInventory)
|
||||||
|
{
|
||||||
|
if (stack != null && stack.getItem() instanceof ItemExperienceBook)
|
||||||
|
{
|
||||||
|
ItemExperienceBook.addExperience(stack, event.getOrb().xpValue);
|
||||||
|
event.getOrb().xpValue = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -375,8 +375,8 @@ ritual.BloodMagic.animalGrowthRitual=Ritual of the Shepherd
|
||||||
ritual.BloodMagic.forsakenSoulRitual=Gathering of the Forsaken Souls
|
ritual.BloodMagic.forsakenSoulRitual=Gathering of the Forsaken Souls
|
||||||
|
|
||||||
ritual.BloodMagic.cobblestoneRitual=Le Vulcanos Frigius
|
ritual.BloodMagic.cobblestoneRitual=Le Vulcanos Frigius
|
||||||
ritual.BloodMagic.placerRitual=The Filler
|
ritual.BloodMagic.placerRitual=Laying of the Filler
|
||||||
ritual.BloodMagic.fellingRitual=The Timberman
|
ritual.BloodMagic.fellingRitual=Crash of the Timberman
|
||||||
ritual.BloodMagic.pumpRitual=Hymn of Siphoning
|
ritual.BloodMagic.pumpRitual=Hymn of Siphoning
|
||||||
ritual.BloodMagic.altarBuilderRitual=The Assembly of the High Altar
|
ritual.BloodMagic.altarBuilderRitual=The Assembly of the High Altar
|
||||||
ritual.BloodMagic.portalRitual=The Gate of the Fold
|
ritual.BloodMagic.portalRitual=The Gate of the Fold
|
||||||
|
|
Loading…
Reference in a new issue