#recipes for 'mekanism:antiprotonic_nucleosynthesizer'
37 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
You can add, remove, and modify recipes with KubeJS. The wiki has a page on that!
go to the custom recipe section
I found it on mekanism's github
NucleosynthesizingRecipeBuilder.nucleosynthesizing(
IngredientCreatorAccess.item().from(Tags.Items.NETHER_STARS),
IngredientCreatorAccess.gas().from(MekanismGases.ANTIMATTER, 5),
new ItemStack(Items.HEART_OF_THE_SEA),
1_250
nucleosynthesizing is the type?
What is wrong here?
event.custom({
type: 'mekanism:nucleosynthesizing',
itemInput: 'kubejs:netherite_star',
gasInput: { gas: 'mekanism:antimatter', amount: 1000000 },
output: Item.of('kubejs:black_hole', 1).toResultJson(),
duration: 200000
})```
Error occurred while handling event 'ServerEvents.recipes': TypeError: Cannot find function toResultJson in object 1 black_hole. (server_scripts:script.js#45)
toResultJson is 1.16.5 only
replace it with .toJson()
itemInput might need that too
no errors but recipe does not work
event.custom({
type: 'mekanism:nucleosynthesizing',
itemInput: 'kubejs:netherite_star',
gasInput: { gas: 'mekanism:antimatter', amount: 1000000 },
output: Item.of('kubejs:black_hole', 1).toJson(),
duration: 200000
})```
Please send your server.txt log file.
You can find it here: minecraft/logs/kubejs/server.txt
Paste version of server.txt from @opal sequoia
Error creating recipe mekanism:kjs_5c6137o0tlf4btqzkbxin479i[mekanism:nucleosynthesizing]: {"type":"mekanism:nucleosynthesizing","itemInput":"kubejs:netherite_star","gasInput":{"gas":"mekanism:antimatter","amount":1000000.0},"output":{"item":"kubejs:black_hole","count":1},"duration":200000.0}: com.google.gson.JsonSyntaxException: Expected itemInput to be a JsonObject, was "kub...ar"

so i've not understand
event.custom({
type: 'mekanism:nucleosynthesizing',
itemInput: Item.of('kubejs:netherite_star').toJson(),
gasInput: { gas: 'mekanism:antimatter', amount: 1000000 },
output: Item.of('kubejs:black_hole', 1).toJson(),
duration: 200000
})
every part of a custom recipe has to be in json format
ok thaks
no errors but recipe does not work
Error creating recipe mekanism:kjs_eubscimozhtgdbfpkp6alxxjl[mekanism:nucleosynthesizing]: {"type":"mekanism:nucleosynthesizing","itemInput":{"item":"kubejs:netherite_star","count":1},"gasInput":{"gas":"mekanism:antimatter","amount":1000000.0},"output":{"item":"kubejs:black_hole","count":1},"duration":200000.0}: com.google.gson.JsonSyntaxException: Missing ingredient, expected to find a JsonObject
event.custom({
type: 'mekanism:nucleosynthesizing',
itemInput: Item.of('kubejs:netherite_star').toJson(),
gasInput: { gas: 'mekanism:antimatter', amount: 1000000 },
output: Item.of('kubejs:black_hole', 1).toJson(),
duration: 200000
})```
instead of Item.of, use Ingredient.of
didn't help
well, what are your logs?
Paste version of server.txt from @opal sequoia
try doing it the normal JSON way, without the Ingredient.of
how?
have you looked at the JSON recipes mekanism has in their source code?
i know mek's code is bad 
i'm talking about the ones in src/generated
nono im not talking about that
im just scared to know the answer to the question, because if they havent... where is this snippet from?
not sure
try this
event.custom({
"type": "mekanism:nucleosynthesizing",
"duration": 200000,
"gasInput": {
"amount": 1000000,
"gas": "mekanism:antimatter"
},
"itemInput": {
"ingredient": {
"item": "kubejs:netherite_star"
}
},
"output": {
"item": "kubejs:black_hole"
}
})
that iteminput is far from the norm
yes it works
thanks 😺
