コード例 #1
0
 @Override
 public void markDirty() {
   this.writeToNBT(Platform.openNbtData(this.is), "upgrades");
 }
 private double getInternal(ItemStack is) {
   final NBTTagCompound nbt = Platform.openNbtData(is);
   return nbt.getDouble("internalCurrentPower");
 }
コード例 #3
0
 public CellUpgrades(final ItemStack is, final int upgrades) {
   super(is, null, upgrades);
   this.is = is;
   this.readFromNBT(Platform.openNbtData(is), "upgrades");
 }
 private void setInternal(ItemStack is, double amt) {
   final NBTTagCompound nbt = Platform.openNbtData(is);
   nbt.setDouble("internalCurrentPower", amt);
 }