Biomes where they shouldn't be / topBlockMeta broken
nanakisan opened this issue ยท 27 comments
Either i'm misunderstanding the documentation or something is wrong.
this is a snip of my script that shows me attempting to remove jungle biomes
jungle = forBiomes(21)
jungle2 = forBiomes(22)
jungle3 = forBiomes(23)
jungle4 = forBiomes(151)
Tweaker.setStage("PRE_INIT")
jungle.remove()
jungle2.remove()
jungle3.remove()
jungle4.remove()
However jungle biomes keep appearing in my worldgen. Which is clearly something said would not happen. I've tried all manners of making them non-existent. I've made their humidity a godly high number with a temp of -2. Just so only my mesa biomes would generate endless.
Here is the complete script
Specify ids
desert = forBiomes(165)
hills = forBiomes(37)
river = forBiomes(7)
ocean = forBiomes(0)
jungle = forBiomes(21)
jungle2 = forBiomes(22)
jungle3 = forBiomes(23)
jungle4 = forBiomes(151)
Add desert to all types so other stuff doesn't appear as often
desert.addToGeneration("WARM", 20000)
desert.addToGeneration("COOL", 20000)
desert.addToGeneration("DESERT", 20000)
desert.addToGeneration("ICY", 20000)
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")
jungle.remove()
jungle2.remove()
jungle3.remove()
jungle4.remove()
ocean.remove()
desert.set("reedsPerChunk", 20)
desert.set("clayPerChunk", 10)
desert.set("height", .5)
desert.set("waterTint", CC6600)
desert.removeDecoration("LAKE")
desert.removeFeature("LAKE")
desert.set("topBlock", "minecraft:sand")
desert.set("topBlockMeta", 1)
desert.genVillages("true")
hills.set("height", .1)
hills.set("heightVariation", .3)
hills.set("clayPerChunk", 20)
ocean.removeDecoration("LAKE")
ocean.removeFeature("LAKE")
ocean.set("temperature", 2)
Tweaker.setStage("FINISHED_LOAD")
riverBiome.set("topBlock", "fillerBlock", "minecraft:hardened_clay")
/*
jungleBiome.set("temperature", -2)
jungleBiome.set("humidity", 2)
*/
Remove other biomes
all = forAllBiomes()
all.set("genWeight", 1)
all.set("isSpawnBiome", false)
remove all water (keeps lakes tho)
all.registerGenBlockRep("minecraft:water", "minecraft:hardened_clay")
final weighting - hills about 1/10 the time
desert.set("isSpawnBiome", true)
desert.set("genWeight", 50000)
hills.set("isSpawnBiome", true)
hills.set("genWeight", 5000)
As you can obviously tell i've been modifying the provided example script for desert worlds. So far the results are rather good. However one glaring issue is that while obviously declared. Jungles keep appearing in world generation despite being declared for removal.
Is it broken? on v2.0.154 I ran the command
desert.set("topBlockMeta", 1)
In a script by itself, and along with the desert world example script, both inside and outside of a development environment. All four cases yielded a fully functionally red sand desert.
Hmm let me check that. because when I did it. The desert was not generating with red sand.
Just tested with that exact script. topBlockMeta is still broken
https://imgur.com/a/QcUBc
I altered the script to only include features I needed
http://pastebin.com/CSssHhWx
Also there is a very weird issue presenting itself. desert biome will generate normally. However it produces random chunks of mesa. Then immediately returns to generating desert.
This is important to note however. This happened "before" I changed the script to use Mesa Plateau as the hills biome. This has been a very consistent issue through all versions of the mod.
I am using v154 for all of these results.
I am also currently using forge 1448 (recommended)
I'm afraid this issue just got a lot harder to solve. This is what happened when I ran that script:
One of the mods you are using is causing the topBlockMeta to fail. I'll need a full client log and a full mod list. Once you done that, you can try removing mods you might suspect to be messing with generation.
Has topBlockMeta been fixed yet? I was hoping to do a desert biome. but with red sand instead of normal sand.
Aye just glad I could be of help throwing that issue into the wind. So far the generation is working very well. once those overrides were disabled. Suddenly everything started generating proper. Honestly I think i'm going to have to throw in a biome replacement for every vanilla biome...Now I have lovely taiga biomes spawning next to my deserts xD
You should now be able to allow BOP's overrides, and use the "PRE_INIT" stage in the latest build.
I have suspicion it's actually Biomes O'Plenty doing this. Which makes no logical sense as I am using the default terrain generator. So BiomesOP shouldn't even be affecting my worlds. I am however forcing BiomeOP biomes into my world using the biome replace method in my original script.
I can confirm your suspicions. Throwing Biomes O' Plenty into my world causes the lack of topBlockMeta. This is because Biomes O' Plenty overrides vanilla biomes with their own "inherited" biomes:
This new biome runs the generator method in the old biome. However, since the old biome is replaced during preInit, BiomeTweaker is actually setting the topBlockMeta in the inherited biome. The old biome does not see this new value, and generates with the default meta.
A fix for this could be to move the script parsing to the even earlier FMLConstructionEvent, allowing another application stage "CONSTRUCTION" that will apply before "PRE_INIT". This will allow the field to be properly set in the old biome. I'll get back to you when I implement a fix.
I actually found a fix myself. I simply disabled BiomeOP's overrides.
"vanilla biomes to override" {
B:"Birch Forest"=false
B:"Birch Forest Hills"=false
B:"Cold Taiga"=false
B:"Cold Taiga Hills"=false
B:Desert=false
B:DesertHills=false
B:"Extreme Hills"=false
B:"Extreme Hills Edge"=false
B:Forest=false
B:ForestHills=false
B:Hell=false
B:"Ice Plains"=false
B:Jungle=false
B:JungleEdge=false
B:JungleHills=false
B:Mesa=false
B:"Mesa Plateau"=false
B:"Mesa Plateau F"=false
B:MushroomIsland=false
B:MushroomIslandShore=false
B:Ocean=false
B:Plains=false
B:River=false
B:"Roofed Forest"=false
B:Savanna=false
B:"Savanna Plateau"=false
B:Swampland=false
B:Taiga=false
B:TaigaHills=false
}
doing this allowed my worlds to generate proper finally.
Glad to hear. I am still going to implement the fix mentioned above, in case anyone wants to keep the BOP overrides.
\o/
I'll commence testing shortly then. There is a bowl of ramen with my name on it down the street.
I think we can go ahead and close this issue. It's starting to become a convoluted mess of topics.
Sorry, apparently I missed the email for the creation of this issue. I'll let you know what I figure out in a bit.
No worries I have the patience of a saint. But yeah it is strange this kept happening.
All right, I've added a new command in build 129:
http://jenkins.superckl.me/job/BiomeTweaker/129/
With this, you could put this in your script
jungle.registerGenBiomeRep(165)
and the jungle biome will be replaced by whatever biome has id 165. This replacement occurs very, very early in generation, right after the stone maps are created. This means that tree, topblocks, lakes, etc. will appear correctly, but the root height and variation will be off. To fix this, you must set the heights of the biome you are replacing to the one you are replacing with, e.g.
jungle.registerGenBiomeRep(165)
jungle.set("height", 0.5)
jungle.set("heightVariation", 0.2)
With this in your script, all jungle that is hard-coded will be replaced by Mesa (Bryce), and you shouldn't even be able to tell the replacement occurred. Let me know how it works out for you.
So, some biomes are actually hardcoded into vanilla generation (jungle, taiga, river, ocean, and more), and there is no explicit way to remove them. However, awhile back I identified a slightly hacky way of replacing biomes at generation time, but I've been holding off on adding it. Since this sort of thing seems to be such a common request, I'll go ahead and add it.
I'll let you know once I have.
Oh, sorry. The whole thing got corrupted so I had to set it up again. You should be able to see the jobs now.
Congratulations my good man. You just did something absolutely amazing!
https://imgur.com/a/Y8KGC
1st image shows a jungle temple
2nd is a wastelands biome from Biomes'OP replacing a Jungle edge biome! WEEEEE!
YEEEEEES! I LOVE THIS!
Wasteland replacing a River biome!
https://imgur.com/a/lKdZL
Ohh excellent let me apply this update and see what happens. Heck man I even tried tricking 1.7 worldgen itself. Set jungle to -2 and all it's sub-biomes to -2 temps and even their dictionary assignments to COLD. Removed DENSE, JUNGLE, HOT etc etc from them. They still appeared right next to a hot biome. It was hilarious to see a snowy jungle xD
Honestly this feature is simply genius! it makes designing custom biomes so easy now!
Glad to hear it! I'll close this issue when the feature is included in an official release.
Just an update: I'm going to be releasing this with version 3.0. As the version suggests, it's going to contain pretty significant internal changes, and will need lots of testing.
I'm basically ripping out the guts of BT (the scripting environment) into a separate API, making it really easy for other mods to add compatibility. I'd love if you'd be willing to help test when the time comes.