mojira.dev
MC-117930

Sticky pistons, slime blocks, and other blocks being moved may disappear when chunks load/unload

On a multiplayer server, I have built a sweeping-style mob farm kindof inspired by the one Mumbo built in this video: https://www.youtube.com/watch?v=dMf6JLEJW74

You can see a screenshot of the main sweeping mechanism of my design in the attachment. The main operation is as follows:

  • Pulse one sticky piston for a single tick to make it push all of the other blocks away one block and leave them there.

  • Pulse the other sticky piston for two ticks so that a slime block grabs onto the first piston and pulls it in.

  • Repeat until you get to the end of the track and then reverse the pattern.

This is basically a flying machine, except that it's in a track.

The bug is this:
I had been working on this machine, and everything was fine. Then I teleported away to help with something (I'm an operator on an open server). When I teleported back, all of the blocks in these flying machines were completely GONE. I had two sweepers, totaling four sticky pistons, eight slime blocks, and twelve granite blocks. Every single one of those blocks was gone.

So my best guess is that there is a race condition between pistons moving blocks and chunks loading or unloading, which caused them to all just get deleted. What's really odd, though, is that ALL of them are gone. At any one time, the base of one of those pistons is not moving.

I wouldn't be surprised if this bug report is a dupe of something, but I did try pretty hard to search for related bugs. I looked for things on pistons and slime blocks disappearing, blocks being moved by pistons disappearing, and flying machines disappearing. I did find one or two things for MCPE that seem a bit related, but this bug for PC.

I've been encountering a lot of redstone related problems due to chunk unloading on this server, far more severe than any other. The machine in question is built in a place that gets a lot of spurious activity, so I'm guessing that the chunks that this machine is in are being constantly loaded and unloaded.

Linked issues

Attachments

Comments 10

Timothy Miller

So, we all know about various bugs related to chunk unloading and reloading, affecting hoppers, minecarts, and pistons and other things in motion. But what I've seen twice in a couple of days now is just bizarre. Instead of entities being deleted or duped, they seem to be getting MOVED.

Check out the new screenshots. As I mentioned before, I have these two flying machines. Well, one of them, twice how, has gotten MOVED four blocks up in space into the same track as the other flying machine. (Either that or one is being deleted, and the other is being duplicated.)

As you can see in the pics, on one level, all that's left is a single sticky piston, while on the level above, there is a fully duplicated flying machine next to the one that is supposed to be there. All 12 blocks.

There is a substantial part of the Minecraft community that makes HEAVY use of these game mechanics, yet they've remained unaddressed by Mojang for many years. How can we encourage Mojang engineers to put some serious attention to these problems? Why have they been neglected for so long?

Timothy Miller

I've uploaded two more images. In this case what seems to have happened is that the blocks being moved by pistons have been duplicated multiple times. I also regularly encounter mine carts developing invisible duplicates when chunks unload and reload.

Here's what I don't get. These are legitimate and bugs that really make things a pain in the backside for many of the very people that generate massive amounts of free advertising for Mojang on youtube. But instead of fixing these problems, the Minecraft developers muck around making pointless changes to block textures and hitboxes and adding useless new mobs like parrots.

Adding parrots to the game may excite 6 year olds, but for your loyal power users who generate all this youtube content, Mojang developers seem to be sending a very loud message that they really really really just want those people to go away.

WHY?

Does MC-54026 describe your issue?

Timothy Miller

No. MC-54026 is not the same bug. There are two unrelated block duplication bugs.

(1) Client-side block duplication. I can link you plenty of youtube videos that show this, all of which involve flying machine and do not involve chunk loading issues. This is some kind of client/server sync issue that gets worse with lag, but the blocks are client-side ghosts. They look ugly, but they don't really break anything. And if you mine one of the blocks, it doesn't show up in your inventory. This is definitely NOT the problem I'm having.

From reading the comments on MC-54026, I believe they are seeing the client-side problem. They say that you can stand on the blocks, but you can't mine them. The problem I'm experiencing is definitely server-side duping, so no, my bug report is NOT a duplicate of MC-54026.

(2) Server-side block duplication. This is much harder to reproduce because you can't just sit there and watch it happen. The duplication doesn't happen in spawn chunks and doesn't happen as long as users are logged in and keeping relevant chunks loaded. However, if you set up one of those flying machines that goes back and forth and then do things that would cause the chunks to unload, then you'll get duplicated blocks in the air. Once you reload the chunks, you'll find the flying machine to be broken, and sometimes you'll find that blocks have been duplicated. The dupes are "real" in that if you mine them, they end up in your inventory. This is the bug that's causing me all the trouble.

I should clarify something:

From what I know, you can get block duping from "standard" flying machines like the ones used by the likes of Panda4994, Ilmango, Maizuma, etc. But with those self-triggering flying machines, when the chunks are unloaded, the flying machines break completely. The dynamic game state is lost, and the flying machines just stop in mid-air. As a result, the opportunities for block duping are minimal. (It would be nice if flying machines did not halt when unloaded, but that's probably a separate issue.)

My "flying machine" on the other hand is not self-triggering. It's actually in a track, and there is a central timing source. So when the chunks unload and reload, they do not stop going, because the hopper clock keeps going. (Although it would eventually break, because the hopper clock is suffering frequent item duplication.) So in this case, the probability that a race will occur during chunk unloading is much higher.

I am an operator on the server where this duplication is occurring. I can get you a world download, and I can also give you access to the server, spectator mode, etc. Let me know what I can provide that would help.

Finally, check out MC-22147. Rich Crosby appears to have some insight into the problem based on code analysis, at least with regard to things crossing chunk boundaries. Block duping and item duping WITHIN chunks may or may not be related to this. But basically the problems come down to a race between chunk saving and entity processing. I also understand that there are modded servers that fix the problem. Since the problems and solution have been known for a long time, it's disheartening that they are still not fixed in 1.12 while at the same time, the developers use their time to add things like parrots. Parrots are nice, but why would they prioritize adding new mobs over fixing 5-year-old bugs?

Thanks.

Timothy Miller

One other thing. I checked the chunk boundaries. I'm definitely getting the block duping around a chunk boundary. But not just AT the chunk boundary but some distance away from it as well. It's really quite bizarre. The flying machines are so slow moving that there would have to be several seconds of entity processing between when a chunk is marked for unloading and when it actually gets unloaded. Since I uploaded those last screenshots, the duping has actually gotten worse, which is also weird since the moving parts are now blocked from reaching the chunk boundary. I have two whole flying machines entirely within one chunk now.

On technical minecraft servers, what users typically do is set up their minecarts and flying machines with on/off switches. They do this because they know that if they don't shut down before logging off, their constructions will be completely wrecked. It's very unfortunate that they have to do this and about time that it got fixed, especially considering that there is at least a partial fix available.

Timothy Miller

I think I'm getting the duped mine carts on chunk boundaries as well.

Timothy Miller

It is very likely that this is caused by a combo of MC-79154 and MC-119971.

MC-79154 pertains to block entities being momentarily having duplicates, so sometimes two of the same hopper at the same position will push the same item into another hopper twice.

Well, blocks being pushed by pistons are block entities while they are moving. So when Gnembon tried out my fix for MC-79154, he and MethodZz observed improvements for some piston-related block deletions that occurred in chunks at the edge of view distance. In my testing, I saw some block duplication problems clear up as well.

But then I also saw some deletions, both of items in hoppers and blocks being pushed by pistons. That's MC-119971, and I'm testing a fix for that right now. Incidentally, that test also subsumes Rich Crosby's suggested fix for MC-22147, although his fix doesn't actually fix MC-22147.

The fix of MC-79154 should also fix this.

Marking as a duplicate of both MC-119971 and MC-79154 since the fix for both of those is needed to fix this. I think.

Timothy Miller

I must emphasize that to fix this bug (MC-117930) properly, the fixes for both MC-79154 and MC-119971 must be implemented. They are two independent causes of hopper item duping. The fix for MC-119971 also fixes loads of other bugs that occur on chunk boundaries.

Timothy Miller

(Unassigned)

Unconfirmed

Minecraft 1.11.2, Minecraft 1.12

Retrieved