Пример #1
0
 @Override
 public NBTTagCompound writeToNBT(NBTTagCompound compound) {
   NBTHelper.setInt(compound, "energy", energy.getEnergyStored());
   return super.writeToNBT(compound);
 }
Пример #2
0
 @Override
 public void readFromNBT(NBTTagCompound compound) {
   energy.setEnergyStored(NBTHelper.getInt(compound, "energy"));
   super.readFromNBT(compound);
 }