I was playing in my hardcore single-player world, at one point while exploring I found some broken sugar cane, and as I said it's a single player world with no controls, can anyone tell me how that's possible?
If you have a seed and coordinates, maybe someone can take a look, but I've definitely noticed the game will sometimes generate things where they naturally couldn't be placed/grown, and sometimes some tick updates might cause the item to later become unrooted. In the case of sugarcane, this would likely mean it generated somewhere not immediately next to water?
If you have a seed and coordinates, maybe someone can take a look, but I've definitely noticed the game will sometimes generate things where they naturally couldn't be placed/grown, and sometimes some tick updates might cause the item to later become unrooted. In the case of sugarcane, this would likely mean it generated somewhere not immediately next to water?
I was playing in my hardcore single-player world, at one point while exploring I found some broken sugar cane, and as I said it's a single player world with no controls, can anyone tell me how that's possible?
Was it next to ice? The game reads ice as water for world gen of canes but then block ticks update the cane as being by ice and unroot it.
Sometimes faulty gen also just gets rid of canes, and less commonly cacti, 2-tall flowers.
Was it next to ice? The game reads ice as water for world gen of canes but then block ticks update the cane as being by ice and unroot it.
Sometimes faulty gen also just gets rid of canes, and less commonly cacti, 2-tall flowers.
What actually happens is that the game places sugar cane next to water but as a final step in the decoration process it coverts water to ice, invaliding what was a valid location. I solved this issue by allowing sugar cane to stay next ice but it needs water to grow (notably, in vanilla 1.6.4 sugar cane can survive without water as long as it doesn't receive a block update since it doesn't check if the location is valid when randomly ticked, only when a neighbor block change updates it, which was fixed in some later version. I added the exception for ice in part to maintain vanilla parity, e.g. all the sugar cane that had generated next to ice in my first world would break). Also, the Wiki says that sugar cane can survive next to frosted ice so why not normal ice?
Also, many other bugs like grass and flowers on sand are also due to the block they are on being replaced after they were placed, not because the game places them on the wrong blocks in the first place, and are ultimately due to the way world generation works; any feature that is more than a single block can extend outside of the 16x16 block area it is centered in, so while sand is placed before flowers when adjacent chunks get decorated the sand in them can replace the grass/dirt under them, the same thing explains trees floating over lakes, despite trees being placed after lakes within a given chunk's decoration process:
The game places sand before flowers but sand from adjacent chunks can spill over and replace blocks in surrounding chunks (else, you'd have very odd world generation if everything had to remain within chunk borders):
In order to fix this I check for plants when placing features like sand; water lakes also extend the trunks of trees and huge mushrooms down to the bottom:
int topBlock = -1;
for (int y2 = y - 1; y2 <= y + 1; ++y2)
{
// Checks that block is a valid dirt block
if (BlockDirtTMCW.canReplaceDirt(chunk.getBlockStateByIndex(y2 << 8 | (zz2 & 15) << 4 | (xx2 & 15))))
{
chunk.setBlockStateFastByIndex(y2 << 8 | (zz2 & 15) << 4 | (xx2 & 15), sandBlock);
topBlock = sandBlock << 8 | y2;
}
}
// Removes plants which cannot grow on block; topBlock is blockState << 8 | y
if (topBlock != -1) this.removePlants(chunkCache, topBlock, xx2, zz2);
Likewise, according to the code dungeons are placed after lakes, yet I've found dungeons that were overwritten by a lake, again due to the spread of features outside of the chunks they were placed in (I fixed this by checking for mossy cobblestone before placing a lake; note that all of these fixes require a lot of additional code and maintenance when adding new features, hence it is not Mojang's priority to fix them, nor do I prevent lakes and such from overwriting/conflicting with every possible feature, e.g. you can still find trees growing on sand):
Nope, not in 1 deep shallow water at least. I've found this out by accident, placing cane in the water edge instead of on it, the water didn't break it, it just grew inside. I don't know about deeper water. And the entire water body can be just 1 block deep and cane will still grow in it, the adjacency check is 1 across and 1 down but also just 1 across.
Okay yeah, when I made my first post I was struggling with a particular example that could cause it. But the water being ice is a likely one. I've seen that a lot.
I was playing in my hardcore single-player world, at one point while exploring I found some broken sugar cane, and as I said it's a single player world with no controls, can anyone tell me how that's possible?
Broken as in dropped and on the ground?
If you have a seed and coordinates, maybe someone can take a look, but I've definitely noticed the game will sometimes generate things where they naturally couldn't be placed/grown, and sometimes some tick updates might cause the item to later become unrooted. In the case of sugarcane, this would likely mean it generated somewhere not immediately next to water?
Was it next to ice? The game reads ice as water for world gen of canes but then block ticks update the cane as being by ice and unroot it.
Sometimes faulty gen also just gets rid of canes, and less commonly cacti, 2-tall flowers.
What actually happens is that the game places sugar cane next to water but as a final step in the decoration process it coverts water to ice, invaliding what was a valid location. I solved this issue by allowing sugar cane to stay next ice but it needs water to grow (notably, in vanilla 1.6.4 sugar cane can survive without water as long as it doesn't receive a block update since it doesn't check if the location is valid when randomly ticked, only when a neighbor block change updates it, which was fixed in some later version. I added the exception for ice in part to maintain vanilla parity, e.g. all the sugar cane that had generated next to ice in my first world would break). Also, the Wiki says that sugar cane can survive next to frosted ice so why not normal ice?
Also, many other bugs like grass and flowers on sand are also due to the block they are on being replaced after they were placed, not because the game places them on the wrong blocks in the first place, and are ultimately due to the way world generation works; any feature that is more than a single block can extend outside of the 16x16 block area it is centered in, so while sand is placed before flowers when adjacent chunks get decorated the sand in them can replace the grass/dirt under them, the same thing explains trees floating over lakes, despite trees being placed after lakes within a given chunk's decoration process:
In order to fix this I check for plants when placing features like sand; water lakes also extend the trunks of trees and huge mushrooms down to the bottom:
Likewise, according to the code dungeons are placed after lakes, yet I've found dungeons that were overwritten by a lake, again due to the spread of features outside of the chunks they were placed in (I fixed this by checking for mossy cobblestone before placing a lake; note that all of these fixes require a lot of additional code and maintenance when adding new features, hence it is not Mojang's priority to fix them, nor do I prevent lakes and such from overwriting/conflicting with every possible feature, e.g. you can still find trees growing on sand):
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?
it could have spawned in water
Piece of cake
That's a new one to me. Like inside it, over it, or above one of the lakes TMC is mentioning? I might have seen the third case before once.
I do know you can PLANT canes in water though, but that's different.
inside it it would break
Piece of cake
Nope, not in 1 deep shallow water at least. I've found this out by accident, placing cane in the water edge instead of on it, the water didn't break it, it just grew inside. I don't know about deeper water. And the entire water body can be just 1 block deep and cane will still grow in it, the adjacency check is 1 across and 1 down but also just 1 across.
Okay yeah, when I made my first post I was struggling with a particular example that could cause it. But the water being ice is a likely one. I've seen that a lot.