예제 #1
0
        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)
                    {
                    }
            }
        }
예제 #2
0
파일: Sign.cs 프로젝트: N3X15/MineEdit
 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;
     }
 }
예제 #3
0
파일: Chest.cs 프로젝트: aphistic/MineEdit
 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);
     }
 }
예제 #4
0
파일: Chest.cs 프로젝트: aphistic/MineEdit
 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)
         {
         }
     }
 }
예제 #5
0
파일: Vector3d.cs 프로젝트: N3X15/MineEdit
 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;
     }
 }
예제 #6
0
 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;
 }
예제 #7
0
 public MobSpawner(LibNbt.Tags.NbtCompound c)
     : base(c)
 {
     EntityId=(c["EntityId"] as NbtString).Value;
     Delay = (c["Delay"] as NbtShort).Value;
 }
예제 #8
0
파일: Vector3d.cs 프로젝트: herpit/MineEdit
 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;
 }
예제 #10
0
 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;
 }