#Can I remove specific structures with KubeJS?

6 messages · Page 1 of 1 (latest)

rapid socket
#

Ive looked at the wiki but theres only injfo on ores and features, not structures. If anyone knows how to remove structures, please tell me so.
If its not possible with kubejs telling me how it could be done otherwise would be mega baller

boreal dustBOT
#

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

shell pond
#

note: I am only sure about 1.19, but I'm assuming this is similar, and I'll try putting it up in the 1.18 syntax

You need to know the stage where the structures are added, (which you can usually get from the mod's data pack in data/mod_id/forge/biome_modifier I think) and the structure id, but you can also copy/paste this into a startup_scripts/script.js and un-comment steps to figure it out (I tried with all uncommented and it didn't work but ymmv)

onEvent('worldgen.remove', event => {
    // event.printFeatures('raw_generation')
    // event.printFeatures('local_modifications')
    // event.printFeatures('underground_structures')
    event.printFeatures('surface_structures', 'minecraft:overworld')
    // event.printFeatures('strongholds')
    // event.printFeatures('underground_ores')
    // event.printFeatures('underground_decoration')
    // event.printFeatures('fluid_springs')
    // event.printFeatures('vegetal_decoration')
    // event.printFeatures('top_layer_modification')
})
#

once you get your list (usually in 'surface_structures' , you can remove them with

onEvent('worldgen.remove', event => {
  event.removeFeatureById('surface_structures', 'mod_id:structure_id')
})

rapid socket
#

ty