@@ -0,0 +1,689 @@
+package net.shadowfacts.enfusion.energy;%0A%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraft.nbt.NBTTagCompound;%0A%0A/**%0A * @author shadowfacts%0A */%0Apublic class EnergyUtils %7B%0A%0A%09public static final String TAG_ENERGY = %22Energy%22;%0A%0A%09public static ItemStack setEnergyInStack(ItemStack stack, int energy) %7B%0A%09%09if (stack.stackTagCompound == null) stack.stackTagCompound = new NBTTagCompound();%0A%09%09stack.stackTagCompound.setInteger(TAG_ENERGY, energy);%0A%09%09return stack;%0A%09%7D%0A%0A%09public static int getEnergyInStack(ItemStack stack) %7B%0A%09%09if (stack.stackTagCompound == null %7C%7C !stack.stackTagCompound.hasKey(TAG_ENERGY)) %7B%0A%09%09%09return 0;%0A%09%09%7D%0A%09%09return stack.stackTagCompound.getInteger(TAG_ENERGY);%0A%09%7D%0A%0A%0A%0A%7D%0A

Add helper function to EnergyUtils