[MC-398] Structures generating in wrong biomes Created: 25/Oct/12  Updated: 14/Aug/20  Resolved: 31/Oct/12

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2
Fix Version/s: Minecraft 1.4.3

Type: Bug
Reporter: Ben H-W Assignee: Unassigned
Resolution: Fixed Votes: 11
Labels: biome, structure, world-generation
Environment:

Windows 7 64bit
Java version 7
World created in 1.4 pre
Chunks generated in 1.4.2


Attachments: PNG File 2012-10-25_15.35.41.png     PNG File 2012-10-25_18.17.39.png     PNG File 2012-10-26_23.17.11.png     PNG File 2012-10-28_13.44.50.png     Zip Archive MC-398-fix.zip     PNG File witchhutdesert.png     PNG File wth.png     PNG File wth2.png    
Issue Links:
Duplicate
is duplicated by MC-659 Desert Temple spawned in place of Swa... Resolved
is duplicated by MC-824 Bug in generating the pyramid Resolved
is duplicated by MC-934 Incorrect Spawning of villages, templ... Resolved
Confirmation Status: Unconfirmed

 Description   

The desert temples should only spawn in desert biomes but this one spawned in a swamp biome.


Update

It appears that these temples could be spawning instead of other structures e.g. witch huts in swamps and jungle temples in jungles.

WHEN POSTING AN IMAGE PLEASE INCLUDE COORDINATES AND SEED



 Comments   
Comment by michaeldutton [ 02/Nov/12 ]

that jungle temple looks so weird XD oh and i got a bug for ya FIX THE FRICKIN GENERATION ERRORS!!!!

Comment by Shaylyn Flora Archuleta [ 01/Nov/12 ]

Aww no.....I loved this bug....

Comment by [Mojang] Jeb (Jens Bergensten) [ 31/Oct/12 ]

Temples and huts are now more strictly placed in correct biomes. I haven't looked at placement of villages, please create a separate bug report for that.

Comment by DiEvAl [ 30/Oct/12 ]

As far as I know, there isn't.

Comment by David Green [ 29/Oct/12 ]

Is there a structure ID list? Could the game try and generate "1" (a village) in the correct place, but end up with "2", a temple (just an example)? Maybe the NPC villages in "wth" and "wth2" should have been strongholds.

Comment by DiEvAl [ 28/Oct/12 ]

Found one problem with villages. But it's also only happening on biome borders, and couldn't cause the village in wth2.png. There must be something else that I can't find.

Comment by DiEvAl [ 28/Oct/12 ]

@Timothy Cachia
Can you give me the seed and coordinates?

Looking into villages now.

Comment by Ben H-W [ 28/Oct/12 ]

Congrats it appears that the mod fix by DiEvAl has fixed the problem!! Checked seed: 6837862977289291133 x-cords: -660 z-cords:521 for temple and it wasn't there check out the image attached.

Comment by Timothy Cachia [ 27/Oct/12 ]

You sure DiEvAl? I found structures (incorrectly spawned) in one single biome. For example in the middle of the ocean surround by nothing but ocean.

Also, the bug is effecting all structures including villages... not just temples.

Comment by DiEvAl [ 27/Oct/12 ]

I made a mod that is supposed to fix desert temples generating instead of witch huts and jungle temples. I added it as attachment.

@mojang I replaced this code:

return world.getChunkManager().areBiomesViable(chunkX * 16 + 8, chunkZ * 16 + 8, 0, biomeList);

with this code:

return biomeList.contains(world.getBiomeGenForCoords(chunkX * 16 + 8, chunkZ * 16 + 8));

It looks like world.getChunkManager().areBiomesViable(x, z, 0, biomeList) checks slightly different block(s) than
world.getBiomeGenForCoords(x, z). So when (x,z) is near the biome border, they return different results. Not sure why.

Also I replaced this (pseudocode incoming!):

biome = world.getBiomeGenForCoords(chunkX * 16 + 8, chunkZ * 16 + 8);
if (biome == jungleHills || biome == jungle) {
    // jungle temple
} else if (biome == swampland) {
    // witch hut
} else {
    // desert temple
}

with this:

biome = world.getBiomeGenForCoords(chunkX * 16 + 8, chunkZ * 16 + 8);
if (biome == jungleHills || biome == jungle) {
    // jungle temple
} else if (biome == swampland) {
    // witch hut
} else if (biome == desertHills || biome == desert) {
    // desert temple
} else {
    // bug!
}

This last change is not required of course.

Comment by Timothy Cachia [ 27/Oct/12 ]

The problem is on every structure... witch hut, temple. villages, etc...

Posted one earlier on regarding a village and temple spawning the middle of a desert.

https://mojang.atlassian.net/browse/MC-934

Comment by DiEvAl [ 27/Oct/12 ]

I have an idea why this might be happening. If my idea is true, then structure is a desert pyramid if and only if both statements are true:
1) center of a structure is not in one of the following biomes: desertHills, jungle, jungleHills, swampland.
2) structure near one of the following biomes: desert, desertHills, jungle, jungleHills, swampland.
Can anyone confirm or disprove this?

EDIT: My idea was not exactly correct. I found a pyramid with center in the swamp, but some parts in the river. But it looks like it always happens near the border of 2 or more biomes such that one biome is neither desertHills, jungle, jungleHills nor swampland and another is desert, desertHills, jungle, jungleHills or swampland.

Comment by DiEvAl [ 27/Oct/12 ]

Confirmed.
Seed: -5101227880727282991
x: -760
z: 700
Border of jungle and plains.
Probably it's supposed to be a jungle temple.

Comment by Richard Cox [ 27/Oct/12 ]

I'm starting to think my problem with desert temples not in deserts is not so much the location, but that the use of sandstone does not fit.

If desert temples do occur in other biomes their principle material should reflect where they are. So temples in jungles would be made of (say) cobblestone but in swamps they are (say) stone.

Comment by Michael L. [ 27/Oct/12 ]

Found these in jungles and swamps, seem to be replacing other generated structures. This is happening not only on single player worlds but also on SMP worlds.

Uploaded another picture of a temple spawned in a Jungle biome. It does overlap to the Taiga in the background however the centre is located in the jungle.

Comment by Max [ 26/Oct/12 ]

Related topic? https://mojang.atlassian.net/browse/MC-659

Comment by Richard Cox [ 25/Oct/12 ]

@Paul: I agree there is a logic here (obviously), however the defect is in that logic.

A beach (especially a beach beside a river) should not [IMHO] qualify as enough of a desert for desert structures. This does not seem to be a problem for desert villages or desert wells (or maybe I have not looked around enough ).

Comment by Paul Deveau [ 25/Oct/12 ]

In the first screenshot, the temple is actually in 2 biomes: River & Jungle. Poking around inside, it seemed to have been actually spawned the river biome. I'd look around the Swamp one and see if there is a river there as well. I have a hunch the temple spawn generation is seeing rivers as a valid desert to place them.

Comment by Jon Atkins [ 25/Oct/12 ]

Confirmed. Attached is a screenshot of one in a jungle.

Fresh world created in 1.4.2, seed and coordinates shown.

Comment by Quique Arokip [ 25/Oct/12 ]

Confirmed, I had two desert temples in jungle and one of them was under ground. It happened already in 1.3.1

Generated at Sun Jan 12 11:50:53 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.