KubeJS

KubeJS

69M Downloads

No current method for custom, static recipe ID's

Nebby1999 opened this issue ยท 1 comments

commented

The title says it all.

A bit of backstory, I was working on a Patchouli book guide for a script pack I've made that bridges two mods together (Blood Magic & Mystical Agriculture). all was going well until I decided to copy my MultiMC Instance into a new one so i could tweak and polish the book, and remove unecesary lines of code in the scripts found in my instance folder's Kubejs.

Everything was going Dandy til i noticed the book didn't display the recipes properly, to my dismay i noticed that the Kubejs Recipe ID had changed.

//Code snippet from my Patchouli book, with 2 kubejs generated recipes.
		{
			"type":"crafting",
			"recipe":"minecraft:kubejs_generated_55_patchouli_guide_book",
			"recipe2":"minecraft:kubejs_generated_54_patchouli_guide_book"
		},

When i went ahead and checked the recipe ID, i noticed that the ID's where changed to "kubejs_generated_3" and "kubejs_generated_4"
While i may understand that Latvian decided to make the Recipe ID system in such a way that it generated the ID's automatically for the user, this is not helpful in this instance, as such, i would like to Suggest the following

Add a new string variable, completely optional, where the user could input their own recipe ID.
Once minecraft starts checking trecipes with the recipe Event, do the following (Pseudocode incoming)

If(r.customId = null)
{
     (Kubejs automated generated recipe ID goes here.
}
else
{
     registeredRecipeID = "kubejs_generated_" + r.customId
}

I have no clue wether something like this is possible, but i do belive it would be helpful and make Kubejs More user friendly.

Thank you for reading this.

commented

Issue closed, there wasn't any free to access documentation, but custom recipe ID's are possible by just adding .id(STRING) at the end of a recipe.
event.shapeless(Item.of('minecraft:cobblestone', 4), ['minecraft:stone', '#forge:dusts/glowstone']).id("peepee_poopoo")
the wiki has been updated to show this option.