A whole lot of formatting cleanup

Also changes NBTHolder to a standard Constants class with subclasses for each category
This commit is contained in:
Nick 2015-11-28 18:25:46 -08:00
parent f9802900db
commit 34dee6447b
74 changed files with 861 additions and 662 deletions

View file

@ -1,14 +1,15 @@
package WayofTime.bloodmagic.api.util.helper;
import WayofTime.bloodmagic.api.NBTHolder;
import WayofTime.bloodmagic.api.Constants;
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_INCENSE)) {
return data.getFloat(NBTHolder.NBT_CURRENT_INCENSE);
if (data.hasKey(Constants.NBT.CURRENT_INCENSE)) {
return data.getFloat(Constants.NBT.CURRENT_INCENSE);
}
return 0;
@ -16,6 +17,6 @@ public class IncenseHelper {
public static void setCurrentIncense(EntityPlayer player, float amount) {
NBTTagCompound data = player.getEntityData();
data.setFloat(NBTHolder.NBT_CURRENT_INCENSE, amount);
data.setFloat(Constants.NBT.CURRENT_INCENSE, amount);
}
}