public override void readFromNbt(NbtCompound tag) { base.readFromNbt(tag); this.setTile( Block.getBlockFromId(tag.Get <NbtInt>("blockId").Value), tag.Get <NbtInt>("meta").Value); tag.TryGet <NbtCompound>("blockNbt", out this.blockNbt); this.startPos = NbtHelper.readDirectBlockPos(tag, "start"); }
public override void readFromNbt(NbtCompound tag) { this.shaftOrgin = NbtHelper.readDirectBlockPos(tag, "orgin"); foreach (NbtCompound compound in tag.Get <NbtList>("pieces")) { byte id = compound.Get <NbtByte>("id").ByteValue; PieceBase p = this.getPieceFromId(id, compound); if (p != null) { p.shaft = this; p.calculateBounds(); this.pieces.Add(p); } } }
public PieceHallway(NbtCompound tag) : base(tag) { this.end = NbtHelper.readDirectBlockPos(tag, "end"); this.pointing = Direction.all[tag.Get <NbtInt>("pointing").IntValue]; this.is3High = tag.Get <NbtByte>("3High").Value == 1; }
/// <summary> /// Constrcutor when loading a piece from the save. /// </summary> public PieceBase(NbtCompound tag) { this.orgin = NbtHelper.readDirectBlockPos(tag, "orgin"); }
public ScheduledTick(NbtCompound tag) { this.timeUntil = tag.Get <NbtFloat>("timeUntil").Value; this.pos = NbtHelper.readDirectBlockPos(tag, "pos"); }