#create deploying craft using Kubejs

49 messages · Page 1 of 1 (latest)

oblique flame
#

I'm trying to make a custom item using a deployer on one item to make a new one (like create already does...) i just need the line of code for it because i had it in sequenced assembly...

e.custom({
    "type": "create:sequenced_assembly",
    "ingredient": { "item": "create:fluid_tank" },
    "transitionalItem": { "item": "create:fluid_tank" },
    "sequence": [
  {
    "type": "create:deploying",
    "ingredients": [
      { "item": "create:fluid_tank" },
      { "item": "mysticalagradditions:creative_essence"}
    ],
    "results": [{ "item": "create:creative_fluid_tank" }]
  }, 
],
"results": [
  { "item": "create:creative_fluid_tank" }
],
"loops": 1

})

i don't remmember how to put it to code format thing...

halcyon tuskBOT
#

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

oblique flame
#

i'm also trying to make a sequenced recipe with compacting and it's the compacting part that isn't working i think...

  e.custom({
            "type": "create:sequenced_assembly",
            "ingredient": { "item": "create:blaze_cake" },
            "transitionalItem": { "item": "create:blaze_cake" },
            "sequence": [
          {
            "type": "create:deploying",
            "ingredients": [
              { "item": "create:blaze_cake" },
              { "item": "mysticalagradditions:creative_essence"}
            ],
            "results": [{ "item": "create:blaze_cake" }]
          }, 
          {
            "type": "create:compacting",
            "results": [{ "item": "create:creative_blaze_cake" }]
          },
        ],
        "results": [
          { "item": "create:creative_blaze_cake" }
        ],
        "loops": 1
      })
#

here is the other one i tryied to do too...

  e.custom({
        "type": "create:sequenced_assembly",
        "ingredient": { "item": "avaritia:neutronium_ingot" },
        "transitionalItem": { "item": "avaritia:neutronium_ingot" },
        "sequence": [
          {
            "type": "create:deploying",
            "ingredients": [
              { "item": "avaritia:neutronium_ingot" },
              { "item": "avritia:lapis_singularity"}
            ],
            "results": [{ "item": "avaritia:neutronium_ingot" }]
          },
          {
            "type": "create:deploying",
            "ingredients": [
              { "item": "avaritia:neutronium_ingot" },
              { "item": "avaritia:quartz_singularity" }
            ],
            "results": [{ "item": "avaritia:neutronium_ingot" }]
          },
          {
            "type": "create:deploying",
            "ingredients": [
              { "item": "avaritia:neutronium_ingot" },
              { "item": "avritia:diamond_singularity" }
            ],
            "results": [{ "item": "avaritia:neutronium_ingot" }]
          },
          {
            "type": "create:deploying",
            "ingredients": [
              { "item": "avaritia:neutronium_ingot" },
              { "item": "avaritia:emerald_singularity" }
            ],
            "results": [{ "item": "avaritia:neutronium_ingot" }]
          }, 
          {
            "type": "create:compacting",
            "results": [{ "item": "avaritia:infinity_gem" }]
          },
        ],
        "results": [
          { "item": "avaritia:infinity_gem" }
        ],
        "loops": 1
      })
regal tokenBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
lean yew
#

if you have some reference material, it should be fairly easy to do.
but it doesn't look like you have are using KJS Create, which is slightly questionable, it would make things easier to manage.

but since you're on 1.18, i would like to say something extra
i did make a thing that has a slightly more manageable sequenced assembly recipe adder, it does also come with free cursed possibilities as a bonus #1105939183261995120 message

oblique flame
warm saffron
oblique flame
lean yew
oblique flame
lean yew
#

there's more than one way to define items for recipes, but you'll probably be using a string reference such as 'minecraft:bread' the most

oblique flame
lean yew
#

there's no lone example on that page, but there is one as part of the sequence example, though uh that's not the most clear on inputs and outputs

oblique flame
lean yew
#
//recipe to "cook" dough into bread by deploying a magma block on it
event.recipes.createDeploying('minecraft:bread', ['create:dough', 'minecraft:magma_block'])
oblique flame
#

how to remove a craft using kubejs?

lean yew
#
//in a recipes event block
// event.remove(recipeFilter)
//examples

event.remove({id: 'minecraft:bread'}) //removes recipe with the recipeid of "minecraft:bread"
// you'll probably be using this one most often to remove specific recipes
// note that modded recipe IDs rarely match the resulting item's id exactly
// JEI or whatever other recipe viewer you're using should tell you recipe IDs somewhere in a recipe window, if not, you can dig into the mod's jar file or source code

event.remove({output: 'minecraft:bread'}) //removes recipes that produce "minecraft:bread"

event.remove({mod: 'minecraft'}) //removes all recipes added under the namespace "minecraft"

//recipe filters present more possibilities than just this, there should be some documentation somewhere```
oblique flame
#

how do you make a Create pressing craft using kjs??

lean yew
#
event.recipes.createPressing(output, input)```
oblique flame
#

what was the mecanical crafter kjs code??

lean yew
#

event.recipes.createMechanicalCrafting()

#

the arguments are very similar to that of shaped crafting recipes

oblique flame
oblique flame
lean yew
#
event.recipes.createMechanicalCrafting(output, pattern, keys)```
lean yew
#

pattern is a string[] representing the grid

#

keys is a character : item map, representing the characters in the pattern

oblique flame
lean yew
#

any means of referencing an item in KJS will work

#

so string reference, Item.of(), or other such things, will work

oblique flame
#

ok...

oblique flame
lean yew
#

something very similar to that should work, yes

#

however, you will need to have all the strings representing the rows be the same length

#

otherwise, how should it know where a shorter row starts?

oblique flame
lean yew
#

spaces in the string act as literal empty spaces in the layout

#
[
' A ',
'B B'
]
oblique flame
lean yew
#

it is effectively no crafter, though ultimately the prescense of a crafter in that space does not have any impact on the recipe's functionality

oblique flame
#

i have created an item using kjs and it doesn't want to get the texture and i needed to change the item name but it doesn't want either... it changed for some reason yesterday but i forgot and was doing other stuff...

lean yew
#

might want to make a new ticket for a new sort of issue

regal tokenBOT
#

Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.

Do you have any other questions regarding your issue? Feel free to ask!
Note: You generally should create a new post for unrelated issues.