Biome Modifiers
NeoForge adds the ability to add biome modifiers which enables changing biome properties without completely overriding the whole biome definition. WorldJS adds the ability to create the NeoForge provided modifier types via KubeJS’s ServerEvents.registry('neoforge:biome_modifier', event => {...}) event
Add Features
Type: add_features
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
: Set the biome(s) to be modified.biomes(biomes: HolderSet<Biome>)
: Set the decoration step the features will added to.step(step: GenerationStep$Decoration)Reveal/hide list of decoration steps
raw_generationlakeslocal_modificationsunderground_structuressurface_structuresstrongholdsunderground_oresunderground_decorationfluid_springsvegetal_decorationtop_layer_modification
: Set the feature(s) to be added to the biome(s).features(features: HolderSet<PlacedFeature>)
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('add_flowers', 'add_features')
.biomes('#kubejs:needs_more_flowers')
.step('vegetal_decoration')
.features('#kubejs:flower_patches')
})
Add Cavers
Type: add_carvers
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
: Set the biome(s) to be modified.biomes(biomes: HolderSet<Biome>)
: The carving step to add the carver(s) to.step(step: GenerationStep$Carving)Reveal/hide list of carving steps
airliquid
: Set the carver(s) to add to the biome(s).carvers(carvers: HolderSet<ConfiguredWorldCarver<?>>)
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('add_cave_carvers', 'add_carvers')
.biomes('#kubejs:needs_more_caves')
.step('air')
.carvers('#kubejs:special_cave_carvers')
})
Add Spawn Costs
Type: add_spawn_costs
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
: Set the biome(s) to be modified.biomes(biomes: HolderSet<Biome>)
: The entity type(s) to add a spawn cost for.entityTypes(entityTypes: HolderSet<EntityType<?>>)
: Set the cost.cost(spawnBudget: number, costPerSpawn: number)spawnBudget: number: The total energy budget for spawning entitiescostPerSpawn: number: The amount of charge each entity takes up from the budget
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('add_skeletons', 'add_spawn_costs')
.biomes('#kubejs:add_skeletons')
.entityTypes([
'minecraft:skeleton',
'minecraft:stray'
])
.cost(12, 0.7)
})
Add Spawns
Type: add_spawns
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
: Set the biome(s) to be modified.biomes(biomes: HolderSet<Biome>)
: Set the spawn(s) to add to the biome(s). Accepts a list of.spawns(spawns: List<Spawn>)Spawn, which can be created as a map of parameters to valuesentityType: EntityType<?>: The entity type to spawnweight: int: The spawn weightminCount: int: The minimum group sizemaxCount: int: The maximum group size
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('add_zombies', 'add_spawns')
.biomes('#kubejs:needs_more_zombies')
.spawns([
{
entityType: 'minecraft:zombie',
weight: 3,
minCount: 1,
maxCount: 5
},
{
entityType: 'minecraft:husk',
weight: 2,
minCount: 2,
maxCount: 3
}
])
})
None
Type: none
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('hexcasting:swamp_geodes', 'none')
// Overwrite's Hexcasting's swamp geode biome modifier, removing its changes
// Note: the mod & modifier are provided purely as an example, the combo may not actually exist
})
Remove Features
Type: remove_features
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
: Set the biome(s) to be modified.biomes(biomes: HolderSet<Biome>)
: Set the feature(s) to remove from the biome(s).features(features: HolderSet<PlacedFeature>)
: Set the generation steps to remove the feature(s) from. Leaving empty or not defining will remove the feature(s) from every generation step.steps(steps: Set<GenerationStep$Decoration>)Reveal/hide list of valid decoration steps
raw_generationlakeslocal_modificationsunderground_structuressurface_structuresstrongholdsunderground_oresunderground_decorationfluid_springsvegetal_decorationtop_layer_modification
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('remove_lava_lakes', 'remove_features')
.biomes('#kubejs:no_lava_lakes')
.features('minecraft:lake_lava')
})
Remove Spawn Costs
Type: remove_spawn_costs
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
: Set the biome(s) to be modified.biomes(biomes: HolderSet<Biome>)
: The entity(s) to remove spawn costs for.entityTypes(entityTypes: HolderSet<EntityType<?>>)
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('soul_skeletons', 'remove_spawn_costs')
.biomes('minecraft:soul_sand_valley')
.entityTypes('minecraft:skeleton')
})
Remove Spawns
Type: remove_spawns
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
: Set the biome(s) to be modified.biomes(biomes: HolderSet<Biome>)
: Set the entity(s) to remove spawns for.entityTypes(entityTypes: HolderSet<EntityType<?>>)
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('no_zombies', 'remove_spawns')
.biomes('#kubejs:no_zombies')
.entityTypes('#kubejs:zombies')
})
Remove Carvers
Type: remove_carvers
See the relevant page on the NeoForge Docs for a detailed explanation of what this modifier does
: Set the biome(s) to be modified.biomes(biomes: HolderSet<Biome>)
: Sets the carver(s) to be removed from the biome(s).carvers(carvers: HolderSet<ConfiguredWorldCarver<?>>)
: Sets the carving step(s) to remove the carver(s) from.steps(steps: Set<GenerationStep$Carving>)Reveal/hide list of carving steps
airliquid
Example
ServerEvents.registry('neoforge:biome_modifier', event => {
event.create('remove_carvers', 'remove_carvers')
.biomes('#kubejs:needs_less_sharp_carvers')
.carvers('#kubejs:sharp_carvers')
.steps([
'air'
])
})