• Type: New Feature
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • 4440-Spigot-e5a64e7-43f66f6
    • Yes

      Currently, the sorting of recipes in the Stonecutter is random (after a server restart, the recipes are in a different position again). It would be great if you could sort them yourself.

          [SPIGOT-8012] Option for Sorting Recipes

          md_5 added a comment -

          I cannot reproduce on 4442-Spigot-e5a64e7-42a4fa9. The order is always last to first (zombies, bedwards, battle royal .. 1v1) which is intended by the code I committed.

          https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/42a4fa96f046d64dc2afff971d4a0dc26a1ba4b9#nms-patches%2Fnet%2Fminecraft%2Fworld%2Fitem%2Fcrafting%2FRecipeMap.patch?t=44

          md_5 added a comment - I cannot reproduce on 4442-Spigot-e5a64e7-42a4fa9. The order is always last to first (zombies, bedwards, battle royal .. 1v1) which is intended by the code I committed. https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/42a4fa96f046d64dc2afff971d4a0dc26a1ba4b9#nms-patches%2Fnet%2Fminecraft%2Fworld%2Fitem%2Fcrafting%2FRecipeMap.patch?t=44

          I used the version 4442-Spigot-e5a64e7-42a4fa9

          Eisbaer Shirokuma added a comment - I used the version 4442-Spigot-e5a64e7-42a4fa9

          md_5 added a comment -

          Did you try the build released last night?

          md_5 added a comment - Did you try the build released last night?

          As expample i use this code (kotlin):

          fun createGamemodeRecipes() {
              try {
                  val gameModes = listOf(
                      "1vs1" to oneVsOneItem,
                      "assassins" to assassinsItem,
                      "battleRoyale" to battleRoyaleItem,
                      "bedwars" to bedwarsItem,
                      "zombies" to zombiesItem
                  )
                  gameModes.forEach { (key, item) ->
                      val namespacedKey = NamespacedKey(NvMHub.instance, key)
                      val recipe = StonecuttingRecipe(namespacedKey, item, Material.RECOVERY_COMPASS)
                      Bukkit.addRecipe(recipe)
                  }
              } catch (e: Exception) {
                  Bukkit.getLogger().severe(e.toString())
              }
          } 

          The first item in Stonecuter is the zombies item not the oneVsOneItem

          Eisbaer Shirokuma added a comment - As expample i use this code (kotlin): fun createGamemodeRecipes() { try { val gameModes = listOf( "1vs1" to oneVsOneItem, "assassins" to assassinsItem, "battleRoyale" to battleRoyaleItem, "bedwars" to bedwarsItem, "zombies" to zombiesItem ) gameModes.forEach { (key, item) -> val namespacedKey = NamespacedKey(NvMHub.instance, key) val recipe = StonecuttingRecipe(namespacedKey, item, Material.RECOVERY_COMPASS) Bukkit.addRecipe(recipe) } } catch (e: Exception) { Bukkit.getLogger().severe(e.toString()) } } The first item in Stonecuter is the zombies item not the oneVsOneItem

          md_5 added a comment -

          Should be resolved. If not, please can you give more detailed reproduction steps

          md_5 added a comment - Should be resolved. If not, please can you give more detailed reproduction steps

          Eisbaer Shirokuma added a comment - - edited

          That would be also good

          Eisbaer Shirokuma added a comment - - edited That would be also good

          md_5 added a comment -

          Any reason why it shouldn't just be done by insertion order? Like crafting recipes?

          md_5 added a comment - Any reason why it shouldn't just be done by insertion order? Like crafting recipes?

            Assignee:
            Unassigned
            Reporter:
            Eisbaer Shirokuma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: