#Removing all Ore

40 messages · Page 1 of 1 (latest)

sharp grotto
#

I'm trying to remove all ore from the vanilla overworld, but it doesnt work. I'm probl. having a logistic, wrong folder or so. No errors or warnings.

chrome oceanBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

sharp grotto
#

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

rigid sentinelBOT
#

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.

sharp grotto
#
[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?

subtle lake
#

you are nesting events..

rigid sentinelBOT
#

You can add and remove worldgen features with KubeJS, and the wiki has pages on those!

sharp grotto
subtle lake
#

from where?

#

none of the ones ive seen have that

sharp grotto
#

the links you showed

subtle lake
#

i just checked, there is no such thing on the wiki

sharp grotto
subtle lake
#

again, no nesting

shut island
#

Remove this

sharp grotto
#

Okay will do

subtle lake
#
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 ^

sharp grotto
#

but its a direct copy

subtle lake
#

._.

#

then im blind

sharp grotto
#

no, you are right. But i did just make a direct copy and added the ores.

shut island
#

I don't see nesting in the wiki yeah

subtle lake
#

screenshot from the wiki:

#

ZERO nesting in sight

#

??

#

._.

sharp grotto
#

I just said you are right.

subtle lake
#

but then you also said you copied it

#

so im not sure which one you mean and which one you dont xD

sharp grotto
#

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

subtle lake
#

but then why did you have this? thinking_hmmm_lex

sharp grotto
#

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.

subtle lake
#

well no, the script was wrong because of nesting

sharp grotto
#

Thanks for fixing it!

subtle lake
#

is it working now?

sharp grotto
#

yup its perfect! :) can be closed