Basic synthetic modification [KJS] Kubejs Minecraft Game

The MOD installation is complete and starts a Kubejs folder in the game directory

Find the server_scripts folder in the Kubejs folder officially recommending modification formula should be stored in this folder

Initialize the new Minecraft.js to add the following code in Minecraft.js

Onevent ('recipes', event => {

Modify the synthesis here

})

Common instructions:

Get the item information in the hand: /kjs_hand

Reveasive formula:/RELOAD

1. Delete the synthetic table

Event.remove ({}) // Delete all synthetic tables

Event.remove ({input: xxxxx}) // Delete all formulas made of xxxxx as materials

For example, delete all formulas with iron ingots as materials

Event.remove ({input: 'minecraft: Iron_INGOT'})

Event.remove ({output: xxxxx}) // Delete all formulas of xxxx

For example, the formula of deleting iron ingots

Event.remove ({input: 'minecraft: Iron_INGOT'})

2. Add orderly synthesis

EVENT.SHAPD (items that need to be synthetic, [[[[[[[[[[[[[

'Xxx',

'Xxx',

'Xxx'

], {{

X: Material name

})

Note: X can be modified to any name

For example, two iron ingots plus three red rocks plus 2 gold ingots to synthesize iron pants legs

Event.shaped ('Minecraft: Iron_legings', [

'Sxs',

'X x',

'Y y'

], {{

S: Minecraft: Iron_ingot ',

X: Minecraft: Redstone ', Y:' Minecraft: GOLD_INGOT '

})

3. Add disorderly formula

Event.shapeless (needed for synthetic items, [required materials, separated]))

For example: Use a redstone to add an iron ore to synthesize 2 iron ingots

Event.shapeless ('4x Minecraft: Cobblestone', ['Minecraft: Iron_ore', 'Minecraft: Redstone'))