Esempio n. 1
0
 @Override
 public void readFromNBT(NBTTagCompound tagCompound) {
   super.readFromNBT(tagCompound);
   link = new Vector4(tagCompound.getCompoundTag("link"));
   noEnergy = tagCompound.getBoolean("noEnergy");
   storage.readFromNBT(tagCompound);
 }
Esempio n. 2
0
 @Override
 public void writeToNBT(NBTTagCompound tagCompound) {
   super.writeToNBT(tagCompound);
   if (link != null) {
     NBTTagCompound linkTag = new NBTTagCompound();
     link.writeToNBT(linkTag);
     tagCompound.setTag("link", linkTag);
   }
   tagCompound.setBoolean("noEnergy", noEnergy);
   storage.writeToNBT(tagCompound);
 }