#How do i add amount ot crafting recipe

54 messages · Page 1 of 1 (latest)

sinful minnow
#

i know its simple but my stupid mind just doesnt know how

ServerEvents.recipes(event => {
 wood.forEach(wood =>
   event.shaped(`biomesoplenty:${wood}_trapdoor`, [
     'ABC',
     'BDB',
     'CBD'
   ], {
     A:'gtceu:iron_bolt',
     B:`biomesoplenty:${wood}_planks`,
     C:'minecraft:stick',
     D:'#forge:tools/screwdrivers'
   }).damageIngredient('forge:tools/screwdrivers')
 )

i want it to craft 2 trapdoors

chilly shellBOT
#

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

elfin pelican
#

idk if 'numberx biomesoplenty:${wood}_trapdoor' would work, but Item.of('biomesoplenty:${wood}_trapdoor',number)' does. the x in the 1st one is a requirement; just put any valid whole number in front (< 64)

manic stratus
#
ServerEvents.recipes(event => {
 wood.forEach(wood =>
   event.shaped(`2x biomesoplenty:${wood}_trapdoor`, [
     'ABC',
     'BDB',
     'CBD'
   ], {
     A:'gtceu:iron_bolt',
     B:`biomesoplenty:${wood}_planks`,
     C:'minecraft:stick',
     D:'#forge:tools/screwdrivers'
   }).damageIngredient('forge:tools/screwdrivers')
 )
sinful minnow
#

i got errors

#
const wood = [
    'empyreal',
    'maple',
    'pine'
]
// ['pressure_plate', 'button', 'trapdoor', 'fence_gate', 'slab', 'stairs', 'door', 'fence']

ServerEvents.recipes(event => {
 wood.forEach(wood =>
   event.shaped(`biomesoplenty:${wood}_pressure_plate`, [
     'ABA',
     'CDC',
     'AEA'
   ], {
     A:'gtceu:wood_bolt',
     B:'#forge:tools/mallets',
     C:`biomesoplenty:${wood}_slab`,
     D:'gtceu:iron_spring',
     E:'#forge:tools/screwdrivers'
   }).damageIngredient('#forge:tools/mallets').damageIngredient('forge:tools/screwdrivers')
 )
})
ServerEvents.recipes(event => {
    wood.forEach(wood =>
        event.remove({ output: `biomesoplenty:${wood}_pressure_plate` })
)})


ServerEvents.recipes(event => {
 wood.forEach(wood =>
   event.shaped(`2x biomesoplenty:${wood}_trapdoor`, [
     'ABC',
     'BDB',
     'CBD'
   ], {
     A:'gtceu:iron_bolt',
     B:`biomesoplenty:${wood}_planks`,
     C:'minecraft:stick',
     D:'#forge:tools/screwdrivers'
   }).damageIngredient('forge:tools/screwdrivers')
 )
 event.shaped(`biomesoplenty:${wood}_trapdoor`, [
  'ABC',
  'BDB',
  'CBD'
], {
  A:'gtceu:steel_bolt',
  B:`biomesoplenty:${wood}_planks`,
  C:'minecraft:stick',
  D:'#forge:tools/screwdrivers'
}).damageIngredient('forge:tools/screwdrivers')
})
ServerEvents.recipes(event => {
    wood.forEach(wood =>
        event.remove({ output: `biomesoplenty:${wood}_trapdoor` })
)})

ServerEvents.recipes(event => {
 wood.forEach(wood =>
   event.shaped(`biomesoplenty:${wood}_door`, [
     'ABC',
     'ADE',
     'AAF'
   ], {
     A:`biomesoplenty:${wood}_planks`,
     B:`biomesoplenty:${wood}_trapdoor`,
     C:'#forge:tools/screwdrivers',
     D:'gtceu:iron_ring',
     E:'gtceu:iron_screw',
     F:'#forge:tools/saws'
   }).damageIngredient('forge:tools/screwdrivers')
 )
})
ServerEvents.recipes(event => {
    wood.forEach(wood =>
        event.remove({ output: `biomesoplenty:${wood}_door` })
)})
#

full script

manic stratus
#

jesus christ xD

#

hold on.. theres a lot to fix here

sinful minnow
manic stratus
#
const woods = [
  'empyreal',
  'maple',
  'pine'
]
// ['pressure_plate', 'button', 'trapdoor', 'fence_gate', 'slab', 'stairs', 'door', 'fence']

ServerEvents.recipes(event => {
  woods.forEach(wood => {
    event.remove({ output: `biomesoplenty:${wood}_pressure_plate` })
    event.shaped(`biomesoplenty:${wood}_pressure_plate`, [
      'ABA',
      'CDC',
      'AEA'
    ], {
      A: 'gtceu:wood_bolt',
      B: '#forge:tools/mallets',
      C: `biomesoplenty:${wood}_slab`,
      D: 'gtceu:iron_spring',
      E: '#forge:tools/screwdrivers'
    }).damageIngredient('#forge:tools/mallets').damageIngredient('#forge:tools/screwdrivers')

    event.remove({ output: `biomesoplenty:${wood}_trapdoor` })
    event.shaped(`2x biomesoplenty:${wood}_trapdoor`, [
      'ABC',
      'BDB',
      'CBD'
    ], {
      A: 'gtceu:iron_bolt',
      B: `biomesoplenty:${wood}_planks`,
      C: 'minecraft:stick',
      D: '#forge:tools/screwdrivers'
    }).damageIngredient('#forge:tools/screwdrivers')

    event.remove({ output: `biomesoplenty:${wood}_door` })
    event.shaped(`biomesoplenty:${wood}_door`, [
      'ABC',
      'ADE',
      'AAF'
    ], {
      A: `biomesoplenty:${wood}_planks`,
      B: `biomesoplenty:${wood}_trapdoor`,
      C: '#forge:tools/screwdrivers',
      D: 'gtceu:iron_ring',
      E: 'gtceu:iron_screw',
      F: '#forge:tools/saws'
    }).damageIngredient('#forge:tools/screwdrivers')
  })
})
#

cuz the list was wrong, the events were wrong, the iteration was wrong, the damage ingredient was wrong, and i can keep going

#

xD

sinful minnow
#

with steel

#

plese add it

#

ty

manic stratus
#

ah didnt notice it was different

#

thought it was double

#
const woods = [
  'empyreal',
  'maple',
  'pine'
]
// ['pressure_plate', 'button', 'trapdoor', 'fence_gate', 'slab', 'stairs', 'door', 'fence']

ServerEvents.recipes(event => {
  woods.forEach(wood => {
    event.remove({ output: `biomesoplenty:${wood}_pressure_plate` })
    event.shaped(`biomesoplenty:${wood}_pressure_plate`, [
      'ABA',
      'CDC',
      'AEA'
    ], {
      A: 'gtceu:wood_bolt',
      B: '#forge:tools/mallets',
      C: `biomesoplenty:${wood}_slab`,
      D: 'gtceu:iron_spring',
      E: '#forge:tools/screwdrivers'
    }).damageIngredient('#forge:tools/mallets').damageIngredient('#forge:tools/screwdrivers')

    event.remove({ output: `biomesoplenty:${wood}_trapdoor` })
    event.shaped(`2x biomesoplenty:${wood}_trapdoor`, [
      'ABC',
      'BDB',
      'CBD'
    ], {
      A: 'gtceu:iron_bolt',
      B: `biomesoplenty:${wood}_planks`,
      C: 'minecraft:stick',
      D: '#forge:tools/screwdrivers'
    }).damageIngredient('#forge:tools/screwdrivers')
    event.shaped(`biomesoplenty:${wood}_trapdoor`, [
      'ABC',
      'BDB',
      'CBD'
    ], {
      A: 'gtceu:steel_bolt',
      B: `biomesoplenty:${wood}_planks`,
      C: 'minecraft:stick',
      D: '#forge:tools/screwdrivers'
    }).damageIngredient('forge:tools/screwdrivers')

    event.remove({ output: `biomesoplenty:${wood}_door` })
    event.shaped(`biomesoplenty:${wood}_door`, [
      'ABC',
      'ADE',
      'AAF'
    ], {
      A: `biomesoplenty:${wood}_planks`,
      B: `biomesoplenty:${wood}_trapdoor`,
      C: '#forge:tools/screwdrivers',
      D: 'gtceu:iron_ring',
      E: 'gtceu:iron_screw',
      F: '#forge:tools/saws'
    }).damageIngredient('#forge:tools/screwdrivers')
  })
})
sinful minnow
#

whats wrong here?

#

@manic stratus pleeese

manic stratus
#

I saw what you wrote

#

I was reading what you wrote xd
I’m in the kitchen

#

It’s the quotes again

#

Use backticks for string template

sinful minnow
#

i have bery little experience with kubejs and i am just not smart

#

so i dont relly know what you just siad

#

said

manic stratus
#

It has nothing to do with kjs xd

#

It has to do with the keys on your keyboard xd

sinful minnow
#

ohh, so bracket type

manic stratus
#

‘ -> `

sinful minnow
#

oph wait

#

okay

#

where

sinful minnow
#

bruh

#

but where exactly

manic stratus
#

Wdym you have exactly one place xd

#

Don’t make me write code on my phone just to change a simple apostrophe aqua_sad_sob_cry

sinful minnow
#

i dont understand

#

just tell me where

#

no need to write the code

#

OH WAIT

#

i get it

#

i am stupid

#

i used wrong ' ' '