I was thinking, you know how skeletons don't like the sun...
Well when they die, they have their usual drops (minus exp). Why not have it drop bonemeal when the sun fries him/her? Then that meal can fertilize the blocks underneath.
If it's dirt = it's now grass block
if it's grass block = it's now grass block + Tall grass
If it's sand = sand with dead brush
Given that sheep occasionally eat tall grass, they might eventually convert a grassy prairie into barren plains since tall grass doesn't self-regenerate. Perhaps it'd make sense to give grass a way to regenerate by making it so skeletons 'fertilize' grass blocks (like bonemeal does) in certain biomes after they burn to death in sunlight.
I don't think there's a need for them to drop bonemeal as an intermediate step - just skip to the fertilizing. And given how often skeletons die, the radius of fertilization should be much smaller than it is for bonemeal. Maybe just one block.
Of course, tall grass could just be made to grow spontaneously in certain biomes. But this might take up a lot of processing power if the game needs to keep track of which grass blocks have or don't have tall grass and how long it needs to wait before each grass block produces tall grass. The skeleton idea seems better in terms of keeping processor demands low.
Given that sheep occasionally eat tall grass, they might eventually convert a grassy prairie into barren plains since tall grass doesn't self-regenerate. Perhaps it'd make sense to give grass a way to regenerate by making it so skeletons 'fertilize' grass blocks (like bonemeal does) in certain biomes after they burn to death in sunlight.
Am I correct in reading that as the reason tall grass disappears because sheep eat grass, which cause tall grass to pop out (not sheep actually eats the tall grasses)?
Of course, tall grass could just be made to grow spontaneously in certain biomes. But this might take up a lot of processing power if the game needs to keep track of which grass blocks have or don't have tall grass and how long it needs to wait before each grass block produces tall grass. The skeleton idea seems better in terms of keeping processor demands low.
I like this idea better, and it shouldn't require a lot of processing power (at least, not as much as spawning mobs. Furthermore, it's less bizarre than having skeleton death spontaneously spawn grass block.
In short, you can use a variation of the mob spawning algorithm.
1. At random times per day-time, X number of loaded chunks (8x8 section of map, see Chunk in Minecraft wiki to see what I mean) become eligible to spawn tall grass (X depend on processing limit, can adjust to fairly high if CPU constraint is low).
2. Each chunk determine if they're in the correct biome to spawn tall grass (if biome is tied to a block and not a chunk, the chunk determines if it has at least 1 block of the correct biome). If not, abort the tall-grass spawn for that chunk, else continue.
3. Pick a random surface block in the chunk (surface in this case means it has an unobstructed view to the sky, aka lit directly by sunlight). If the selected surface block is a grass block, continue, else abort.
- I could've targeted a random surface grass block, but didn't because of the following:
-- Better "realism", chunks with very few grass block will abort much more frequently and spawn less grass as result (picking surface grass block mean that a chunk with a single grass block will have the odd behavior of having a tall grass spawning there very, very frequently).
-- Less tracking needed - The chunk don't have to track of how many surface grass block it has. Just check a random point and abort if it doesn't match.
4. Spawn grass on the selected block.
- To ensure that tall grass don't, overtime, become ridiculously dense, the logic can further check for the following.
- A - Count for number of tall grasses within a 5x5x3 volume centered on the block (so on a flat plain, the maximum number that can possibly be found is 25 tall grasses).
- B - Depending on biome, if the number of tall grasses within the 5x5x3 volume exceed a certain threshold, abort the spawning of tall grass. The limit can be something as thus.
-- Plain: 20 (very dense tall grasses)
-- Forest: 10
-- Taiga: 2 (very sparse, I mean come on, it's freaking freezing).
- Optional Check: In order to further simulate spreading of tall grasses. The following additional check can be made in addition to the above.
- C - Using the tall grass count from A, the spawn chance has a percentage of failing based on the following (so even if the condition B is passed, there's an additional failure chance).
-- 0 Tall Grass - 80% failing.
-- 1 Tall Grasses - 60% failing.
-- 2 Tall Grasses - 40% failing.
-- 3 Tall Grasses - 20% failing.
-- 4+ Tall Grasses - 0% failing (as long as threshold in B isn't reached).
The reason I argue that this won't be computationally expensive is as followed.
1. No existing tracking is needed.
2. The CPU expense can be adjusted by developer (or maybe even server owner), by modifying how frequent and how many chunks to check for spawning at a time.
This would get annoying if you had an area you wanted to be free of tallgrass and skeletons spawn and die there (e.g a city).
Shouldn't grass grow into tall grass naturally (if biome allowed) if you don't maintain it?
If you want an area free of tall grass... perhaps it needs a way to be maintained (like a periodic flow of water to "wash" the tall grass away).
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Given that sheep occasionally eat tall grass, they might eventually convert a grassy prairie into barren plains since tall grass doesn't self-regenerate. Perhaps it'd make sense to give grass a way to regenerate by making it so skeletons 'fertilize' grass blocks (like bonemeal does) in certain biomes after they burn to death in sunlight.
I don't think there's a need for them to drop bonemeal as an intermediate step - just skip to the fertilizing. And given how often skeletons die, the radius of fertilization should be much smaller than it is for bonemeal. Maybe just one block.
Of course, tall grass could just be made to grow spontaneously in certain biomes. But this might take up a lot of processing power if the game needs to keep track of which grass blocks have or don't have tall grass and how long it needs to wait before each grass block produces tall grass. The skeleton idea seems better in terms of keeping processor demands low.
Am I correct in reading that as the reason tall grass disappears because sheep eat grass, which cause tall grass to pop out (not sheep actually eats the tall grasses)?
I like this idea better, and it shouldn't require a lot of processing power (at least, not as much as spawning mobs. Furthermore, it's less bizarre than having skeleton death spontaneously spawn grass block.
In short, you can use a variation of the mob spawning algorithm.
1. At random times per day-time, X number of loaded chunks (8x8 section of map, see Chunk in Minecraft wiki to see what I mean) become eligible to spawn tall grass (X depend on processing limit, can adjust to fairly high if CPU constraint is low).
2. Each chunk determine if they're in the correct biome to spawn tall grass (if biome is tied to a block and not a chunk, the chunk determines if it has at least 1 block of the correct biome). If not, abort the tall-grass spawn for that chunk, else continue.
3. Pick a random surface block in the chunk (surface in this case means it has an unobstructed view to the sky, aka lit directly by sunlight). If the selected surface block is a grass block, continue, else abort.
- I could've targeted a random surface grass block, but didn't because of the following:
-- Better "realism", chunks with very few grass block will abort much more frequently and spawn less grass as result (picking surface grass block mean that a chunk with a single grass block will have the odd behavior of having a tall grass spawning there very, very frequently).
-- Less tracking needed - The chunk don't have to track of how many surface grass block it has. Just check a random point and abort if it doesn't match.
4. Spawn grass on the selected block.
- To ensure that tall grass don't, overtime, become ridiculously dense, the logic can further check for the following.
- A - Count for number of tall grasses within a 5x5x3 volume centered on the block (so on a flat plain, the maximum number that can possibly be found is 25 tall grasses).
- B - Depending on biome, if the number of tall grasses within the 5x5x3 volume exceed a certain threshold, abort the spawning of tall grass. The limit can be something as thus.
-- Plain: 20 (very dense tall grasses)
-- Forest: 10
-- Taiga: 2 (very sparse, I mean come on, it's freaking freezing).
- Optional Check: In order to further simulate spreading of tall grasses. The following additional check can be made in addition to the above.
- C - Using the tall grass count from A, the spawn chance has a percentage of failing based on the following (so even if the condition B is passed, there's an additional failure chance).
-- 0 Tall Grass - 80% failing.
-- 1 Tall Grasses - 60% failing.
-- 2 Tall Grasses - 40% failing.
-- 3 Tall Grasses - 20% failing.
-- 4+ Tall Grasses - 0% failing (as long as threshold in B isn't reached).
The reason I argue that this won't be computationally expensive is as followed.
1. No existing tracking is needed.
2. The CPU expense can be adjusted by developer (or maybe even server owner), by modifying how frequent and how many chunks to check for spawning at a time.
Shouldn't grass grow into tall grass naturally (if biome allowed) if you don't maintain it?
If you want an area free of tall grass... perhaps it needs a way to be maintained (like a periodic flow of water to "wash" the tall grass away).