Example #1
0
 public void ChangeDamage(short newDmg)
 {
     Damage = newDmg;
     if (NbtItem.Get <NbtCompound>("tag") == null)
     {
         NbtItem.Add(new NbtCompound("tag"));
     }
     if (NbtItem.Get <NbtCompound>("tag").Get <NbtShort>("Damage") == null)
     {
         NbtItem.Get <NbtCompound>("tag").Add(new NbtInt("Damage", 0));
     }
     NbtItem.Get <NbtCompound>("tag").Get <NbtInt>("Damage").Value = newDmg;
 }
Example #2
0
 public void ChangeCount(byte newCount)
 {
     Count = newCount;
     NbtItem.Get <NbtByte>("Count").Value = newCount;
 }
Example #3
0
 public void ChangeSlot(byte newSlot)
 {
     Slot = newSlot;
     NbtItem.Get <NbtByte>("Slot").Value = newSlot;
 }