Skip to content

Commit

Permalink
Revert "moved compare to implementation"
Browse files Browse the repository at this point in the history
This reverts commit baf68a6.
  • Loading branch information
Faithcaio committed May 1, 2023
1 parent baf68a6 commit 74718be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/org/spongepowered/api/MinecraftVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,12 @@ public interface MinecraftVersion extends Comparable<MinecraftVersion> {
*/
OptionalInt dataVersion();

@Override
default int compareTo(MinecraftVersion o) {
final int result = Boolean.compare(this.isLegacy(), o.isLegacy());
if (result != 0) {
return result;
}
return this.protocolVersion() - o.protocolVersion();
}
}

0 comments on commit 74718be

Please sign in to comment.