MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / writeToNBT

Method writeToNBT

src/main/java/gregapi/fluid/FluidTankGT.java:70–80  ·  view source on GitHub ↗
(NBTTagCompound aNBT, String aKey)

Source from the content-addressed store, hash-verified

68 }
69
70 public NBTTagCompound writeToNBT(NBTTagCompound aNBT, String aKey) {
71 if (mFluid != null && (mPreventDraining || mAmount > 0)) {
72 NBTTagCompound tNBT = UT.NBT.make();
73 mFluid.amount = UT.Code.bindInt(mAmount);
74 aNBT.setTag(aKey, mFluid.writeToNBT(tNBT));
75 if (mAmount > Integer.MAX_VALUE) tNBT.setLong("LAmount", mAmount);
76 } else {
77 aNBT.removeTag(aKey);
78 }
79 return aNBT;
80 }
81
82 public NBTTagCompound writeToNBT(String aKey) {
83 NBTTagCompound aNBT = UT.NBT.make();

Callers 2

cupMethod · 0.95
generateMethod · 0.95

Calls 2

bindIntMethod · 0.80
makeMethod · 0.45

Tested by

no test coverage detected