Configured & Placed Features
Configured features define what is placed in-world. WorldJS adds the ability to create all of vanilla’s configured feature types through KubeJS’s ServerEvents.registry('worldgen/configured_feature', event => {}) event
Placed features define the placement conditions of configured features. They can be made with KubeJS’s ServerEvents.registry('worldgen/placed_feature', event => {}) event, as described below
No Op
Type: no_op
Creates a minecraft:no_op configured feature
: Creates and modifies the placed feature which will place the configured feature.withPlacement(id?: ResourceLocation, builder: Consumer<PlacedFeatureBuilder>)id?: ResourceLocation: The id of the placed feature- Defaults to the same id as the configured feature if not provided
- Namespace defaults to
kubejsif not specified
builder: Consumer<PlacedFeatureBuilder>: Set the placement of the feature
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('no_op', 'no_op')
.withPlacement('kubejs:no_op', m => {})
})
Basalt Pillar
Type: basalt_pillar
Creates a minecraft:basalt_pillar configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('basalt_pillar', 'basalt_pillar')
.withPlacement(p => p.modifiers(m => {
m.minecraft.inSquare()
}))
})
Blue Ice
Type: blue_ice
Creates a minecraft:blue_ice configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('blue_ice', 'blue_ice')
.withPlacement(p => p.modifiers(m => {
m.minecraft.count([2, 9])
}))
})
Bonus Chest
Type: bonus_chest
Creates a minecraft:bonus_chest configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('bonus_chest', 'bonus_chest')
.withPlacement(p => p.modifiers(m => {
m.minecraft
.fixed([[0, 0, 0], [0, 100, 0]])
.horizontalRandomOffset([-8, 8])
}))
})
Chorus Plant
Type: chorus_plant
Creates a minecraft:chorus_plant configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('chorus_plant', 'chorus_plant')
.withPlacement(p => p.modifiers(m => {
let { minecraft } = m
minecraft
.biome()
.inSquare()
.rarityFilter(17)
}))
})
Coral Claw
Type: coral_claw
Creates a minecraft:coral_claw configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('coral_claw', 'coral_claw')
.withPlacement(p => p.modifiers(m => {
m.minecraft.surfaceWaterDepth(12)
}))
})
Coral Mushroom
Type: coral_mushroom
Creates a minecraft:coral_mushroom configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('coral_mushroom', 'coral_mushroom')
.withPlacement(p => p.modifiers(m => {
m.minecraft.uniformHeightRange(
{ above_bottom: 15 },
{ below_top: 20 }
)
}))
})
Coral Tree
Type: coral_tree
Creates a minecraft:coral_tree configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('coral_tree', 'coral_tree')
.withPlacement(p => p.modifiers(m => {
m.minecraft.heightmap('ocean_floor_wg')
}))
})
Desert Well
Type: desert_well
Creates a minecraft:desert_well configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('desert_well', 'desert_well')
.withPlacement(p => p.jsonModifier({
type: 'cheese_mod:extra_cheesy'
}))
})
End Island
Type: end_island
Creates a minecraft:end_island configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('end_island', 'end_island')
.withPlacement(p => p.modifiers(m => {
m.minecraft.rarityFilter(60)
}))
})
End Platform
Type: end_platform
Creates a minecraft:end_platform configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('end_platform', 'end_platform')
.withPlacement(p => p.modifiers(m => {
m.minecraft.inSquare()
}))
})
Freeze Top Layer
Type: freeze_top_later
Creates a minecraft:freeze_top_later configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('freeze_top_later', 'freeze_top_later')
.withPlacement(p => p.modifiers(m => {
m.minecraft.biome()
}))
})
Glowstone Blob
Type: glowstone_blob
Creates a minecraft:glowstone_blob configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('glowstone_blob', 'glowstone_blob')
.withPlacement(p => p.modifiers(m => {
m.minecraft.inSquare()
}))
})
Ice Spike
Type: ice_spike
Creates a minecraft:ice_spike configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('ice_spike', 'ice_spike')
.withPlacement(p => p.modifiers(m => {
m.minecraft.heightmap('world_surface_wg')
}))
})
Kelp
Type: kelp
Creates a minecraft:kelp configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('kelp', 'kelp')
.withPlacement(p => p.modifiers(m => {
m.minecraft.surfaceWaterDepth(5)
}))
})
Monster Room
Type: monster_room
Creates a minecraft:monster_room configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('monster_room', 'monster_room')
.withPlacement(p => p.modifiers(m => {
m.minecraft.surfaceRelativeThreshold(
'ocean_floor_wg',
-12,
-61
)
}))
})
Vines
Type: vines
Creates a minecraft:vines configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('vines', 'vines')
.withPlacement(p => p.modifiers(m => {
m.minecraft.carvingMask('air')
}))
})
Void Start Platform
Type: void_start_platform
Creates a minecraft:void_start_platform configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('void_start_platform', 'void_start_platform')
.withPlacement(p => p.modifiers(m => {
m.minecraft.biome()
}))
})
Weeping Vines
Type: weeping_vines
Creates a minecraft:weeping_vines configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('weeping_vines', 'weeping_vines')
.withPlacement(p => p.modifiers(m => {
m.minecraft.inSquare()
}))
})
Bamboo
Type: bamboo
Creates a minecraft:bamboo configured feature
Inherits the methods of the no op builder
: The chance a podzol disk spawns under the bamboo stalk.probability(probability: float)- Must be in the range
[0, 1] - Defaults to
1
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('bamboo', 'bamboo')
// TODO
})
Basalt Columns
Type: basalt_columns
Creates a minecraft:basalt_columns configured feature
Inherits the methods of the no op builder
: The max radius of the column.reach(provider: IntProvider)- Must be in the range
[0, 3] - Must be set
- Must be in the range
: The maximum height of the column.height(provider: IntProvider)- Must be in the range
[1, 10] - Must be set
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('basalt_columns', 'basalt_columns')
// TODO
})
Block Column
Type: block_column
Creates a minecraft:block_column configured feature
Inherits the methods of the no op builder
: Adds a column layer.layer(height: IntProvider, state: BlockStateProvider)height: IntProvider: TheIntProviderdescribing the height of the layer- Must be non-negative
state: BlockstateProvider: TheBlockStateProviderto place for the layer
: The direction the column places in.direction(dir: Direction)Reveal/hide list of directions
updowneastwestnorthsouth
- Defaults to
up
: The.allowedPlacement(allowed: BlockPredicate)BlockPredicatecheck for each layer of the column
: Makes the column remove layers from the start of the column when space is restricted.prioritizeTip()
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('block_column', 'block_column')
// TODO
})
Block Pile
Type: block_pile
Creates a minecraft:block_pile configured feature
Inherits the methods of the no op builder
: The.stateProvider(provider: BlockStateProvider)BlockStateProviderto place- Must be set
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('block_pile', 'block_pile')
// TODO
})
Delta Feature
Type: delta_feature
Creates a minecraft:delta_feature configured feature
Inherits the methods of the no op builder
: The block to place as the interior of the delta.contents(state: BlockState)- Defaults to
minecraft:air
- Defaults to
: The block to place as the rim of the delta.rim(state: BlockState)- Defaults to
minecraft:air
- Defaults to
: The size of the delta interior.size(provider: IntProvider)- Must be in the range
[0, 16] - Must be set
- Must be in the range
: The size of the rim.rimSize(provider: IntProvider)- Must be in the range
[0, 16] - Must be set
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('delta_feature', 'delta_feature')
.size([11, 15])
.rimSize([ 1, 3])
.rim('minecraft:calcite')
.contents('minecraft:lava')
.withPlacement('minecraft:delta', p => {
p.modifiers(modifiers => {
let { minecraft } = modifiers
minecraft
.countOnEveryLayer(40)
.biome()
})
})
})
Disk
Type: disk
Creates a minecraft:disk configured feature
Inherits the methods of the no op builder
: The block(s) to place.stateProvider(fallback: BlockStateProvider, rules: List<RuleProvider>)fallback: BlockStateProvider: The fallbackBlockStateProviderto place if norulespassrules: List<RuleProvider>: A list ofRuleProviders, which can be made as an object with the following fieldsifTrue: BlockPredicate: TheBlockPredicatecheck for ifthenshould placethen: BlockStateProvider: TheBlockStateProviderif this rule’sifTruepasses
- Must be set
: The.target(target: BlockPredicate)BlockPredicatefor checking if the feature may place- Must be set
: The radius of the disk, as an.radius(radius: IntProvider)IntProvider- Must be in the range
[0, 8] - Must be set
- Must be in the range
: Half the height of the disk.halfHeight(height: int)- Must be in the range
[0, 4] - Defaults to
0
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('disk', 'disk')
// TODO
})
Dripstone Cluster
Type: dripstone_cluster
Creates a minecraft:dripstone_cluster configured feature
Inherits the methods of the no op builder
: How many blocks the feature searches for the floor or ceiling.floorToCeilingSearchRange(range: int)- Must be in the range
[1, 512] - Defaults to
1
- Must be in the range
: The height of the cluster as an.height(provider: IntProvider)IntProvider- Must be in the range
[1, 128] - Must be set
- Must be in the range
: The radius of the cluster as an.radius(provider: IntProvider)IntProvider- Must be in the range
[1, 128] - Must be set
- Must be in the range
: The maximum difference between the height of stalagmites and stalactites.maxStalagmiteStalactiteHeightDiff(diff: int)- Must be in the range
[0, 64] - Defaults to
1
- Must be in the range
: The maximum difference from the height of a dripstone.heightDeviation(deviation: int)- Must be in the range
[1, 64] - Defaults to
1
- Must be in the range
: The dripstone block layer’s thickness as an.dripstoneBlockLayerThickness(provider: IntProvider)IntProvider- Must be in the range
[0, 128] - Must be set
- Must be in the range
: The density of the columns as a.density(provider: FloatProvider)FloatProvider- Must be in the range
[0, 2] - Must be set
- Must be in the range
: The chance of also placing a pool as a.wetness(provider: FloatProvider)FloatProvider- Must be in the range
[0, 2] - Must be set
- Must be in the range
: The chance there is a column at the maximum distance from the center.chanceOfDripstoneColumnAtMaxDistanceFromCenter(chance: float)- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
: The maximum distance form the center that can influence the chance of the column placing.maxDistanceFromEdgeAffectingChanceOfDripstoneColumn(dist: int)- Must be in the range
[1, 64] - Defaults to
1
- Must be in the range
: The maximum distance from the center that can influence the height bias.maxDistanceFromCenterAffectingHeightBias(dist: int)- Must be in the range
[1, 64] - Defaults to
1
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('dripstone_cluster', 'dripstone_cluster')
// TODO
})
Large Dripstone
Type: large_dripstone
Creates a minecraft:large_dripstone configured feature
Inherits the methods of the no op builder
: The search range from start point to cave floor or ceiling.floorToCeilingSearchRange(range: int)- Must be in the range
[1, 512] - Defaults to
30
- Must be in the range
: The minimum and maximum radius of the column as an.columnRadius(provider: IntProvider)IntProvider- Must be in the range
[1, 60] - Must be set
- Must be in the range
: The height scale as a.heightScale(provider: FloatProvider)FloatProvider- A higher scale means a higher height
- Must be in the range
[0, 20] - Must be set
: The maximum radius between the column radius and the cave height.maxColumnRadiusToCaveHeightRatio(ratio: float)- Must be in the range
[0.1, 1] - Defaults to
0.1
- Must be in the range
: The bluntness/truncation of stalactites as a.stalactiteBluntness(provider: FloatProvider)FloatProvider- Higher values lead to shorter height
- Must be in the range
[0.1, 10] - Must be set
: The bluntness/truncation of stalagmites as a.stalagmiteBluntness(provider: FloatProvider)FloatProvider- Higher values lead to shorter height
- Must be in the range
[0.1, 10] - Must be set
: The inclination of the feature as a.windSpeed(provider: FloatProvider)FloatProvider- Must be in the range
[0, 2] - Must be set
- Must be in the range
: The minimum column radius for wind to cause an inclination.minRadiusForWind(radius: int)- Must be in the range
[0, 100] - Must be set
- Must be in the range
: The minimum bluntness value wind to cause an inclination.minBluntnessForWind(bluntness: float)- Must be in the range
[0, 5] - Defaults to
0
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('large_dripstone', 'large_dripstone')
// TODO
})
Pointed Dripstone
Type: pointed_dripstone
Creates a minecraft:pointed_dripstone configured feature
Inherits the methods of the no op builder
: The probability of a two tall dripstone generating.chanceOfTallerDripstone(chance: float)- Must be in the range
[0, 1] - Defaults to
0.2
- Must be in the range
: The probability a dripstone spreads in a horizontal direction.chanceOfDirectionalSpread(chance: float)- Must be in the range
[0, 1] - Defaults to
0.7
- Must be in the range
: The probability dripstone spreads horizontally two blocks.chanceOfSpreadRadius2(chance: float)- Must be in the range
[0, 1] - Defaults to
0.5
- Must be in the range
: The probability dripstone spreads horizontally a third block after the second block spread.chanceOfSpreadRadius3(chance: float)- Must be in the range
[0, 1] - Defaults to
0.5
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('pointed_dripstone', 'pointed_dripstone')
// TODO
})
End Gateway
Type: end_gateway
Creates a minecraft:end_gateway configured feature
Inherits the methods of the no op builder
: If entities should teleport to the exact exit position.exact(exact: boolean)- Ignored if the
exitis not defined - Defaults to
false
- Ignored if the
: Set the exit position of the gateway.exit(pos: BlockPos)
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('end_gateway', 'end_gateway')
// TODO
})
End Spike
Type: end_spike
Creates a minecraft:end_spike configured feature
Inherits the methods of the no op builder
: Makes the placed crystals invulnerable.invulnerableCrystals()
: The position the crystal beams target.crystalBeamTarget(pos: BlockPos)
: Add a spike to the list of generated spikes.spike(centerX: int, centerZ: int, radius: int, height: int, guarded: boolean)centerX: int: The x coordinate of the spikecenterZ: int: The z coordinate of the spikeradius: int: The radius of the spikeheight: int: The height of the spikeguarded: boolean: If the crystal should be surrounded by an iron bar cage
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('end_spike', 'end_spike')
// TODO
})
Fill Layer
Type: fill_layer
Creates a minecraft:fill_layer configured feature
Inherits the methods of the no op builder
: The.height(height: int)IntProviderheight of the layer- Must be in the range
[0, 4064] - Must be set
- Must be in the range
: The block to fill the layer with.state(state: BlockState)- Defaults to
minecraft:air
- Defaults to
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('fill_layer', 'fill_layer')
// TODO
})
Flower
Type: flower
Creates a minecraft:flower configured feature
Inherits the methods of the random patch builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('flower', 'flower')
// TODO
})
Forest Rock
Type: forest_rock
Creates a minecraft:forest_rock configured feature
Inherits the methods of the no op builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('forest_rock', 'forest_rock')
// TODO
})
Fossil
Type: fossil
Creates a minecraft:fossil configured feature
Inherits the methods of the no op builder
: The ids of fossil structure templates to choose from.fossilStructures(structures: List<ResourceLocation>)- The list must be of the same length as overlay structures
: The ids of overlay structure templates to choose from.overlayStructures(structures: List<ResourceLocation>)- The list must be of the same length as fossil structures
: The fossil.fossilProcessors(processors: Holder$Reference<StructureProcessorList>)StructureProcessorListto use- Must be set
: The overlay.overlayProcessors(processors: Holder$Reference<StructureProcessorList>)StructureProcessorListto use- Must be set
: How many corners may be empty while still allowing the structure to generate.maxEmptyCorners(corners: int)- Must be in the range
[0, 7] - Defaults to
0
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('fossil', 'fossil')
// TODO
})
Geode
Type: geode
Creates a minecraft:geode configured feature
Inherits the methods of the no op builder
: The.blocks(blocks: GeodeBlocks)GeodeBlockswhich define the blocks the geode will place.GeodeBlockscan be made as an object with the fieldsfilling?: BlockStateProvider: TheBlockStateProviderof the filling layer- Defaults to
minecraft:air
- Defaults to
innerLayer?: BlockStateProvider: TheBlockStateProviderof the inner layer- Defaults to
minecraft:amethyst_block
- Defaults to
alternativeInnerLayer?: BlockStateProvider: The alternativeBlockStateProviderof the inner layer- Defaults to
minecraft:budding_amethyst
- Defaults to
middleLayer?: BlockStateProvider: TheBlockStateProviderof the middle layer- Defaults to
minecraft:calcite
- Defaults to
outerLayer?: BlockStateProvider: TheBlockStateProviderof the outer layer- Defaults to
minecraft:smooth_basalt
- Defaults to
innerPlacements?: List<BlockState>: The blocks to place adjacent to the alternative inner layer blocks- Defaults to
['minecraft:small_amethyst_bud', 'minecraft:medium_amethyst_bud', 'minecraft:large_amethyst_bud', 'minecraft:amethyst_cluster'] - Must not be empty
- Defaults to
cannotReplace?: TagKey<Block>: The tag id of blocks which the geode cannot replace- Defaults to
minecraft:feature_cannot_replace
- Defaults to
invalidBlocks?: TagKey<Block>: The tag id of blocks which the geode considers invalid for spawning- Defaults to
minecraft:geode_invalid_blocks
- Defaults to
- Defaults to all of the above defaults
: The.layers(layers: GeodeLayers)GeodeLayerswhich defines the thickness of the geode’s layers.GeodeLayerscan be made as an object with the fieldsfilling?: float: The width of the filling layer- Defaults to
1.7
- Defaults to
innerLayer?: float: The width of the inner layer- Defaults to
2.2
- Defaults to
middleLayer?: float: The width of the middle layer- Defaults to
3.2
- Defaults to
outerLayer?: float: the width of the outer layer- Defaults to
4.2
- Defaults to
- Defaults to all of the above defaults
: The.crack(crack: GeodeCrack)GeodeCrackwhich defines the geode’s crack. AGeodeCrackcan be made as an object with the fieldsgenerateChance?: float: The probability the geode generates with a crack- Must be in the range
[0, 1] - Defaults to
1
- Must be in the range
baseSize?: float: The base size of the crack- Must be in the range
[0, 5] - Defaults to
2
- Must be in the range
pointOffset?: int: The offset applied to the crack- Must be in the range
[0, 10] - Defaults to
2
- Must be in the range
- Defaults to all of the above defaults
: The probability of placing an inner placement block next to an inner layer block.usePotentialPlacementsChance(chance: float)- Must be in the range
[0, 1] - Defaults to
0.35
- Must be in the range
: The chance to place an alternative inner place block instead of a regular inner layer block.useAlternativeLayer0Chance(chance: float)- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
: The.outerWallDistance(provider: IntProvider)IntProvideroffset on each coordinate of the center from the feature start- Must be in the range
[1, 20] - Defaults to
[4, 5]
- Must be in the range
: The number of distribution points as an.distributionPoints(provider: IntProvider)IntProvider- Must be in the range
[1, 20] - Defaults to
[3, 4]
- Must be in the range
: The point offset as an.pointOffset(provider: IntProvider)IntProvider- Must be in the range
[0, 10] - Defaults to
[1, 2]
- Must be in the range
: The minimum Chebyshev distance between a geode block and the center.minGenOffset(int: offset)- Defaults to
-16
- Defaults to
: The maximum Chebyshev distance between a geode block and the center.maxGenOffset(int: offset)- Defaults to
16
- Defaults to
: The noise multiplier.noiseMultiplier(multiplier: float)- Must be in the range
[0, 1] - Defaults to
0.05
- Must be in the range
: The threshold for invalid blocks.invalidBlocksThreshold(blocks: int)- Found by checking distribution points amount of times near the center of the geode
- Will not generate if the found count is greater than the given value
- defaults to
0
- Found by checking distribution points amount of times near the center of the geode
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('geode', 'geode')
// TODO
})
Huge Fungus
Type: huge_fungus
Creates a minecraft:huge_fungus configured feature
Inherits the methods of the no op builder
: The block to place the feature on.validBaseBlock(state: BlockState)- Must be set
: The stem block to place.stemState(state: BlockState)- Must be set
: The hat block to place.hatState(state: BlockState)- Must be set
: The block to place for decoration.decorState(state: BlockState)- Must be set
: The.replaceableBlocks(replaceable: BlockPredicate)BlockPredicatethat determines which blocks can be replaced by the feature- Defaults to
true
- Defaults to
: Allows the feature to exceed the world ceiling and makes blocks replaced by the feature drop their items.planted()
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('huge_fungus', 'huge_fungus')
// TODO
})
Huge Brown Mushroom
Type: huge_brown_mushroom
Creates a minecraft:huge_brown_mushroom configured feature
Inherits the methods of the no op builder
: The.capProvider(provider: BlockStateProvider)BlockStateProviderto use for the cap- Must be set
: The.stemProvider(provider: BlockStateProvider)BlockStateProviderto use for the stem- Must be set
: The size of the cap.foliageRadius(radius: int)- Defaults to
2
- Defaults to
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('huge_brown_mushroom', 'huge_brown_mushroom')
// TODO
})
Huge Red Mushroom
Type: huge_red_mushroom
Creates a minecraft:huge_red_mushroom configured feature
Inherits the methods of the huge brown mushroom builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('huge_red_mushroom', 'huge_red_mushroom')
// TODO
})
Iceberg
Type: iceberg
Creates a minecraft:iceberg configured feature
Inherits the methods of the forest rock builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('iceberg', 'iceberg')
// TODO
})
Lake
Type: lake
Creates a minecraft:lake configured feature
Inherits the methods of the no op builder
: The.fluid(provider: BlockStateProvider)BlockStateProviderto place as the lake’s fluid- Must be set
: The.barrier(provider: BlockStateProvider)BlockStateProviderto place as the lake’s barrier- Defaults to
minecraft:air, which does not replace blocks
- Defaults to
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('lake', 'lake')
// TODO
})
Multiface Growth
Type: multiface_growth
Creates a minecraft:multiface_growth configured feature
Inherits the methods of the no op builder
: The block to place.block(block: Block)- Must be an instance of
MultifaceBlock - Must be set
- Must be an instance of
: The range to search for a placement position.searchRange(range: int)- Must be in the range
[1, 64] - Defaults to
1
- Must be in the range
: Allow the feature to place on floors.canPlaceOnFloor()
: Allow the feature to place on ceilings.canPlaceOnCeiling()
: Allow the feature to place on walls.canPlaceOnWall()
: The chance the feature can spread.chanceOfSpreading(chance: float)- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
: The block(s) the placed block can be placed on.canBePlacedOn(blocks: HolderSet<Block>)- Defaults to
[]
- Defaults to
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('multiface_growth', 'multiface_growth')
// TODO
})
Nether Forest Vegetation
Type: nether_forest_vegetation
Creates a minecraft:nether_forest_vegetation configured feature
Inherits the methods of the no op builder
: The.stateProvider(provider: BlockStateProvider)BlockStateProviderto place
: The horizontal distance to spread over.spreadWidth(width: int)- Must be in the range
[1, ) - Defaults to
1
- Must be in the range
: The vertical distance to spread over.spreadHeight(height: int)- Must be in the range
[1, ) - Defaults to
1
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('nether_forest_vegetation', 'nether_forest_vegetation')
// TODO
})
No Bonemeal Flower
Type: no_bonemeal_flower
Creates a minecraft:no_bonemeal_flower configured feature
Inherits the methods of the random patch builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('no_bonemeal_flower', 'no_bonemeal_flower')
// TODO
})
Ore
Type: ore
Creates a minecraft:ore configured feature
Inherits the methods of the no op builder
: Adds an.target(target: OreTarget)OreTargetto the feature’s list of targets.OreTargets can be made as an object with the fieldstarget: RuleTest: TheRuleTestthat checks the block to replacestate: BlockState: the state to place iftargetpasses
: The size of the ore vein.size(size: int)- Must be in the range
[0, 64] - Defaults to
0
- Must be in the range
: The chance the whole ore blob is discarded if any of its blocks neighbor air.discardChanceOnAirExposure(chance: float)- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('ore', 'ore')
// TODO
})
Scattered Ore
Type: scattered_ore
Creates a minecraft:scattered_ore configured feature
Inherits the methods of the ore builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('scattered_ore', 'scattered_ore')
// TODO
})
Random Patch
Type: random_patch
Creates a minecraft:random_patch configured feature
Inherits the methods of the no op builder
: The number of attempts to generate.tries(tires: int)- Defaults to
128
- Defaults to
: The horizontal spread range.xzSpread(spread: int)- Must be non-negative
- Defaults to
7
: The vertical spread range.ySpread(spread: int)- Must be non-negative
- Defaults to
3
: The placed feature to generate multiple of.feature(placedFeature: Holder$Reference<PlacedFeature>)- Must be set
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('random_patch', 'random_patch')
// TODO
})
Replace Blobs
Type: replace_blobs
Creates a minecraft:replace_blobs configured feature
Inherits the methods of the no op builder
: The block to replace.target(block: Block)- Defaults to
minecraft:air
- Defaults to
: The state to place.state(state: BlockState)- Defaults to
minecraft:air
- Defaults to
: The blob radius.radius(provider: IntProvider)- Must be in the range
[0, 12] - Must be set
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('replace_blobs', 'replace_blobs')
// TODO
})
Replace Single Block
Type: replace_single_block
Creates a minecraft:replace_single_block configured feature
Inherits the methods of the no op builder
: The replacement targets.targetStates(targets: List<OreTargetState>)OreTargetStates can be made as an object with following fieldstarget: RuleTest: ARuleTest, the validation for ifstatecan placestate: BlockState: The block state to place iftargetmatches
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('replace_single_block', 'replace_single_block')
// TODO
})
Root System
Type: root_system
Creates a minecraft:root_system configured feature
Inherits the methods of the no op builder
: The feature to place on top of the root system.feature(feature: Holder$Reference<PlacedFeature>)- Must be set
: The required vertical space for the tree feature to generate.requiredVerticalSpaceForTree(space: int)- Must be in the range
[1, 64] - Defaults to
1
- Must be in the range
: The radius to place roots in.rootRadius(radius: int)- Must be in the range
[1, 64] - Defaults to
1
- Must be in the range
: The blocks that cane be replaced by roots.rootReplaceable(replaceable: TagKey<Block>)- Must be set
: The.rootStateProvider(provider: BlockStateProvider)BlockStateProviderto use for the root blob- Must be set
: The number times to attempt to place root blocks.rootPlacementAttempts(attempts: int)- Must be in the range
[1, 256] - Defaults to
1
- Must be in the range
: The maximum height of the root column/blob.rootColumnMaxHeight(height: int)- Must be in the range
[1, 4096] - Defaults to
1
- Must be in the range
: The radius at which to place hanging roots.hangingRootRadius(radius: int)- Must be in the range
[1, 64] - Defaults to
1
- Must be in the range
: The vertical range over which to place hanging roots.hangingRootsVerticalSpan(span: int)- Must be in the range
[0, 16] - Defaults to
1
- Must be in the range
: The.hangingRootStateProvider(provider: BlockStateProvider)BlockStateProviderto use for blocks which hang below the main root blob- Must be set
: The number of times to try to place hanging root blocks.hangingRootsPlacementAttempts(attempts: int)- Must be in the range
[1, 256] - Defaults to
1
- Must be in the range
: The maximum allowable submerged height the tree may be in.allowedVerticalWaterForTree(allowed: int)- Must be in the range
[1, 64] - Defaults to
1
- Must be in the range
: The.allowedTreePosition(allowed: BlockPredicate)BlockPredicatecheck for the tree’s position- Defaults to
true
- Defaults to
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('root_system', 'root_system')
// TODO
})
Sculk Patch
Type: sculk_patch
Creates a minecraft:sculk_patch configured feature
Inherits the methods of the no op builder
: The number of charges.chargeCount(count: int)- Must be in the range
[1, 32] - Defaults to
1
- Must be in the range
: The initial value of each charge.amountPerCharge(amount: int)- Must be in the range
[1, 500] - Defaults to
1
- Must be in the range
: The number of attempts to spread.spreadAttempts(attempts: int)- Must be in the range
[0, 64] - Defaults to
1
- Must be in the range
: The number of times to generate.growthRounds(rounds: int)- Must be in the range
[0, 8] - Defaults to
1
- Must be in the range
: The number of times to spread.spreadRounds(rounds: int)- Must be in the range
[0, 8] - Defaults to
0
- Must be in the range
: The number of extra shriekers to generate as an.extraRareGrowths(provider: IntProvider)IntProvider- Must be set
: The chance of generating a catalyst.catalystChance(chance: float)- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('sculk_patch', 'sculk_patch')
// TODO
})
Sea Pickle
Type: sea_pickle
Creates a minecraft:sea_pickle configured feature
Inherits the methods of the no op builder
: The number of times to place as a.count(count: IntProvider)IntProvider- Must be in the range
[0, 256] - Must be set
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('sea_pickle', 'sea_pickle')
// TODO
})
Seagrass
Type: seagrass
Creates a minecraft:seagrass configured feature
Inherits the methods of the no op builder
: Probability of using tall seagrass instead of regular seagrass.probability(probability: float)- Must be in the range
[0, 1] - Defaults to
1
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('seagrass', 'seagrass')
// TODO
})
Simple Block
Type: simple_block
Creates a minecraft:simple_block configured feature
Inherits the methods of the no op builder
: The.toPlace(provider: BlockStateProvider)BlockStateProviderto place
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('simple_block', 'simple_block')
// TODO
})
Spring
Type: spring
Creates a minecraft:spring configured feature
Inherits the methods of the no op builder
: The fluid to place, as derived from the block.fluidState(state: BlockState)
: The fluid to place. Note: there is not a.rawFluidState(state: FluidState)FluidStatewrapper, so an actualFluidStateobject is required
: If the spring requires a block matching the spring’s valid blocks below to generate.requiresBlockBelow(required: boolean)
: The number of neighboring blocks that must match the valid blocks of the spring.rockCount(count: int)- Defaults to
4
- Defaults to
: The required number of air blocks adjacent to the spring.holeCount(count: int)- The above block is not counted
- Defaults to
1
: The blocks the spring requires to generate.validBlocks(blocks: HolderSet<Block>)- Defaults to
[]
- Defaults to
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('spring', 'spring')
// TODO
})
Random Boolean Selector
Type: random_boolean_selector
Creates a minecraft:random_boolean_selector configured feature
Inherits the methods of the no op builder
: The id of a feature to place on a random.featureTrue(feature: Holder$Reference<PlacedFeature>)trueresult- Must be set
: The if of the feature to place on a random.featureFalse(feature: Holder$Reference<PlacedFeature>)falseresult- Must be set
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('random_boolean_selector', 'random_boolean_selector')
// TODO
})
Random Selector
Type: random_selector
Creates a minecraft:random_selector configured feature
Inherits the methods of the no op builder
: Adds the weighted feature to the list of possible features.withFeature(feature: Holder$Reference<PlacedFeature>, chance: float)feature: Holder$Reference<PlacedFeature>: the id of the feature to placechance: float: The chance, in the range[0, 1], thefeatureis placed- Note: Feature chances are evaluated sequentially and the first to place will be the only feature to place
: The feature to place if all chanced features fail to place.defaultFeature(feature: Holder$Reference<PlacedFeature>)- Must be set
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('random_selector', 'random_selector')
// TODO
})
Simple Random Selector
Type: simple_random_selector
Inherits the methods of the no op builder
: The features to randomly choose from to place.features(features: HolderSet<PlacedFeature>)- Must be set
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('simple_random_selector', 'simple_random_selector')
// TODO
})
Weighted Random Selector
Type: worldjs:weighted_random_selector
Creates a worldjs:weighted_random_selector configured feature
This works similarly to the simple random selector feature type, but only accepts a list of features which can be individually weighted
Inherits the methods of the no op builder
: The features to place as.features(features: List<WeightedValue<Holder$Reference<PlacedFeature>>>)WeightedValues- The list must not be empty
- Must be set
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('random_select', 'worldjs:weighted_random_selector')
// TODO
})
Tree
Type: tree
Creates a minecraft:tree configured feature
Inherits the methods of the no op builder
: The.trunkProvider(provider: BlockStateProvider)BlockStateProviderto use for the trunk of the tree- Must be set
: The trunk placer which defines how the trunk is placed.trunkPlacer(placer: TrunkPlacer)- Must be set
: The.foliageProvider(provider: BlockStateProvider)BlockStateProviderto use for the foliage of the tree- Must be set
: The foliage placer which defines how the foliage is placed.foliagePlacer(placer: FoliagePlacer)- Must be set
: The root placer of the tree.rootPlacer(placer: RootPlacer)
: The.dirtProvider(provider: BlockStateProvider)BlockStateProviderto place around the tree
: The minimum size required for the tree to place.minimumSize(size: FeatureSize)- Must be set
: The tree decorators, additional blocks to place on and around the tree.decorators(decorators: List<TreeDecorator>)
: Allow the tree to ignore vines blocking its spawn position.ignoreVines()
: Force the dirt to be placed, even if the ground was already dirt-like.forceDirt()
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('tree', 'tree')
// TODO
})
Underwater Magma
Type: underwater_magma
Creates a minecraft:underwater_magma configured feature
Inherits the methods of the no op builder
: The maximum distance to search for a placement position.floorSearchRange(range: int)- Must be in the range
[0, 512] - Defaults to
0
- Must be in the range
: The radius around the selected position to potentially place magma.placementRadiusAroundFloor(radius: int)- Must be in the range
[0, 64] - Defaults to
0
- Must be in the range
.placementProbabilityPerValidPosition(probability: float){: .language-kube-21 #underwater-magma-The probability of a magma block being placed at any given selected position- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('underwater_magma', 'underwater_magma')
// TODO
})
Twisting Vines
Type: twisting_vines
Creates a minecraft:twisting_vines configured feature
Inherits the methods of the no op builder
: The max spread width.spreadWidth(width: int)- Must be in the range
[1, ) - Defaults to
1
- Must be in the range
: The max spread height.spreadHeight(height: int)- Must be in the range
[1, ) - Defaults to
1
- Must be in the range
: The maximum height.maxHeight(height: int)- Must be in the range
[1, ) - Defaults to
1
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('twisting_vines', 'twisting_vines')
// TODO
})
Vegetation Patch
Type: vegetation_patch
Creates a minecraft:vegetation_patch configured feature
Inherits the methods of the no op builder
: The blocks that can be replaced with vegetation.replaceableBlocks(blocks: TagKey<Block>)- Must be set
: the.groundState(state: BlockStateProvider)BlockStateProvideruse to generate the column- Must be set
: The feature to place on finding a valid position.vegetationFeature(feature: Holder$Reference<PlacedFfeature>)- Must be set
: The.surface(surface: CaveSurface)CaveSurfaceto place onReveal/hide list of valid cave surfaces
ceilingfloor
- Defaults to
floor
: An.depth(depth: IntProvider)IntProviderdescribing the amount of blocks that should be replaced- Must be in the range
[1, 128] - Must be set
- Must be in the range
: The chance to add an extra block to the height.extraBottomBlockChance(chance: float)- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
: The y radius in which the column should search for available placement.verticalRange(range: int)- Must be in the range
[1, 256] - Defaults to
1
- Must be in the range
: The chance of placing the vegetation feature on finding a valid position.vegetationChance(chance: float)- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
: The horizontal radius to search for valid positions.xzRadius(radius: IntProvider)- Must be set
: The chance to add an extra search position next to the initial rectangle.extraEdgeColumnChance(chance: float)- Must be in the range
[0, 1] - Defaults to
0
- Must be in the range
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('vegetation_patch', 'vegetation_patch')
// TODO
})
Waterlogged Vegetation Patch
Type: waterlogged_vegetation_patch
Creates a minecraft:waterlogged_vegetation_patch configured feature
Inherits the methods of the vegetation patch builder
Example
ServerEvents.registry('worldgen/configured-feature', event => {
event.create('waterlogged_vegetation_patch', 'waterlogged_vegetation_patch')
// TODO
})
Placed Features
Placed features can be created using the JS event or via the .withPlacement(...) method of a configured feature builder
: Sets the configured feature the placed feature will place.configuredFeature(feature: Holder$Reference<ConfiguredFeature<?, ?>>)- Note: Will be ignored if the placed feature is derived from a configured feature builder
: Add the provided placement modifier.modifier(modifier: PlacementModifier)
: Add the provided json-defined placement modifier.jsonModifier(json: JsonElement)
: Add pre-defined placement modifiers via namespaced methods.modifiers(modifiers: Consumer<PlacedFeatureBuilder$Modifiers>).tag(tag...: ResourceLocation[]): Adds the tag(s) to the placed feature
Example
ServerEvents.registry('worldgen/placed_feature', event => {
event.create('sugar_cane_everywhere')
.configuredFeature('minecraft:patch_sugar_cane')
.modifiers(modifiers => {
let { minecraft } = modifiers
minecraft.biome()
.inSquare()
.heightmap('world_surface_wg')
})
})
Placed Feature Modifiers
Placement modifiers are created and added to placed features through a namespaced system of methods. The namespaces can be retrieved from the PlacedFeatureBuilder$Modifiers provided in the callback of .modifiers(...). All methods available from a namespace return the namespace, allowing for multiple modifiers from the same namespace to be added with minimal friction
By default WorldJS adds the following vanilla placement modifiers under the minecraft namespace, but other mods can add namespaces and methods of their own
: Add a minecraft:biome modifier. Restricts the feature to only place in biomes that include this feature.biome()
: Add a minecraft:in_square modifier. Adds a random x and z offset to the placement position between 0 and 15.inSquare()
: Add a minecraft:count modifier.count(count: IntProvider)count: IntProvider: The number of times to place at the position, in the range[0, 256]
: Add a minecraft:fixed_placement modifier.fixed(positions: BlockPos[])positions: BlockPos[]: The positions to place at, if in the same chunk as the placement is occurring in
: Add a minecraft:rarity_filter modifier.rarityFilter(chance: int)chance: int: The chance the feature will successfully place at a position as1 / chance
: Add a minecraft:carving_mask modifier.carvingMask(carvingStep: GenerationStep$Carving)carvingStep: GenerationStep$Carving: The carving step volume for which the feature will try to place in. Does not include blocks ‘carved’ out by noise cavesReveal/hide list of carving steps
airliquid
: Add a minecraft:heightmap modifier.heightmap(heightmap: Heightmap$Types)heightmap: Heightmap$Types: The heightmap to place onReveal/hide list of heightmap types
motion_blockingmotion_blocking_no_leavesocean_floorocean_floor_wgworld_surfaceworld_surface_wg
: Add a minecraft:noise_based_count modifier.noiseBasedCount(noiseToCountRatio: int, noiseFactor: float, noiseOffset?: float)noiseToCountRatio: int: The ratio of noise value to countnoiseFactor: float: The horizontal scale factor of the noise. Higher values make wider, more spaced out peaksnoiseOffset?: float: The vertical offset of the noise. Optional, defaults to 0
: Add a minecraft:noise_threshold_count modifier.noiseThresholdCount(noiseLevel: float, belowNoise: int, aboveNoise: int)noiseLevel: float: The threshold for determining ifaboveNoiseorbelowNoiseshould be usedbelowNoise: int: The count to use when below the thresholdaboveNoise: int: The count to use when above the threshold
: Add a minecraft:random_offset modifier.randomOffset(xzSpread: IntProvider, ySpread: IntProvider)xzSpread: IntProvider: The horizontal spread, in the range[-16, 16]ySpread: IntProvider: The vertical spread, in the range[-16, 16]
: Add a purely vertical minecraft:random_offset modifier.verticalRandomOffset(ySpread: IntProvider)ySpread: IntProvider: The vertical spread, in the range[-16, 16]
: Add a purely horizontal minecraft:random_offset modifier.horizontalRandomOffset(xzSpread: IntProvider)xzSpread: IntProvider: The horizontal spread, in the range[-16, 16]
: Add a minecraft:count_on_every_layer modifier.countOnEveryLayer(count: IntProvider)count: IntProvider: The count on each layer, in the range[0, 256]
: Add a minecraft:environment_scan modifier.environmentScan(directionOfSearch: Direction, targetCondition: BlockPredicate, allowedSearchCondition?: BlockPredicate, maxSteps: int)directionOfSearch: Direction: The direction to search inReveal/hide list of directions
updowneastwestnorthsouth
targetCondition: BlockPredicate: The block predicate to search forallowedSearchCondition?: BlockPredicate: The block predicate to validate each step to thetargetCondition. Optional, approves everything if not specifiedmaxSteps: int: the maximum number of blocks, in the range[1, 32], out from the original position to search for
: Add a minecraft:surface_relative_threshold_filter modifier.surfaceRelativeThreshold(heightmap: Heightmap$Types, minInclusive: int, maxInclusive: int)heightmap: Heightmap$Types: The heightmap to be within range ofReveal/hide list of heightmap types
motion_blockingmotion_blocking_no_leavesocean_floorocean_floor_wgworld_surfaceworld_surface_wg
minInclusive: int: The minimum elevation difference from the heightmapmaxInclusive: int: The maximum elevation difference from the heightmap
: Add a minecraft:surface_relative_threshold_filter modifier with no minimum bound.surfaceRelativeThresholdMax(heightmap: Heightmap$Types, maxInclusive: int)heightmap: Heightmap$Types: The heightmap to be within range ofReveal/hide list of heightmap types
motion_blockingmotion_blocking_no_leavesocean_floorocean_floor_wgworld_surfaceworld_surface_wg
maxInclusive: int: The maximum elevation difference from the heightmap
: Add a minecraft:surface_relative_threshold_filter modifier with no maximum bound.surfaceRelativeThresholdMin(heightmap: Heightmap$Types, minInclusive: int)heightmap: Heightmap$Types: The heightmap to be within range ofReveal/hide list of heightmap types
motion_blockingmotion_blocking_no_leavesocean_floorocean_floor_wgworld_surfaceworld_surface_wg
minInclusive: int: The minimum elevation difference from the heightmap
: Add a minecraft:surface_water_depth_filter modifier.surfaceWaterDepth(maxWaterDepth: int)maxWaterDepth: int: The maximum depth of water under which the feature can be placed
: Add a minecraft:block_predicate_filter modifier.blockPredicate(predicate: BlockPredicate)predicate: BlockPredicate: The validator for a placing at a position
: Add a minecraft:height_range modifier.heightRange(height: HeightProvider)height: HeightProvider: The height range over which the feature can place
: Add a minecraft:height_range modifier that has a uniform chance of placing anywhere in the bounds.uniformHeightRange(minInclusive: VerticalAnchor, maxInclusive: VerticalAnchor)minInclusive: VerticalAnchor: A vertical anchor, the lower placement boundmaxInclusive: VerticalAnchor: A vertical anchor, the upper placement bound
: Add a minecraft:height_range modifier that has the highest chance of placing the feature in the center of the bounds.triangleHeightRange(minInclusive: VerticalAnchor, maxInclusive: VerticalAnchor)minInclusive: VerticalAnchor: A vertical anchor, the lower placement boundmaxInclusive: VerticalAnchor: A vertical anchor, the upper placement bound
: Add a minecraft:height_range modifier that places the feature at the exact height given.constantHeightRange(height: VerticalAnchor)height: VerticalAnchor: A vertical anchor, the height to place at