[Questions] (custom item and foodbuilder)
Sokas opened this issue · 3 comments
Hi,
I have some questions:
-
I keep getting "not a valid result" when using a recipe with a custom item I created with KubeJS.
Example:
in startup_scripts: event.create('cardboard').displayName('Cardboard')
in server_scripts: event.shaped('cardboard', ['xxx','xxx','xxx'], {x: 'minecraft:paper' })
If I put a namespace before, like "mokas:cardboard", the texture stops working. How do I fix it? I can't have : in the filename. -
Could you please put an example in the documentation about the foodBuilder? I don't know how to build it.
And I found an error in the recipeeventjs docs:
The number of carrots in lines 41 and 43 do not match.
Thanks in advance!
- when creating items, they're created in the
kubejs
namespace, but recipes use theminecraft
namespace by default (tl;dr - usekubejs:cardboard
for the output of the recipe).
also, if you wanna use a custom namespace, you can just usemokas:cardboard
and then move your texture tokubejs/assets/mokas/...
instead ofkubejs/assets/kubejs/...
, that should just work - Also I'll add an example for food items down the line, for now I think Seaopolis has some nice example foods you could work with though
Hi @MaxNeedsSnacks,
I could not find anything regarding food and Seaopolis, could you please help?
Regards!
Seaopolis is a modpack that has a couple of custom items, including custom foods ^^
Here's an example in the form of their seabucks coffee that should show off some of the features of food items:
event.create('seabuck_coffee').food(food => {
food.hunger(2).saturation(2).effect('minecraft:speed', 100, 9, 1.0).eaten(e => {
console.log(e.player + " ate " + e.item);
e.server.runCommandSilent(`give ${e.player} minecraft:glass_bottle`)
})
}).displayName('Seabucks Coffee').maxStackSize(8)