From e2794925e850e9fd01d76f84c3da530c7780b7fc Mon Sep 17 00:00:00 2001 From: IchHabeHunger54 Date: Tue, 15 Oct 2024 20:18:53 +0200 Subject: [PATCH] fix a small bug about wood type sorting --- .../bibliocraft/apiimpl/BibliocraftWoodTypeRegistryImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/github/minecraftschurlimods/bibliocraft/apiimpl/BibliocraftWoodTypeRegistryImpl.java b/src/main/java/com/github/minecraftschurlimods/bibliocraft/apiimpl/BibliocraftWoodTypeRegistryImpl.java index 37d99e72..b06e63d9 100644 --- a/src/main/java/com/github/minecraftschurlimods/bibliocraft/apiimpl/BibliocraftWoodTypeRegistryImpl.java +++ b/src/main/java/com/github/minecraftschurlimods/bibliocraft/apiimpl/BibliocraftWoodTypeRegistryImpl.java @@ -48,11 +48,10 @@ public Collection 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); } }