#stage recipes

20 messages · Page 1 of 1 (latest)

tulip hornet
#
event.shapeless('1x minecraft:dark_oak_sapling', ['minecraft:jungle_sapling']).stage('superflat_recipes')
event.shapeless('1x minecraft:dark_oak_sapling', ['minecraft:jungle_sapling']).stage('skyblock_recipes')

basically i have a couple of world types for my next modpack and i wanted world type specific recipes, the problem i have is if the recipe is the same as shown above only the first recipe will work the second one does not

frosty fogBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

dire tartan
#

what about storing a 'setting' variable of some sort to a json file, read it in during startup, and assign it to a global variable...
then in your recipes do

if (global.levelType == 'levelType') {
  event.shapeless()
} else if (global.levelType == 'levelType2') {
  event.shapeless()
}
jovial bison
dire tartan
#

you could, of a sort, read the world type on the world being loaded (this is after the recipe event) and trigger a reload if it's not the same world type as stored

jovial bison
#

maybe using the server's persistant data would work, but I don't know if you can read it in the recipes event

dire tartan
#

no, because the world isn't read yet

jovial bison
#

recipesAfterLoad?

dire tartan
#

that's the end of the recipes event not after the server is loaded, and you can't add recipes

jovial bison
#

ah, ok

jovial bison
#

so, coming back to the original idea of using stages - you can use them, however it requires the gamestages api (and from my testing, the recipe stages mod)

#

however (I don't know why) it requires JEI?

tulip hornet
#

a should clarify i do have the stages already being assigned to the players depending on the world type, other recipes that have the stage works but recipes that are the same across different stages do not work

dire tartan
#

giving them unique ids looks like it's working for me

event.shapeless('1x minecraft:dark_oak_sapling', ['minecraft:jungle_sapling']).id('kubejs:superflat/dark_oak').stage('superflat_recipes')
event.shapeless('1x minecraft:dark_oak_sapling', ['minecraft:jungle_sapling']).id('kubejs:skyblock/dark_oak').stage('skyblock_recipes')
tulip hornet
#

i did have unique ids as well but it wouldn't work for me

#

does it show when you only have one of the gamestages and not both?

jovial bison
#

if you apply two stages to a recipe, then both

dire tartan
#

yeah I get either individual recipe with only one of the stages