public Furnace(int CX, int CY, int CS, LibNbt.Tags.NbtCompound c) : base(CX, CY, CS, c) { BurnTime = (c["BurnTime"] as NbtShort).Value; CookTime = (c["CookTime"] as NbtShort).Value; for (int i = 0; i < Slots.Length; i++) { try { if ((c["Items"] as NbtList).Tags[i]!=null) { NbtCompound cc = (NbtCompound)(c["Items"] as NbtList).Tags[i]; Slots[i] = new InventoryItem(); Slots[i].ID = cc.Get<NbtShort>("id").Value; Slots[i].Damage = cc.Get<NbtShort>("Damage").Value; Slots[i].Slot = 0; Slots[i].Count = cc.Get<NbtByte>("Count").Value; } } catch (Exception) { } } }
public Sign(LibNbt.Tags.NbtCompound c) : base(c) { for (int i = 0; i < 4; i++) { string tagID = string.Format("Text{0}", i + 1); Text[i] = c.Get<NbtString>(tagID).Value; } }
public Chest(int CX, int CY, int CS, LibNbt.Tags.NbtCompound c) : base(CX, CY, CS, c) { foreach (NbtCompound item in (c["Items"] as NbtList).Tags) { //NbtCompound item = (NbtCompound)itm; Inventory.Add(item); } }
public Chest(LibNbt.Tags.NbtCompound c) : base(c) { for(int i =0;i<54;i++) { try { NbtCompound item = (NbtCompound)(c["Items"] as NbtList)[i]; Inventory.Add(item); } catch (Exception) { } } }
public Vector3d(LibNbt.Tags.NbtList nbtList,bool flipYZ=false) { this.X = (nbtList[0] as NbtDouble).Value; double _Y = (nbtList[1] as NbtDouble).Value; double _Z = (nbtList[2] as NbtDouble).Value; if (flipYZ) { this.Z = _Y; this.Y = _Z; } else { this.Y = _Y; this.Z = _Z; } }
public MobSpawner(int CX, int CY, int CS, LibNbt.Tags.NbtCompound c) : base(CX, CY, CS, c) { EntityId=(c["EntityId"] as NbtString).Value; Delay = (c["Delay"] as NbtShort).Value; }
public MobSpawner(LibNbt.Tags.NbtCompound c) : base(c) { EntityId=(c["EntityId"] as NbtString).Value; Delay = (c["Delay"] as NbtShort).Value; }
public Vector3d(LibNbt.Tags.NbtList nbtList) { this.X = (nbtList[0] as NbtDouble).Value; this.Y = (nbtList[1] as NbtDouble).Value; this.Z = (nbtList[2] as NbtDouble).Value; }
public void ApplyCoordinatesToPos(LibNbt.Tags.NbtList pos) { (pos[0] as LibNbt.Tags.NbtDouble).Value = this.x; (pos[1] as LibNbt.Tags.NbtDouble).Value = this.y; (pos[2] as LibNbt.Tags.NbtDouble).Value = this.z; }
public Coordinates(LibNbt.Tags.NbtList pos) { x = (pos[0] as LibNbt.Tags.NbtDouble).Value; y = (pos[1] as LibNbt.Tags.NbtDouble).Value; z = (pos[2] as LibNbt.Tags.NbtDouble).Value; }