diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemFixerUpper.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemFixerUpper.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemFixerUpper.java index 68aa42e2..cc7b216c 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemFixerUpper.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/itemlist/ItemFixerUpper.java @@ -328,12 +328,12 @@ public class ItemFixerUpper { //to use the general color variants we need to reverse the order because Minecraft decided so for some reason case "minecraft:banner" -> id.replaceFirst(":", COLOR_VARIANTS[15 - damage]); case "minecraft:carpet", "minecraft:stained_glass", "minecraft:stained_glass_pane", "minecraft:wool" -> id.replaceFirst(":", COLOR_VARIANTS[damage]); - //for the terracotta we need to replace the "stained_hardened_clay" with "terracotta" as well as doing the color separation - case "minecraft:stained_hardened_clay" -> id.replaceFirst(":", COLOR_VARIANTS[damage]).replaceFirst("stained_hardened_clay", "terracotta"); + //for the terracotta we replace the whole name by the color and append "terracotta" at the end + case "minecraft:stained_hardened_clay" -> id.replaceFirst(":stained_hardened_clay", COLOR_VARIANTS[damage]) + "terracotta"; //for the wooden slab we need to remove the "wooden_" prefix, but otherwise it's the same, so I just combined them anyway - case "minecraft:leaves", "minecraft:planks", "minecraft:sapling", "minecraft:wooden_slab" -> id.replaceFirst(":", WOOD_VARIANTS[damage]).replaceFirst("wooden_", ""); - //here we strip the last character which is 2 because we need leaves2 to be leaves - case "minecraft:leaves2" -> id.replaceFirst(":", WOOD_VARIANTS[damage + 4]).substring(0, id.length() - 1); + case "minecraft:leaves", "minecraft:planks", "minecraft:sapling", "minecraft:wooden_slab" -> id.replaceFirst(":(?:wooden_)?", WOOD_VARIANTS[damage]); + //here we replace the 2 by nothing to remove it as it's not needed anymore + case "minecraft:leaves2" -> id.replaceFirst(":", WOOD_VARIANTS[damage + 4]).replaceFirst("2", ""); //the default case is just a rename or no change default -> RENAMED.getOrDefault(id, id); }; |