BiomeTweaker

BiomeTweaker

13M Downloads

registerGenBlockRep not working on custom biome

TheBeardyPenguin opened this issue ยท 1 comments

commented

I added a new crater biome to Luna (DIMID: 100) in advanced rocketry and used registerGenBlockRep to change the stone generation to andesite and basalt. The replacement works just fine for the highlands and lowlands biomes, but nothing happens in the new craters biome. This is my script:

#Register new craters biome for Luna
Tweaker.setScriptStage("BIOME_REGISTRY")
Tweaker.createBiome("craters", "minecraft:frozen_ocean")

Tweaker.setScriptStage("POST_INIT")
Tweaker.setPlacementStage("BIOME_BLOCKS")
lowlands = forBiomes("advancedrocketry:moondark")
highlands = forBiomes("advancedrocketry:moon")
craters = forBiomes("biometweaker:craters")
andesite = forBlock("minecraft:stone")
andesite.setProperty("variant", "andesite")
basalt = forBlock("projectred-exploration:stone")
basalt.setProperty("type", "basalt")

#Specifications for the craters biome
craters.remove()
craters.set("name", "Crater")
craters.set("topBlock", "advancedrocketry:moonturf_dark")
craters.set("fillerBlock", "advancedrocketry:moonturf_dark")
craters.set("oceanTopBlock", "advancedrocketry:moonturf_dark")
craters.set("genInitialSnow", false)
craters.set("temperature", 0.3)
craters.set("humidity", 0)

#Replace stone, sand and water
Tweaker.setWorld(100)
Tweaker.setPlacementStage("PRE_POPULATE")
allBiomes = forAllBiomes()
blockRep = newBlockReplacement()
blockRep.set("minY", 0)
blockRep.set("maxY", 256)
blockRep.set("ignoreMeta", true)
blockRep.set("block", andesite)
blockRep2 = newBlockReplacement()
blockRep2.set("minY", 0)
blockRep2.set("maxY", 45)
blockRep2.set("ignoreMeta", true)
blockRep2.set("block", basalt)

allBiomes.registerGenBlockRep(1, "minecraft:stone", blockRep)
allBiomes.registerGenBlockRep(3, "minecraft:stone", blockRep2)
allBiomes.registerGenBlockRep("minecraft:sandstone", "advancedrocketry:moonturf_dark")
allBiomes.registerGenBlockRep("minecraft:sand", "advancedrocketry:moonturf_dark")
allBiomes.registerGenBlockRep("minecraft:water", "advancedrocketry:moonturf_dark")
allBiomes.registerGenBlockRep("minecraft:lava", "advancedrocketry:moonturf_dark")
commented

Fixed by changing the script stage to later

#Register new craters biome for Luna
Tweaker.setScriptStage("BIOME_REGISTRY")
Tweaker.createBiome("craters", "minecraft:frozen_ocean")

Tweaker.setScriptStage("FINISHED_LOAD")
Tweaker.setPlacementStage("BIOME_BLOCKS")
lowlands = forBiomes("advancedrocketry:moondark")
highlands = forBiomes("advancedrocketry:moon")
craters = forBiomes("biometweaker:craters")
beach = forBiomes("minecraft:beaches")
andesite = forBlock("minecraft:stone")
andesite.setProperty("variant", "andesite")
permafrost = forBlock("quark:biome_cobblestone")
permafrost.setProperty("variant", "icy_stone")
basalt = forBlock("projectred-exploration:stone")
basalt.setProperty("type", "basalt")

#Specifications for the craters biome
beach.set("genInitialSnow", false)
beach.set("name", "Slope")
beach.set("genScatteredFeatures", true)
beach.set("genVillages", false)
craters.remove()
craters.set("name", "Crater")
craters.set("topBlock", "advancedrocketry:moonturf_dark")
craters.set("fillerBlock", permafrost)
craters.set("oceanFillerBlock", permafrost)
craters.set("oceanTopBlock", "advancedrocketry:moonturf_dark")
craters.set("genInitialSnow", false)
craters.set("temperature", 0.3)
craters.set("humidity", 0)
craters.set("genScatteredFeatures", true)
craters.set("genVillages", false)
beach.removeAllSpawns("MONSTER")
craters.removeAllSpawns("MONSTER")

#Specifications for existing luna biomes
lowlands.removeAllSpawns("MONSTER")
lowlands.set("topBlock", "advancedrocketry:moonturf_dark")
lowlands.set("fillerBlock", "advancedrocketry:moonturf_dark")
lowlands.set("height", 0.1)
lowlands.set("name", "Mare")
lowlands.set("genScatteredFeatures", true)
lowlands.set("genVillages", false)
highlands.set("topBlock", "advancedrocketry:moonturf")
highlands.set("fillerBlock", "advancedrocketry:moonturf")
highlands.set("name", "Highlands")
highlands.set("genScatteredFeatures", true)
highlands.set("genVillages", false)
lowlands.removeAllSpawns("MONSTER")
highlands.removeAllSpawns("MONSTER")

#Replace stone, sand and water
Tweaker.setScriptStage("SERVER_STARTING")
Tweaker.setWorld(100)
Tweaker.setPlacementStage("PRE_POPULATE")
allBiomes = forAllBiomes()
allBiomes.set("enableRain", false)
blockRep = newBlockReplacement()
blockRep.set("minY", 45)
blockRep.set("maxY", 256)
blockRep.set("ignoreMeta", true)
blockRep.set("block", "advancedrocketry:moonturf_dark")
blockRep2 = newBlockReplacement()
blockRep2.set("minY", 0)
blockRep2.set("maxY", 256)
blockRep2.set("ignoreMeta", true)
blockRep2.set("block", basalt)

allBiomes.registerGenBlockRep("minecraft:water", blockRep2)
allBiomes.registerGenBlockRep("minecraft:lava", blockRep2)
allBiomes.registerGenBlockRep("minecraft:dirt", blockRep2)
allBiomes.registerGenBlockRep("minecraft:gravel", blockRep2)
allBiomes.registerGenBlockRep(1, "minecraft:stone", blockRep)
allBiomes.registerGenBlockRep(5, "minecraft:stone", blockRep2)
allBiomes.registerGenBlockRep("minecraft:sandstone", "advancedrocketry:moonturf_dark")
allBiomes.registerGenBlockRep("minecraft:sand", "advancedrocketry:moonturf_dark")