#Can I remove specific structures with KubeJS?
6 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
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')
})
btw, for 1.18 I think you can still refer to the KubeJS Legacy docs. https://wiki.latvian.dev/books/kubejs-legacy/page/worldgenremoveeventjs-(116)
For more information on biomes field, see worldgen.add event page.
onEvent('worldgen.remove', event...
ty