Created visual niceties when an item uses/contains a different will type.
This commit is contained in:
parent
09e90f93c3
commit
4ea3e0ca92
9 changed files with 349 additions and 117 deletions
src/main/java/WayofTime/bloodmagic/api
|
@ -0,0 +1,9 @@
|
|||
package WayofTime.bloodmagic.api.iface;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.bloodmagic.api.soul.EnumDemonWillType;
|
||||
|
||||
public interface IMultiWillTool
|
||||
{
|
||||
public EnumDemonWillType getCurrentType(ItemStack stack);
|
||||
}
|
|
@ -43,6 +43,23 @@ public class PlayerDemonWillHandler
|
|||
return souls;
|
||||
}
|
||||
|
||||
public static EnumDemonWillType getLargestWillType(EntityPlayer player)
|
||||
{
|
||||
EnumDemonWillType type = EnumDemonWillType.DEFAULT;
|
||||
double max = 0;
|
||||
|
||||
for (EnumDemonWillType testType : EnumDemonWillType.values())
|
||||
{
|
||||
double value = getTotalDemonWill(testType, player);
|
||||
if (value > max)
|
||||
{
|
||||
type = testType;
|
||||
}
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the player's Tartaric gems are completely full.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue