Minecraft 1.18.1:
https://javadocs.duckdns.org/AdvancedWorldCreatorAPI/
Creating an Custom Biome:
Code (Java):
BiomeCreator biomeCreator
=
new BiomeCreator
(
"firstname",
"secondname"
)
;
biomeCreator.
setWaterColor
(
new java.
awt.
Color
(
76,
255,
255
)
)
;
biomeCreator.
setGrassColor
(
new java.
awt.
Color
(
136,
0,
0
)
)
;
biomeCreator.
setSkyColor
(
new java.
awt.
Color
(
1,
73,
51
)
)
;
biomeCreator.
setWaterFogColor
(
new java.
awt.
Color
(
255,
255,
255
)
)
;
//.... more stuff can be added here (Mobs, Structures....)
// If true: allows the Biome to overwrite existing Biome if exist (also possible to overwrite vanilla Biomes with same name: minecraft:plains, minecraft:desert ...)
BiomeCreator.
CustomBiome customBiome
= biomeCreator.
createBiome
(
true
)
;
Using Custom DecorationPopulator in custom Biomes:
Code (Java):
// You can use one of the following PlacementType's to influence the y-coordinate of the placement
BiomeDecorationPopulator.
PlacementType placementType_heightMap
=
new BiomeDecorationPopulator.
HeightmapPlacementType
(HeightMap.
MOTION_BLOCKING
)
;
BiomeDecorationPopulator.
PlacementType placementType_range
=
new BiomeDecorationPopulator.
RangePlacementType
(
10,
10
)
;
// Use at least one or more of the PlacementType's like in the following example
biomeCreator.
addCustomDecorationPopulator
(BiomeDecorationType.
TOP_LAYER_MODIFICATION,
new BiomeDecorationPopulator
(
new BiomeDecorationPopulator.
PlacementType
[
]
{placementType_heightMap
}
)
{
@Override
public
void populateDecoration
(WorldModifier worldModifier,
int x,
int y,
int z
)
{
// worldModifier only has a few methods, but you can use them to modify the world
// one Method allows to get a BlockData at a specific position
// the other Method allows to set a BlockData at a specific position
// Note: NEVER! try to set Blocks via Bukket-API at this point, because it will cause a lot of lag
// and will probably cause a crash
// The following example will check the Block at the given position and will set it to a Diamond Block
// if the Block is AIR
// x and z are the lowest x and z coordinates of the chunk that is currently being generated
// y is the y coordinate which is modified by the PlacementTypes
BlockData blockData
= worldModifier.
getBlockData
(x,y,z
)
;
if
(blockData.
getMaterial
(
)
== Material.
AIR
)
{
worldModifier.
setBlockData
(x, y, z, Material.
DIAMOND_BLOCK.
createBlockData
(
)
)
;
}
}
}
)
;
Using an Custom Biome:
(Note: You can use Custom Biomes only in the AdvancedWorldCreator with the #setAdvancedBiomeProvider(AdvancedBiomeProvider) Method and Class!)
This creates an repeating Lines-BiomeProvider which can handle default Biomes and also Custom Biomes.
Code (Java):
BiomeProviderLines.
Builder builder
=
new BiomeProviderLines.
Builder
(
1,
true
)
;
// size: 1, true: repeating in X-Dir
builder.
addBiome
(myCustomBiome
)
;
builder.
addBiome
(org.
bukkit.
block.
Biome.
PLAINS
)
AdvancedBiomeProvider biomeprovider
= builder.
create
(
)
;
AdvancedWorldCreator#setAdvancedBiomeProvider
(biomeprovider
)
;
Creating an Advanced World:
This will create an World with the name "advancedworld" and the seed "123456789". Also the default Block is set to Diamond-Block which is Stone by default. The minY is set to -128 like Vanilla Worlds generate but 2 times deeper. The Height (256+128) means that from 0 all the way up are 256 Blocks to use. (Just shows what the minY and the Height means)
Code (Java):
AdvancedWorldCreator creator
=
new AdvancedWorldCreator
(
"advancedworld"
)
;
creator.
seed
(
123456789
)
;
// The following will change the logical functions of Minecraft like Ambient-Light or if a Bed will work or explode and much more.
// By using the NamespacedKey you can either change vanilla Environments or create a new Environment
EnvironmentBuilder environmentBuilder
=
new EnvironmentBuilder
(
new NamespacedKey
(
"my_cutom_environment",
"the_environment_to_use"
)
)
;
environmentBuilder.
setOverwriteSettingsIfExist
(
true
)
;
environmentBuilder.
setHeight
(
384
+
64
)
;
environmentBuilder.
setMinY
(
-
128
)
;
environmentBuilder.
setLogicalHeight
(
384
+
64
)
;
environmentBuilder.
setAmbientLight
(0.0f
)
;
environmentBuilder.
setBedWorks
(
false
)
;
environmentBuilder.
setUltraWarm
(
true
)
;
environmentBuilder.
setRespawnAnchorWorks
(
true
)
;
environmentBuilder.
setNatural
(
false
)
;
creator.
setEnvironmentBuilder
(environmentBuilder
)
;
// The following will allow you to change the Word-Generation completly
// Note that the minY and Height+LogicalHeight should be identical with this settings and both (the EnvironmentBuilder and GeneratorConfiguration) need to be set to activate the settings!
// By using the NamespacedKey you can either change vanilla GeneratorSettings or create a new GeneratorSetting
GeneratorConfiguration generatorConfig
=
new GeneratorConfiguration
(
new NamespacedKey
(
"my_cutom_genconfig",
"the_genconfig_to_use"
)
)
;
generatorConfig.
setDefaultBlock
(Material.
DIAMOND_BLOCK
)
;
generatorConfig.
getNoiseGeneration
(
).
setMinY
(
-
128
)
;
generatorConfig.
getNoiseGeneration
(
).
setHeight
(
256
+
128
)
;
// The following will copy the NoiseRouterData of an existing Generator like Overworld, or The End ....
generatorConfig.
setNoiseRouterData
(NoiseRouterData.
OVERWORLD
)
;
creator.
setGeneratorConfiguration
(generatorConfig
)
;
org.
bukkit.
World advancedworld
= creator.
createWorld
(
)
;