mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 15:33:06 +00:00
Finished double conversion.
This commit is contained in:
1 parent
d4ab76990b
commit
fc64bf76ea
7 files changed
+29
-29
No files matched your search
@@ -41,20 +41,20 @@ public class PowerHandlerUtil {
|
||||
|
||||
}
|
||||
|
||||
public static float getStoredEnergyForItem(ItemStack item) {
|
||||
public static double getStoredEnergyForItem(ItemStack item) {
|
||||
NBTTagCompound tag = item.getTagCompound();
|
||||
if(tag == null) {
|
||||
return 0;
|
||||
}
|
||||
return tag.getFloat("storedEnergy");
|
||||
return tag.getDouble("storedEnergy");
|
||||
}
|
||||
|
||||
public static void setStoredEnergyForItem(ItemStack item, float storedEnergy) {
|
||||
public static void setStoredEnergyForItem(ItemStack item, double storedEnergy) {
|
||||
NBTTagCompound tag = item.getTagCompound();
|
||||
if(tag == null) {
|
||||
tag = new NBTTagCompound();
|
||||
}
|
||||
tag.setFloat("storedEnergy", storedEnergy);
|
||||
tag.setDouble("storedEnergy", storedEnergy);
|
||||
item.setTagCompound(tag);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user