Fixed capacitor being changed on crafted

This commit is contained in:
Calclavia 2013-08-05 12:41:38 -04:00
parent 2c023d4902
commit b6e5e22725

View file

@ -9,6 +9,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import resonantinduction.api.IBattery;
import resonantinduction.base.ItemBase;
@ -34,6 +35,12 @@ public class ItemCapacitor extends ItemBase implements IBattery
par3List.add("Energy: " + (int) energyStored + " KJ");
}
@Override
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
this.setEnergyStored(par1ItemStack, 0);
}
@Override
public void setEnergyStored(ItemStack itemStack, float amount)
{