Skip to content

Example Scripts

Chris edited this page Jun 19, 2017 · 11 revisions

Creating a Desert World

The following script created by clubpetey can be used to create a world that is mostly desert. The oceans and rivers will also be dry, but lakes will still be present as the only water source.

#Specify ids
desert = forBiomes(2)
hills = forBiomes(17)
river = forBiomes(7)
 
#Add desert to all types so other stuff doesn't appear as often
desert.addToGeneration("WARM", 2000)
desert.addToGeneration("COOL", 2000)
desert.addToGeneration("DESERT", 2000)
desert.addToGeneration("ICY", 2000)
 
#control spawns
desert.removeAllSpawns("CREATURE")
desert.addSpawn("net.minecraft.entity.passive.EntityPig", "CREATURE", 60, 1, 3)
desert.addSpawn("net.minecraft.entity.passive.EntityChicken", "CREATURE", 100, 2, 2)
 
#repeat for desertHills, not as often tho
hills.addToGeneration("WARM", 200)
hills.addToGeneration("COOL", 200)
hills.addToGeneration("DESERT", 200)
hills.addToGeneration("ICY", 200)
 
hills.removeAllSpawns("CREATURE")
hills.addSpawn("net.minecraft.entity.passive.EntityHorse", "CREATURE", 10, 1, 1)
 
#river spawns
river.removeAllSpawns("CREATURE")
river.addSpawn("net.minecraft.entity.passive.EntityCow", "CREATURE", 60, 1, 2)
river.addSpawn("net.minecraft.entity.passive.EntitySheep", "CREATURE", 40, 2, 2)
 
Tweaker.setStage("PRE_INIT")
desert.set("reedsPerChunk", 20)
desert.set("clayPerChunk", 10)
hills.set("clayPerChunk", 10)
Tweaker.setStage("FINISHED_LOAD")
 
#Remove other biomes
all = forAllBiomes()
all.set("genWeight", 11)
all.set("isSpawnBiome", false)
 
#remove all water (keeps lakes tho)
all.registerGenBlockRep("minecraft:water", "minecraft:air")
 
#final weighting - hills about 1/10 the time
desert.set("isSpawnBiome", true)
desert.set("genWeight", 50000)
hills.set("isSpawnBiome", true)
hills.set("genWeight", 5000)

Turning Taiga Into Nether

Changes in recent versions are not reflected in this script. Take the following script

taigaBiome = forBiomes(5)
taigaBiome.removeAllSpawns("CREATURE")
taigaBiome.removeAllSpawns("WATER_CREATURE")
taigaBiome.removeAllSpawns("CAVE_CREATURE")
taigaBiome.removeAllSpawns("MONSTER")
taigaBiome.addSpawn("net.minecraft.entity.monster.EntityGhast", "MONSTER", 50, 4, 4)
taigaBiome.addSpawn("net.minecraft.entity.monster.EntityPigZombie", "MONSTER", 100, 4, 4)
taigaBiome.addSpawn("net.minecraft.entity.monster.EntityMagmaCube", "MONSTER", 1, 4, 4)
taigaBiome.set("temperature", 2.0)
taigaBiome.set("topBlock", "fillerBlock", "minecraft:netherrack")
taigaBiome.set("enableRain", false)

which has the following result:

As you can see, we've essentially turned the Taiga into an overworld nether. The values I used in the script are taken from BiomeTweaker's output for the Hell biome. Essentially, I remove all the regular spawns from Taiga, and insert values from the Hell biome. Notice that tress and grass did not generate, because netherrack is not a valid material to plant them on.

BiomeTweaker has been updated to 1.18. Please see the links below. Pages for previous versions can be found above.


BiomeTweaker 1.18

Features and Carvers

Custom Mob Effects

Example Scripts

Clone this wiki locally