
Can not use null in recipe builders
juraj-hrivnak opened this issue · 2 comments
The following code will fail with this error: Error adding Minecraft Shapeless Crafting recipe: - Key 'n' is not defined!
crafting.shapedBuilder()
.output(item('advancedmortars:mortar'))
.matrix('nns',
'rfr',
'nrn')
.key('n', null)
.key('s', ore('stickWood'))
.key('r', ore('rocks'))
.key('f', item('pyrotech:material', 10))
.register()
If you want the slot to be empty, don't use a key and null, but instead just use a space. The matrix should look like this:
' s'
'rfr'
' r '