BloodMagic/src/main/java/WayofTime/bloodmagic/api/util/helper/IncenseHelper.java
Nick 6c729db70c Initial 1.9 commit
This DOES NOT BUILD. Do not even attempt.

Almost everything has been ported besides the block/item packages. Then it's a matter of testing what broke.
2016-03-17 13:00:46 -07:00

25 lines
709 B
Java

package WayofTime.bloodmagic.api.util.helper;
import WayofTime.bloodmagic.api.Constants;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
public class IncenseHelper
{
public static double getCurrentIncense(EntityPlayer player)
{
NBTTagCompound data = player.getEntityData();
if (data.hasKey(Constants.NBT.CURRENT_INCENSE))
{
return data.getDouble(Constants.NBT.CURRENT_INCENSE);
}
return 0;
}
public static void setCurrentIncense(EntityPlayer player, double amount)
{
NBTTagCompound data = player.getEntityData();
data.setDouble(Constants.NBT.CURRENT_INCENSE, amount);
}
}