#is it possible to change mod names in code?

16 messages · Page 1 of 1 (latest)

smoky dome
#

i would like to be able to type mek instead of mekanism when makeing recipes example in scrreenshots.
it would be much easier and faster to type mekgen instead of mekanismgenerators and it would be harder to get wrong.
this is probably possible pretty easily but i dont know how...

earnest nacelleBOT
#

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

young thistle
#
let mc = 'minecraft:'
ServerEvents.recipes(event => {

    event.shapeless(
        Item.of(mc+'cobblestone', 3),
        [
          mc+'stone_pickaxe'
        ]
      )

  })
#

would this be what you are looking for?

smoky dome
#

yes but can i make it global? so it works for every folder i have

young thistle
#

you could put let mekgens = 'mekanismgenerators:' in every file it needs to be in

#

actually, it might work between files (i will test that)

young thistle
smoky dome
#

oh thanks

young thistle
#

i could edit the code so that you need to typemekgens(item) instead of mekgens+item if you wanted that?

smoky dome
#

sure

young thistle
#
    return 'minecraft:'+item
}```
#

should work

smoky dome
#

thanks