/** Called when saving data. If overriding, remember to call this version */ public void writeToNBT(NBTTagCompound root) { root.setString("World", mLocation.getWorld().getName()); root.setDouble("X", mLocation.getX()); root.setDouble("Y", mLocation.getY()); root.setDouble("Z", mLocation.getZ()); Util.writeItemStackToNBT(mHoverItemTemplate, root); }
public void b(NBTTagCompound nbttagcompound) { nbttagcompound.setShort("xTile", (short) this.d); nbttagcompound.setShort("yTile", (short) this.e); nbttagcompound.setShort("zTile", (short) this.f); nbttagcompound.setByte("inTile", (byte) this.g); nbttagcompound.setByte("inData", (byte) this.h); nbttagcompound.setByte("shake", (byte) this.shake); nbttagcompound.setByte("inGround", (byte) (this.inGround ? 1 : 0)); nbttagcompound.setByte("pickup", (byte) this.fromPlayer); nbttagcompound.setDouble("damage", this.damage); }
protected void b(NBTTagCompound nbttagcompound) { nbttagcompound.setInt("Type", this.type); if (this.type == 2) { nbttagcompound.setDouble("PushX", this.b); nbttagcompound.setDouble("PushZ", this.c); nbttagcompound.setShort("Fuel", (short) this.e); } else if (this.type == 1) { NBTTagList nbttaglist = new NBTTagList(); for (int i = 0; i < this.items.length; ++i) { if (this.items[i] != null) { NBTTagCompound nbttagcompound1 = new NBTTagCompound(); nbttagcompound1.setByte("Slot", (byte) i); this.items[i].save(nbttagcompound1); nbttaglist.add(nbttagcompound1); } } nbttagcompound.set("Items", nbttaglist); } }
public void writeToNBT(NBTTagCompound var1) { var1.setDouble("i", this.x); var1.setDouble("j", this.y); var1.setDouble("k", this.z); }