Sacrificial Commit

This commit is contained in:
Arcaratus 2015-11-07 11:51:41 -05:00
parent bf912ae03f
commit 2fc34a5138
12 changed files with 531 additions and 10 deletions

View file

@ -0,0 +1,21 @@
package WayofTime.bloodmagic.api.util.helper;
import WayofTime.bloodmagic.api.NBTHolder;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
public class IncenseHelper {
public static float getCurrentIncense(EntityPlayer player) {
NBTTagCompound data = player.getEntityData();
if (data.hasKey(NBTHolder.NBT_CURRENT_INSENCE)) {
return data.getFloat(NBTHolder.NBT_CURRENT_INSENCE);
}
return 0;
}
public static void setCurrentIncense(EntityPlayer player, float amount) {
NBTTagCompound data = player.getEntityData();
data.setFloat(NBTHolder.NBT_CURRENT_INSENCE, amount);
}
}