Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
I just spent my evening manually de-obfuscating the big wad of decompiled Minecraft server code. There are over 500 classes in the server itself. Many classes I've found already annotated by Craftbukkit, but even those are mostly populated with "useless" method and variable names. So, I've been using an IDE to refactor the whole code base whenever I can figure out what some method does or some variable means.
I've been looking for a few specific things that have been bothering me, and sure enough, I'm finding some answers... edit: Oh, and if it's not obvious: SPOILER ALERT. Q: What's up with animal spawning? Why do some of my old maps generate *no* animals at all? A: So many factors are working against spawns! First, we have biome-specific spawn settings. There are effectively: BigHills, Desert, Forest, Hell, Ocean, Plains, River, Sky, Swamp, and Taiga. Ocean, Desert, and Hell are set to spawn *no* animals. Ever! This means Sedona and South of the Border can't have animal farms. Animals only get the chance to spawn once every 400 ticks (40 seconds!) within 8 chunks in each direction of each player but not within 24 blocks of any player. Generally, Pig and Chicken have equal chance to spawn, Sheep has slightly higher chance, and Cow has slightly lower chance. Wolf only spawns in Forest with less chance than the other four types. A maximum of 4 of any type will spawn at a given time, giving an absolute maximum of 20 animals across the whole world every 40 seconds in the absolute best circumstances. The answer to my second question there is that some of my maps (like the Survival Island map I kept bitching about) now have their biome data rearranged so that now I'm in the middle of an Ocean biome. Thus, no new animals. Craftbukkit has no hooks in any of those options, by the way. I'd be tempted to contribute a patch, but I'm still far from that stage of development here... Q: Why does the creeper seem to have a wider sensitivity radius in SMP than SSP? Why do enemy hitboxes generally seem smaller in SMP than SSP while their reach is farther? A: Not sure yet, but I'm finding pieces of the puzzle. The creeper fuse lasts 30 ticks (3 seconds). Monsters in general will attack once every 20 ticks. Monsters will seek out players within 16 blocks (except for Endermen at 64 blocks). I've found how attack damage is applied to entities, but I've not quite pinned down how the intersection of the mob and a player's weapon is determined. Anyone else have some pet peeves with the current version of Minecraft SMP that you're dying to figure out? I'm pretty exhausted from this code spelunking session, but I might have another go at it later this week if you have questions. The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
If you go into our desert town and create a patch of rich green grass (whatever that biome is) will it operate as THAT biome or does it still in truth belong to the desert biome? I suspect the answer is that it still belongs to the desert biome.
... |
quote |
BANNED
I am worthless beyond hope. Join Date: May 2004
Location: Inner Swabia. If you have to ask twice, don't.
|
I have seen 1 duck spawn in our desert, but it might be because it was *near* a river biome.
A couple comments: it seems that animals are biome specific (not absolutely, but pretty much) -- ie you find a lot of herd animals on planes, ducks in jungles, etc. I have also certainly run into a plain absolutely filled with cows (and others filled with sheep) -- more than 20, to be sure, more like 40. Now it is possible that the persistence thing worked, and they spawned before, remained around, and more spawned later, but it is clear that you can encounter herds of creatures unlike pre1.8. Is this coded somewhere? I asked about where towns spawn in game tonight -- all of ours are in desert biomes, is this a necessity? Last edited by billybobsky : 2011-09-19 at 23:46. |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
When do we finally get horses???
... |
quote |
Making sawdust
Join Date: May 2004
Location: Minnesota
|
Wait, we found the third town?
|
quote |
Formerly Roboman, still
awesome Join Date: Jul 2004
Location: Portland, OR
|
Quote:
I'm never going to learn how to computer, am I |
|
quote |
BANNED
I am worthless beyond hope. Join Date: May 2004
Location: Inner Swabia. If you have to ask twice, don't.
|
|
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
Yes, I found a town and named it "Piggsburgh". The coords are in the other 1.8 thread. It's a pretty big town and it's in a much nicer clime with lots of critters. SHOULD there have even been a fourth town?
Question for Brad: So is it likely that there's a stronghold near my town? Is that the way it works? ... |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Quote:
The "20" number I mentioned as a maximum is the number that are able to spawn at a given spawn opportunity. Since spawning can happen once every 40 seconds and mobs persist (for a while at least), you definitely can run into more than 4 of a given animal type at a time. Plus, I think there's a separate algorithm that kicks in upon creation of a brand new chunk, but I haven't pinned down its workings yet. I've definitely hit a town outside of a desert in another SSP world (in a Plains biome), but this sounds like a neat one to investigate in the source code. I'll try finding this algorithm tonight too... The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
|
quote |
Member
Join Date: Nov 2006
|
I think (but I'm not 100% sure) that Notch and Jeb changed the town spawning requirements to require relatively flat land, after people who where playing the pre-pre-release (o_O) found towns in the middle of oceans and whatnot.
The issue with requiring flat land is that the only two biomes where largish expanses of flat land occur are deserts and plains, and deserts seem to be much more common than plains. |
quote |
Space Pirate
Join Date: May 2004
Location: Atlanta
|
One of the doors of a building in my town was blocked by granite, the roof nearly digging into a hill. But it's a nice spot with relatively gentle terrain.
|
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
Biome data is calculated independently before blocks are set down. So, if the area was a desert biome before, it will still be a desert biome after you set down grass or any other block.
The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MC: Minecraft beta 1.5 released! | 709 | GamingNova | 120 | 2011-05-02 19:49 |
MC: AppleNova Minecraft Server Discussion | Brad | GamingNova | 6 | 2011-04-14 17:10 |
MC: Minecraft Beta 1.5 Sneak Preview! | Robo | GamingNova | 32 | 2011-04-11 16:17 |
AppleNova Minecraft Server | Brad | GamingNova | 1450 | 2011-04-10 15:01 |
Official AppleNova Minecraft Server Details | Brad | GamingNova | 0 | 2010-12-15 22:31 |