aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/Texture Pack Format.md6
-rw-r--r--src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt13
2 files changed, 10 insertions, 9 deletions
diff --git a/docs/Texture Pack Format.md b/docs/Texture Pack Format.md
index b52c038..b0b135f 100644
--- a/docs/Texture Pack Format.md
+++ b/docs/Texture Pack Format.md
@@ -12,8 +12,10 @@ Find the internal id of the item. This is usually stored in the ExtraAttributes
keybinds). Once you found it, create an item model in a resource pack like you would for
a vanilla item model, but at the coordinate `firmskyblock:<internalid>`. So for an aspect of the end, this would be
`firmskyblock:models/item/aspect_of_the_end.json` (or `assets/firmskyblock/models/item/aspect_of_the_end.json`). Then,
-just use a normal minecraft item model. See https://github.com/romangraef/BadSkyblockTP/blob/master/assets/firmskyblock/models/item/magma_rod.json
-as an example.
+just use a normal minecraft item model. See https://github.com/nea89o/BadSkyblockTP/blob/master/assets/firmskyblock/models/item/magma_rod.json
+as an example. The id is first turned to lower case, then gets `:` replaced with `___`, `;` with `__` and all other
+characters that cannot be used in a minecraft resource location with `__XXXX` where `XXXX` is the 4 digit hex code for
+the character.
## (Placed) Skulls by texture id
diff --git a/src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt b/src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt
index 5aaa5fa..faad1cc 100644
--- a/src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt
+++ b/src/main/kotlin/gui/config/FirmamentConfigScreenProvider.kt
@@ -13,13 +13,12 @@ interface FirmamentConfigScreenProvider {
val providers by lazy {
allValidInstances
.filter { it.isEnabled }
- .sortedWith(Comparator.comparing(
- { it.key },
- Comparator<String> { left, right ->
- if (left == "builtin") return@Comparator -1
- if (right == "builtin") return@Comparator 1
- return@Comparator left.compareTo(right)
- })).toList()
+ .sortedWith(
+ Comparator
+ .comparing<FirmamentConfigScreenProvider, Boolean>({ it.key == "builtin" })
+ .reversed()
+ .then(Comparator.comparing({ it.key }))
+ ).toList()
}
}
}