#Making addon going wrong
46 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Schemas is Kube's way of making native JS for modded Recipe Types. The way you're doing it currently, is very wrong
Lemme get you some reference links
This is technically 1.19, but it works the exact same on 1.20
https://github.com/KubeJS-Mods/KubeJS-Mekanism/blob/2001/src/main/java/dev/latvian/kubejs/mekanism/MekanismKubeJSPlugin.java#L45
^ Here, KubeJS Mekanism registers it's Recipes. It gets those Recipes, from Schemas. For example, Metallurgic Infuser:
https://github.com/KubeJS-Mods/KubeJS-Mekanism/blob/2001/src/main/java/dev/latvian/kubejs/mekanism/recipe/MetallurgicInfusingRecipeSchema.java#L13
^ There, the Schema is created with RecipeKeys. RecipeKeys are basically JSON references. If you have a custom recipe type, look at it's JSON. For example, Shaped recipes have an object called "result". There, it defines the output item, and how many of that item it makes:
"result": {
"item": "minecraft:boat",
"count": 4
}
```To do the same in a Schema:
```java
public interface SomeSchema {
RecipeKey<OutputItem> RESULT = ItemComponents.OUTPUT.key("result"); //The Recipe Key.
RecipeSchema SCHEMA = new RecipeSchema(RecipeJS.class, RecipeJS::new, RESULT); // Add Keys to the schema as arguments after RecipeJS.class and RecipeJS::new. RecipeJS is the default Schema class.
}```
KubeJS Mekanism is def not the best reference, KubeJS's builtin recipes probably would've been, but thats basically the jist of it
(If you couldn't tell already, I suck at explaining)
(I am too at some things)
If you want you can lend me the JSON code for a recipe and I can show you what to do
The mod that I am porting (legal by liscene) is https://github.com/Prunoideae/KubeJS-CC
I see
Because I really need that, and because they only have 1.18.2 from two years ago, I am just going to port it to Forge 1.20.1 (I don't know Fabric)
You actually don't need to know Fabric to have it on there, but fair
Uhh
This mod might be a little too complicated for you
Is your goal to just port all the classes?
If it means making the forge part for 1.20.1, yes?
If it is, then gopher it, if not, like you want to add features, you'd probably want to ask the mod dev about it
This mod has zero recipe types
Its for ComputerCraft: Tweaked
Yeah I know
There are no recipes
It's just Lua
So not sure why you're asking about recipes in a CCT addon
CC: Tweaked uses Lua
I know
Were you asking about how to make in-game recipes, or how to add support for in-game recipes?
oh
╰( ͡° ͜ʖ ͡° )つ──☆:・゚˜”°•.˜”°• Many Help •°”˜.•°”˜*
Please provide a description of your issue with as much detail as possible. If you have an issue with a script provide the script. Explain what you can see happening and what you expect to happen. Be specific!
Tell us what is happening, we already know it "doesn't work".
Avoid using words like "it", tell us exactly what "it" is.
Don't assume anyone knows what you are talking about, be specific.
Provide screenshots or video of the issue if possible.