
KubeJS Added resource veins not working
NowakAdmin opened this issue ยท 9 comments
[Render thread/ERROR][KubeJS Server/]: server_scripts:mekanism.js#5:
Failed to create a 'createoreexcavation:vein' recipe from args [{"text": "raw uranium"}, mekanism:raw_uranium]:
Constructor for createoreexcavation:vein with 2 arguments not found!
[Render thread/ERROR][KubeJS Server/]: mekanism.js#5: Error in 'ServerEvents.recipes': dev.latvian.mods.rhino.EcmaError: TypeError: Cannot find function placement in object createoreexcavation:kjs/3kkgyrgdo34mqk3sfjq4b8a1p[createoreexcavation:vein].
Looks like this code is executed prior to Create-Ore-Excavation.
i created a folder /kubejs/server_scripts and pua a mekanism.js file inside (code below)
ServerEvents.recipes(event => {
event.recipes.createoreexcavation.vein('{"text": "raw uranium"}', 'mekanism:raw_uranium')
.placement(10, 10, 12482984)
.id("kubejs:mekanism_uranium_vein")
.biomeWhitelist('forge:is_overworld');
event.recipes.createoreexcavation.drilling('mekanism:raw_uranium', 'kubejs:mekanism_uranium_vein', 100)
.id("kubejs:mekanism_uranium_drill");
console.log('createoreexcavation.vein: Hello! The recipe event mekanism:raw_uranium has fired!');
});
I followed code as mentioned in some other issue threads. Is this a bug with current version or I'm doing something wrong?
Info
Minecraft 1.21.1
KubeJS: 2101.7.1-build.181
Create: 6.0.2
Create-Ore-Excavation: 1.6.1
The error is not showing up if I do /kubejs reload server_scripts logged in to the world.
[Server thread/INFO][KubeJS Server/]: Loaded script server_scripts:mekanism.js in 0.001 s
[Server thread/INFO][KubeJS Server/]: Loaded 1/1 KubeJS server scripts in 0.009 s with 0 errors and 0 warnings
After that i spend like 20 minutes just teleporting to not previously loaded chunks and using Vein tool trying to find my Uranium Vein, but this not happened :(
In this point I suggest to add sub-comand like "/locate vein uranium" or so to check nearest chunk with that vein - for debug purposes.
Is there an option to see more than one vein threads at one scan?
Good Job with the mod!
Also i see that sample drill do not accept netherite backpack, only copper one, this should be like that ?
1.21 doesn't have kubejs api support yet.
You'll have to create jsons and put them in the data folder, for now.
Vein JSON: https://github.com/tom5454/Create-Ore-Excavation/blob/main/NeoForge/src/generated/resources/data/createoreexcavation/recipe/ore_vein_type/coal.json
Drilling Recipe JSON: https://github.com/tom5454/Create-Ore-Excavation/blob/main/NeoForge/src/generated/resources/data/createoreexcavation/recipe/drilling/coal.json
I know i need to put theese files in data folder, but which one?
1)
download sources add my uranium.jsons to:
Create-Ore-Excavation/blob/main/NeoForge/src/generated/resources/data/createoreexcavation/recipe/ore_vein_type/uranium,json
and
Create-Ore-Excavation/blob/main/NeoForge/src/generated/resources/data/createoreexcavation/recipe/drilling/uranium.json
and compile it using gradle ? (I'm kind of fresh in this :P )
Or just put theese jsons in other directory like .minecraft/kubejs/data
or
3)
or .minecraft/saves/(my-world)/data/createoreexcavation/recipe/(ore_vein_type/)\(drilling/)?
Can You guide me please?
I work on Windows 11 if this is needed info.
Put it in the kubejs data directory .minecraft/kubejs/data/<your pack name>/recipe/<ore_vein_type, drilling, extracting>
.
It does work with the netherite backtank.