Example #1
0
 public override NbtCompound writeToNbt(NbtCompound tag)
 {
     base.writeToNbt(tag);
     NbtHelper.writeDirectBlockPos(tag, this.end, "end");
     tag.Add(new NbtInt("pointing", this.pointing.index - 1));
     tag.Add(new NbtByte("3High", (byte)(this.is3High ? 1 : 0)));
     return(tag);
 }
Example #2
0
        public NbtCompound writeToNbt()
        {
            NbtCompound tag = new NbtCompound();

            tag.Add(new NbtFloat("timeUntil", this.timeUntil));
            NbtHelper.writeDirectBlockPos(tag, this.pos, "pos");
            return(tag);
        }
Example #3
0
 public override NbtCompound writeToNbt(NbtCompound tag)
 {
     base.writeToNbt(tag);
     NbtHelper.writeDirectBlockPos(tag, this.orgin, "center");
     tag.Add(new NbtInt("topFloor", this.topFloor));
     tag.Add(new NbtInt("bottomFloor", this.bottomFloor));
     tag.Add(new NbtByte("useFarEntrance", this.useFartherEntrance ? (byte)1 : (byte)0));
     tag.Add(new NbtByte("isTall", this.isTall ? (byte)1 : (byte)0));
     return(tag);
 }
Example #4
0
        public override NbtCompound writeToNbt(NbtCompound tag)
        {
            NbtHelper.writeDirectBlockPos(tag, this.shaftOrgin, "orgin");

            NbtList nbtList = new NbtList("pieces", NbtTagType.Compound);

            foreach (PieceBase p in this.pieces)
            {
                nbtList.Add(p.writeToNbt(new NbtCompound()));
            }
            tag.Add(nbtList);

            return(base.writeToNbt(tag));
        }
Example #5
0
        public override NbtCompound writeToNbt(NbtCompound tag)
        {
            base.writeToNbt(tag);

            tag.Add(new NbtInt("blockId", this.block.id));
            tag.Add(new NbtInt("meta", this.meta));
            if (this.blockNbt != null)
            {
                tag.Add(new NbtCompound("blockNbt", this.blockNbt));
            }
            NbtHelper.writeDirectBlockPos(tag, this.startPos, "start");

            return(tag);
        }
Example #6
0
 /// <summary>
 /// Called to save the piece to disk.
 /// </summary>
 public virtual NbtCompound writeToNbt(NbtCompound tag)
 {
     tag.Add(new NbtByte("id", this.getPieceId()));
     NbtHelper.writeDirectBlockPos(tag, this.orgin, "orgin");
     return(tag);
 }