Skip to content

Commit

Permalink
fix a small bug about wood type sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
IchHabeHunger54 committed Oct 15, 2024
1 parent e1ed3e4 commit e279492
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ public Collection<BibliocraftWoodType> getAll() {
}

private static int compareRLMinecraftFirst(ResourceLocation a, ResourceLocation b) {
if (a.equals(b)) return 0;
String namespaceA = a.getNamespace(), namespaceB = b.getNamespace();
if (namespaceA.equals(namespaceB)) return 0;
if (namespaceA.equals("minecraft")) return -1;
if (namespaceB.equals("minecraft")) return 1;
int i = namespaceA.compareTo(namespaceB);
return i == 0 ? 1 : i;
return namespaceA.compareTo(namespaceB);
}
}

0 comments on commit e279492

Please sign in to comment.