#Removing all Ore
40 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
WorldgenEvents.add(event => {
// use the anchors helper from the event
const { anchors } = event
WorldgenEvents.remove(event => {
event.removeOres(props => {
// much like ADDING ores, this supports filtering by worldgen layer...
// props.worldgenLayer = 'underground_ores'
// ...and by biome
// BlockStatePredicate to remove iron and copper ores from the given biomes
// Note tags may NOT be used here, unfortunately...
props.blocks = ['minecraft:iron_ore', 'minecraft:copper_ore', 'minecraft:gold_ore', 'minecraft:redstone_ore', 'minecraft:lapislazuli_ore', 'minecraft:coal_ore']
})
})
})
i put it in "startup_script" and i have no other files
You can find your KubeJS server log in /minecraft/logs/kubejs/startup.log.
If you are on 1.18 or below it will be called startup.txt.
Please send it if asked, as it contains helpful information.
[12:51:16] [INIT] Loaded plugins:
[12:51:16] [INIT] - dev.latvian.mods.kubejs.forge.BuiltinKubeJSForgePlugin
[12:51:16] [INIT] - com.gregtechceu.gtceu.integration.kjs.GregTechKubeJSPlugin
[12:51:16] [INIT] - com.tom.createores.kubejs.KubeJSExcavation
[12:51:16] [INIT] - com.lowdragmc.lowdraglib.kjs.LDLibKubeJSPlugin
[12:51:17] [INFO] startup_scripts:example.js:5: Hello, World! (Loaded startup scripts)
[12:51:17] [INFO] Loaded script startup_scripts:example.js in 0.073 s
[12:51:17] [INFO] Loaded 1/1 KubeJS startup scripts in 0.838 s
the id of lapis ore is wrong, could this make the script invalid?
you are nesting events..
You can add and remove worldgen features with KubeJS, and the wiki has pages on those!
I just took the example script and modified it. :/
the links you showed
i just checked, there is no such thing on the wiki
again, no nesting
Remove this
Okay will do
WorldgenEvents.remove(event => {
event.removeOres(props => {
props.blocks = ['minecraft:iron_ore', 'minecraft:copper_ore', 'minecraft:gold_ore', 'minecraft:redstone_ore', 'minecraft:lapislazuli_ore', 'minecraft:coal_ore']
})
})
this is from the wiki ^
but its a direct copy
no, you are right. But i did just make a direct copy and added the ores.
I don't see nesting in the wiki yeah
I just said you are right.
but then you also said you copied it
so im not sure which one you mean and which one you dont xD
I mean, i just copied the section you posted a screenshot of. I didn't add anything besides the array with the ore and removed the rest
but then why did you have this? 
Can't tell you, i open the wiki, copied the script, pasted it and changed the ore.
Came here since no errors showed up. Thought i have it in the wrong folder or so.
well no, the script was wrong because of nesting
Thanks for fixing it!
is it working now?
yup its perfect! :) can be closed