KubeJS

KubeJS

69M Downloads

Recipes changed with .replaceInput() don't load on startup

livewatch02 opened this issue ยท 4 comments

commented

Minecraft Version

1.18.2

KubeJS Version

kubejs-forge-1802.5.1-build.340

Rhino Version

rhino-forge-1801.1.9-build.135

Architectury Version

architectury-4.2.49

Forge/Fabric Version

Forge - 40.0.54

Describe your issue

As stated in the titel recpies changed with .replaceInput() don't load on startup. But once I do the /reload command they suddenly change.
The script I'm using:

onEvent('recipes', event => {
	
	//stone tools made from flint
	event.replaceInput({output: 'minecraft:stone_sword'}, 'minecraft:cobblestone', 'minecraft:flint')
	event.replaceInput({output: 'minecraft:stone_axe'}, 'minecraft:cobblestone', 'minecraft:flint')
	event.replaceInput({output: 'minecraft:stone_pickaxe'}, 'minecraft:cobblestone', 'minecraft:flint')
	event.replaceInput({output: 'minecraft:stone_shovel'}, 'minecraft:cobblestone', 'minecraft:flint')
	event.replaceInput({output: 'minecraft:stone_hoe'}, 'minecraft:cobblestone', 'minecraft:flint')
	event.replaceInput({output: 'minecraft:stone_swor'}, 'minecraft:cobblestone', 'minecraft:flint')
  
})

Crash report/logs

No response

commented

Using cobblestone directly won't work here (actually I wonder why it works after /reload in your case), you need to write like this:

onEvent("recipes", event => {
    event.replaceInput({ output: "minecraft:stone_sword" }, "#minecraft:stone_crafting_materials", "minecraft:flint")
})
commented

After using the "#minecraft:stone_tool_materials" tag it worked for me. But I'm also wondering why /reload worked in the first example.

commented

Is this still an issue in recent versions?

commented

No, it's fixed.