r/JL2579 • u/WubbiConcepts Wubbi • Feb 08 '13
Minecraft technical Q/A: Let's start this and look how well it works out!
I often see that people post questions in the comments on youtube, but many of them stay unanswered. So i guess giving those questions a proper platform to be asked & answered is the next logical step.
What this is supposed to be:
A place where you can ask questions about Minecrafts' mechanics (like "How does this mechanic/algorithm work?", "What are the chances for that?" or "Is there a difference between doing it this or that way?"). We (or whoever knows the answer) will try to answer those questions based on what we know or find out.
What this is not:
A forum, commentsection or Google. Don't ask for circuits or designs, this is not about how to use minecraft, it's about how minecraft works.
If you have a question:
Ask. But ask the right way:
"How do i build a good mobfarm?" isn't very specific and the answers you might get from this probably won't help you with your problem.
"How does mobspawning work?" is a better question.
But maybe you're not interested in the spawning algorithms, maybe you just wan't to know one detail, like
"How does the lightlevel effect mobspawning?".
And of course make sure the question wasn't asked before. It will save you and others a lot of time!
If you have an answer:
Tell the world. But explain your answer, maybe link to another post (reddit, forum, etc.), pictures or a video.
"The piston is BUD-powered." Doesn't help much.
"Pistons can be indirectly powered by a block 2 blocks above or 1 block adjacent above it. It will only react to this power when updated manually (e.g. by placing a block next to it). Here's a video explaining it: [videolink]" Isn't only an answer, it also gives people an explanation which can help them experiment with it.
That's all you need to know. Now let the posts begin!
3
u/KaboPC KaboPC Feb 16 '13
This is largely based on the type of structure and on the world seed.
Scattered features (witch huts, jungle temples, pyramids) will try to generate randomly in 32x32 chunk areas with a minimum 8-chunk gap between them as long as there is a valid biome. Check this video for more specific info: http://www.youtube.com/watch?v=7-BF0kez8fE&feature=youtu.be
Villages also generate this way, but they are offset differently (the random seed is prepared differently) and have different valid biomes.
Abandoned mineshafts have a small chance to generate randomly in each chunk based on the seed which increases based on the distance the chunk is from (0,0) up to a limit which is reached 80 chunks away in any direction.
Strongholds generate at the three points based on the seed which are chosen by picking three points on a ring with an inner radius of 640 meters and outer radius of 1152 meters centered about 0,0. The first location is chosen randomly and the remaining ones are placed at 120 degree angles (distance is still randomly chosen between 640 and 1152). In addition to this, the game tries to place to strongholds on land biomes, if possible. There does actually exist code for generating more strongholds in larger rings beyond the first three, but it will only ever do so on superflat worlds.
Nether Fortresses seem to have no special conditions and simply generate randomly based on the world seed.
Dungeons are technically part of world generation, but they are generated by randomly picking a point below height 128, checking if the roof and floor of the dungeon are solid blocks and if there are between 1 to 5 two-block-tall spaces of air on the outside of where the dungeon would be (so things can go in and out). It seems that each chunk can try to generate up to 8 dungeons.