diff options
| author | Twarug <patryk@twardosz.dev> | 2025-08-12 01:56:23 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-08-24 15:18:01 +0200 |
| commit | f8e0ec50f0f3bbfb8638dfc2ee0edf2da1a94521 (patch) | |
| tree | 5d1422ddd214a071b22a60278f0a5219e9f23360 | |
| parent | 4f7c55e460b54aee664cbac5e68dcd30abdba714 (diff) | |
| download | Firmament-f8e0ec50f0f3bbfb8638dfc2ee0edf2da1a94521.tar.gz Firmament-f8e0ec50f0f3bbfb8638dfc2ee0edf2da1a94521.tar.bz2 Firmament-f8e0ec50f0f3bbfb8638dfc2ee0edf2da1a94521.zip | |
Remove recipes extraText parsing
| -rw-r--r-- | src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt | 17 | ||||
| -rw-r--r-- | src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt | 15 | ||||
| -rw-r--r-- | translations/en_us.json | 1 |
3 files changed, 7 insertions, 26 deletions
diff --git a/src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt b/src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt index 01d9b7c..37994ca 100644 --- a/src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt +++ b/src/main/kotlin/repo/recipes/SBCraftingRecipeRenderer.kt @@ -23,19 +23,10 @@ object SBCraftingRecipeRenderer : GenericRecipeRenderer<NEUCraftingRecipe> { val arrow = layouter.createArrow(point.x + 60, point.y + 18) if (recipe.extraText != null && recipe.extraText!!.isNotBlank()) { - val parts = recipe.extraText!!.split(' ') - - if (parts.size >= 3) { - val requirement = parts.drop(1).joinToString(separator = " ") - - layouter.createTooltip( - arrow, - Text.stringifiedTranslatable( - "firmament.recipe.requirement", - requirement - ) - ) - } + layouter.createTooltip( + arrow, + Text.of(recipe.extraText!!), + ) } for (i in 0 until 3) { diff --git a/src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt b/src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt index c4fce04..343493a 100644 --- a/src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt +++ b/src/main/kotlin/repo/recipes/SBForgeRecipeRenderer.kt @@ -30,18 +30,9 @@ object SBForgeRecipeRenderer : GenericRecipeRenderer<NEUForgeRecipe> { )) if (recipe.extraText != null && recipe.extraText!!.isNotBlank()) { - val parts = recipe.extraText!!.split(' ') - - if (parts.size >= 3) { - val requirement = parts.drop(1).joinToString(separator = " ") - - tooltip - .append(Text.of("\n")) - .append(Text.stringifiedTranslatable( - "firmament.recipe.requirement", - requirement, - )) - } + tooltip + .append(Text.of("\n")) + .append(Text.of(recipe.extraText)) } layouter.createTooltip(arrow, tooltip) diff --git a/translations/en_us.json b/translations/en_us.json index dc18aed..f9ec850 100644 --- a/translations/en_us.json +++ b/translations/en_us.json @@ -511,7 +511,6 @@ "firmament.recipe.mobs.name": "§8[§7Lv %d§8] §c%s", "firmament.recipe.mobs.name.nolevel": "§c%s", "firmament.recipe.novanilla": "Hypixel cannot super craft vanilla recipes", - "firmament.recipe.requirement": "Requires: %s", "firmament.reiwarning": "Firmament needs RoughlyEnoughItems to display its item list!", "firmament.reiwarning.disable": "Click here to disable this warning", "firmament.reiwarning.disabled": "Disabled the RoughlyEnoughItems warning. Keep in mind that you will not have an item list without REI.", |
