Using KubeJS to modify vein spawn rates
The-Shortman opened this issue ยท 1 comments
I am attempting to completely remove certain ore veins with KubeJS on version 1.20.1, however I can't find a way to access the IDs of the ore veins to remove them with ServerEvents.recipes.remove(), and there appears to be no config for modifying spawn rates. If you could provide documentation on the README file for removing veins with Kube then I'd greatly appreciate it.
I've experimented a bit and I've found the solution for anyone running into this problem in the future:
You can use the /coe locate <ore vein>
command to list all available ore vein IDs.
Then you can do the following to remove the ore vein from the game with KubeJS. Modifying can be done just be re-adding it and changing the generation values:
ServerEvents.recipes(e => {
[
// Example of removing an ore vein and its associated recipe
{id: 'createoreexcavation:ore_vein_type/coal'}, // Replace 'ore_vein_type/coal' with the ore vein you want to remove
{mod: 'createoreexcavation', output: 'minecraft:coal'}, // Replace 'minecraft:coal' with the corresponding product of the vein
// Example of removing a fluid vein and its associated recipe
{id: 'createoreexcavation:ore_vein_type/water'}, // Replace 'ore_vein_type/water' with the fluid vein you want to remove
{mod: 'createoreexcavation', output: Fluid.of('minecraft:water')}, // Fluid.of(<fluid>) is required for identifying fluids
].forEach((recipe => {
e.remove(recipe)
}))
})