Mobs sometimes wander into a biome that they normally don't spawn in. Mobs should instead avoid those biomes. The reason why is because it would look out of place. In order for mobs to do this, two different AI will be used. A check biome AI and a reenter biome AI. The check biome AI checks the biome the mob is in. The reenter biome AI pathfinds the nearest suitable biome (in a 16*16 square) the mob should go in. Both AI will only affect animal mobs.
How this behavior could work in details
When these two AI should be triggered
The check biome AI triggers every time the mob walks 20 blocks
If the check biome AI detects that the mob isn't in it's native biome, then the reenter biome AI is activated
When both AI are ignored
Mobs that are leashed, lured, attacked, or attacking another mob/player will temporary ignore the reenter biome AI
Tamed mobs will always ignore both AI
Bred mobs will always ignore this behavior (to prevent farms from being laggy)
If the reenter biome AI doesn't find any suitable biome, then both AI will never trigger again
If reenter biome does find a suitable biome, but the mob is unable to go there, then both AI will never trigger again
NBT tags needed
steps : How many blocks the mob has moved, resets to 0 after 20 blocks
checkbiome : if its value is 1, then it will activate the check biome AI. Resets to 0 after it's done
reenterbiome : if its value is 1, then it will activate the reenter biome AI. Resets to 0 after it's done
disablebiomeAI : if its value is 1, then the behavior will be disabled permanently
A different way this might work
Instead of counting the steps the mob walked, a coordinate could be used
the coordinate origin (0,0) is where checkbiome was last used or where the mob first spawned
if the X or Z of the coordinate is either 20 or -20, then checkbiome will active
if checkbiome detects that the mob is in a suitable biome, then the coordinate will reset to 0
if checkbiome detects that the mob isn't in a suitable biome, then reenter biome will be activated
Instead of scanning for the nearest suitable biome, reenterbiome AI will instead pathfind back to the coordinate's origin
if the origin is too far (30 blocks), then the behavior will be disabled
Examples of a mob leaving their native biome(s)
cows/sheep/pigs entering a desert
ocelots leaving a jungle
wild horses leaving a plains/savannah
wild wolves entering a plains biome
A native biome in this post is defined as the biome where that mob could spawned in. All mobs of the same species have the same list of native biomes.
If this 'pathfind to biome' thing gets added, it could give us a ton of lag, like when mobs would run from creepers. But it could be a neat small feature.
I think this might be a neat idea only if there were more mobs. Ex: alligators in swamps, lions in savannas, butterflies in flower forest, etc. Right now there are just too few mobs to pull this off with.
Change: Instead of the ''Pathfind to biome", why not mobs who leave their native biome get e/affected with different potion e/affects (eg: Slowness 1,ect.) Effects wear off when mob somehow comes back to biome
Mobs sometimes wander into a biome that they normally don't spawn in. Mobs should instead avoid those biomes. The reason why is because it would look out of place. Also, only animal mobs should have this behavior.
I don't really see the big deal. If a cow or sheep that spawned in the plains wanders a bit in the forest or a taiga biome, where's the harm?
Rollback Post to RevisionRollBack
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Why would need this? The reason why mobs spawn in every available biome is so that we can obtain it's drops. Passive mobs have one of the most important need in Minecraft, a renewable way to obtain good food and supplies. So if you have Sheep that don't spawn in Taiga or Desert biomes, you are bound to be unable to craft a bed because you spawned in a biome where Sheep don't spawn. Same said for the rest of the available passive mobs. Like Broccoli_Monkey said, Ocelots, Mooshrooms, and (possibly) Wolves make an exception due to their useful mechanic over other passive mobs.
Why would need this? The reason why mobs spawn in every available biome is so that we can obtain it's drops. Passive mobs have one of the most important need in Minecraft, a renewable way to obtain good food and supplies. So if you have Sheep that don't spawn in Taiga or Desert biomes, you are bound to be unable to craft a bed (spider string can make wool, which can make a bed) because you spawned in a biome where Sheep don't spawn. Same said for the rest of the available passive mobs. Like Broccoli_Monkey said, Ocelots, Mooshrooms, and (possibly) Wolves make an exception due to their useful mechanic over other passive mobs.
No support.
Yeah, its kinda unnecessary because there are too few mobs for this to affect, and they wandering around makes sense. Animals wander around to find food and safe places to be, so they wandering into new biomes makes sense. Animals diversify. Live with it
Sorry if this post looks a bit ugly. Multi-quote isn't working for me.
If this 'pathfind to biome' thing gets added, it could give us a ton of
lag, like when mobs would run from creepers. But it could be a neat
small feature.
Partial Support
I added in more details on how the behavior should work to prevent lag.
I think this might be a neat idea only if there were more mobs. Ex:
alligators in swamps, lions in savannas, butterflies in flower forest,
etc. Right now there are just too few mobs to pull this off with.
How many biome endemic mobs are there exactly? I can only think of two:
Ocelots in Jungles and Mooshroom on Mushroom islands. I doubt this will
happen so often a specific AI is required to keep mobs where they
belong.
No support.
Why would anyone need this? The reason why mobs spawn in every available biome is
so that we can obtain it's drops. Passive mobs have one of the most
important need in Minecraft, a renewable way to obtain good food and
supplies. So if you have Sheep that don't spawn in Taiga or Desert
biomes, you are bound to be unable to craft a bed because you spawned in
a biome where Sheep don't spawn. Same said for the rest of the
available passive mobs. Like Broccoli_Monkey said, Ocelots, Mooshrooms,
and (possibly) Wolves make an exception due to their useful mechanic
over other passive mobs.
No support.
Yeah, its kinda unnecessary because there are too few mobs for this to
affect, and they wandering around makes sense. Animals wander around to
find food and safe places to be, so they wandering into new biomes makes
sense. Animals diversify. Live with it
All animal mobs have a biome in which they don't spawn. The desert is one example. If you live nearby the border of a desert, you might see a few animal mobs wandering inside the desert.
Sorry if this post looks a bit ugly. Multi-quote isn't working for me.
I added in more details on how the behavior should work to prevent lag.
All animal mobs have a biome in which they don't spawn. The desert is one example. If you live nearby the border of a desert, you might see a few animal mobs wandering inside the desert.
I guess I'll say it again, but Animals wander around to find food and safe places to be, so them wandering into new biomes to look at stuff makes sense. Animals diversify. Live with it
They just don't spawn in deserts because animals spawn in grass blocks, not sand.
Plus! What happens when you pen your animals in a desert? Would they all bunch up in a corner trying to leave the biome? Just sounds like a pain in the butt for farming animals in desert bases.
I guess I'll say it again, but Animals wander around to find food and safe places to be, so them wandering into new biomes to look at stuff makes sense. Animals diversify. Live with it
It doesn't make sense that the only time you would ever see a mob outside their native biomes is when the chunks they are in is loaded. This would probably make more sense if they rarely spawned outside their native biomes.
Plus! What happens when you pen your animals in a desert? Would they all
bunch up in a corner trying to leave the biome? Just sounds like a pain
in the butt for farming animals in desert bases.
But yes, this would make creating a farm significantly harder (at least
for the first generation of livestock) as your animals would constantly
try to escape and wander back.
If the mob doesn't detect a suitable biome, then the behavior will be disabled. If the mob does detect a suitable biome but is unable to reach it, then the behavior will also be disabled. In case there's any unfixable problems, I added in a different method on how the behavior should work.
They just don't spawn in deserts because animals spawn in grass blocks, not sand.
This is actually only true for mobs that respawn naturally, not when chunks are generated; have you ever found a ravine with animals at the bottom and only stone in sight, and no waterfall that may have carried them down safely? The reason why they don't spawn in biomes like deserts - and oceans, which have grass if they rise above sea level - is because the game clears the mob spawn list* for those biomes. Prior to 1.7 they also spawned with no problem in ice plains, despite snow covering the ground (in 1.7 they disabled spawning). Even making a grass platform won't give you any mobs.
*Example, see the last line:
public BiomeGenOcean(int p_i1985_1_)
{
super(p_i1985_1_)
this.spawnableCreatureList.clear();
}
Also, this would actually be pretty easy to implement; the game already has a function which returns the biome at a given point and since it only has to read the value from an array (since 1.2 biomes are stored with the chunk data as a 256 byte array) it is very fast, surely much faster than the overall pathfinding calculations.
For example, this is the code used by most passive mobs to tell them whether to pathfind to a block; the game actually picks multiple points and picks the one with the highest weight; note that grass blocks already override anything else, even light levels (so lighting up an area in a grassy biome won't favor pathing to it, only if it is in a desert or other grassless biome):
However, they have a limited pathfinding range, and only make a few randomized attempts (increasing the range and/or attempts will certainly cause lag; see zombies), so they can easily wander too far from a grassy area, which would also happen if you tried favoring certain biomes, which in the end would make little difference so there is little point in implementing this unless you did some much more complicated checking.
Mobs sometimes wander into a biome that they normally don't spawn in. Mobs should instead avoid those biomes. The reason why is because it would look out of place. In order for mobs to do this, two different AI will be used. A check biome AI and a reenter biome AI. The check biome AI checks the biome the mob is in. The reenter biome AI pathfinds the nearest suitable biome (in a 16*16 square) the mob should go in. Both AI will only affect animal mobs.
How this behavior could work in details
When these two AI should be triggered
When both AI are ignored
NBT tags needed
A different way this might work
Examples of a mob leaving their native biome(s)
A native biome in this post is defined as the biome where that mob could spawned in. All mobs of the same species have the same list of native biomes.
If this 'pathfind to biome' thing gets added, it could give us a ton of lag, like when mobs would run from creepers. But it could be a neat small feature.
Partial Support
My Avatar: Totally not me.
AND IF YOU THINK IT IS ME THEN YOU HAVE NO REASON TO. MY AVATAR IS UNIQUE AND I HAVE BALLS TO PUT IT UP. >3>
anyway luv u <3
I think this might be a neat idea only if there were more mobs. Ex: alligators in swamps, lions in savannas, butterflies in flower forest, etc. Right now there are just too few mobs to pull this off with.
So many mods, so little time.
Change: Instead of the ''Pathfind to biome", why not mobs who leave their native biome get e/affected with different potion e/affects (eg: Slowness 1,ect.) Effects wear off when mob somehow comes back to biome
Oh hey, finally back after so many years!
I don't really see the big deal. If a cow or sheep that spawned in the plains wanders a bit in the forest or a taiga biome, where's the harm?
Yeah, that guy in the avatar is me. I'm *that* strange. It happens. Sometimes people act like that. Just go with it. I can offer help with suggestions even before you post them - NOT make your suggestions - but help you with them.
Unofficial Suggestions Guide (2.0) - by Theriasis
Unofficial Critics Guide - by yoshi9048
Why would need this? The reason why mobs spawn in every available biome is so that we can obtain it's drops. Passive mobs have one of the most important need in Minecraft, a renewable way to obtain good food and supplies. So if you have Sheep that don't spawn in Taiga or Desert biomes, you are bound to be unable to craft a bed because you spawned in a biome where Sheep don't spawn. Same said for the rest of the available passive mobs. Like Broccoli_Monkey said, Ocelots, Mooshrooms, and (possibly) Wolves make an exception due to their useful mechanic over other passive mobs.
No support.
Yeah, its kinda unnecessary because there are too few mobs for this to affect, and they wandering around makes sense. Animals wander around to find food and safe places to be, so they wandering into new biomes makes sense. Animals diversify. Live with it
Sorry if this post looks a bit ugly. Multi-quote isn't working for me.
I added in more details on how the behavior should work to prevent lag.
All animal mobs have a biome in which they don't spawn. The desert is one example. If you live nearby the border of a desert, you might see a few animal mobs wandering inside the desert.
I guess I'll say it again, but Animals wander around to find food and safe places to be, so them wandering into new biomes to look at stuff makes sense. Animals diversify. Live with it
They just don't spawn in deserts because animals spawn in grass blocks, not sand.
Plus! What happens when you pen your animals in a desert? Would they all bunch up in a corner trying to leave the biome? Just sounds like a pain in the butt for farming animals in desert bases.
This suggestion doesn't even add ambiance!
Why should we have it?
It doesn't make sense that the only time you would ever see a mob outside their native biomes is when the chunks they are in is loaded. This would probably make more sense if they rarely spawned outside their native biomes.
If the mob doesn't detect a suitable biome, then the behavior will be disabled. If the mob does detect a suitable biome but is unable to reach it, then the behavior will also be disabled. In case there's any unfixable problems, I added in a different method on how the behavior should work.
This is actually only true for mobs that respawn naturally, not when chunks are generated; have you ever found a ravine with animals at the bottom and only stone in sight, and no waterfall that may have carried them down safely? The reason why they don't spawn in biomes like deserts - and oceans, which have grass if they rise above sea level - is because the game clears the mob spawn list* for those biomes. Prior to 1.7 they also spawned with no problem in ice plains, despite snow covering the ground (in 1.7 they disabled spawning). Even making a grass platform won't give you any mobs.
*Example, see the last line:
{
super(p_i1985_1_)
this.spawnableCreatureList.clear();
}
Also, this would actually be pretty easy to implement; the game already has a function which returns the biome at a given point and since it only has to read the value from an array (since 1.2 biomes are stored with the chunk data as a 256 byte array) it is very fast, surely much faster than the overall pathfinding calculations.
For example, this is the code used by most passive mobs to tell them whether to pathfind to a block; the game actually picks multiple points and picks the one with the highest weight; note that grass blocks already override anything else, even light levels (so lighting up an area in a grassy biome won't favor pathing to it, only if it is in a desert or other grassless biome):
{
return this.worldObj.getBlockState(p_180484_1_.offsetDown()).getBlock() == Blocks.grass ? 10.0F : this.worldObj.getLightBrightness(p_180484_1_) - 0.5F;
}
However, they have a limited pathfinding range, and only make a few randomized attempts (increasing the range and/or attempts will certainly cause lag; see zombies), so they can easily wander too far from a grassy area, which would also happen if you tried favoring certain biomes, which in the end would make little difference so there is little point in implementing this unless you did some much more complicated checking.
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
No support. What if I'm going to make a Mooshroom Pen? Does this kind of A.I. still apply to tamed animals?
No support. What if I'm going to make a Mooshroom Pen? Does this kind of A.I. still apply to tamed animals? That might suck if it still does.
STOP MOD REPOSTS!!!
Here's a fanmade logo I made for Minecraft: Win10Ed:
You can find the banner here: http://textcraft.net/host-image.php?result=ok&ref=data1/d/0/d0b1fbcf89aa5e851b3c7e9d86c77f48816b909f2c71ee849ba7532c39a6e18170919630a5bb649b27f404617cf9f5d127aebb98338094370012ad5319ac499dec12cd72bd5dd08a7e4df54c.png