public static Boolean Equals(NBTTagCompound A, NBTTagCompound B) { Int32 Value = 0; if (A != null) { Value++; } if (B != null) { Value++; } if (Value == 0) { return(true); } if (Value == 1) { return(false); } if (A.Count != B.Count || A.Name != B.Name) { return(false); } for (Int32 I = 0; I < A.Count; I++) { ITag Item = A[I]; ITag Compare = B[Item.Name]; if (Item == null || !Item.Equals(Compare)) { return(false); } } return(true); }