예제 #1
0
 /// <summary>
 /// Returns the hash code for this item stack.
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = _Id.GetHashCode();
         hashCode = (hashCode * 397) ^ _Count.GetHashCode();
         hashCode = (hashCode * 397) ^ _Metadata.GetHashCode();
         hashCode = (hashCode * 397) ^ Index;
         hashCode = (hashCode * 397) ^ (Nbt != null ? Nbt.GetHashCode() : 0);
         return(hashCode);
     }
 }
예제 #2
0
 public override int GetHashCode() => ID.GetHashCode() ^ Damage.GetHashCode() ^ Count.GetHashCode() ^ Index.GetHashCode() ^ (Nbt?.GetHashCode() ?? 0);