Paper: If item falls on block that is broken or despawns, the items act like ghost blocks

Created on 11 Jan 2020  Â·  10Comments  Â·  Source: PaperMC/Paper

What behaviour is expected:

This is the first time I've written a bug report, I apologize if it is incorrect in any way.
When an item lands on a block, and the block beneath it is broken or despawns, the item should then land on the next available block and be able to be picked up.

What behaviour is observed:

Items that land on a block act as if that block is a ghost block once broken, hitting the ground and then rebounding back up onto the original block.

Steps/models to reproduce:

Place a block 4-5 blocks from the ground, drop items onto the block. Break the block, when the items hit the ground they will most likely rebound back up to the original block they were dropped on until you pillar up to the location - you will then pick up the item(s).
We noticed this the most with tree farming as there are plenty of items that land on blocks and the blocks are either broken or despawn. Does not happen with every single block, but we've been able to repeat it multiple times on our server.

Plugin list:

None

Paper build number:

This is on paper 1.15 Version #42, but this occurred on the #35 version as well. I don't have the /version as we've already changed our server back to vanilla temporarily to fix the issue.

Anything else:

I tested for the bug on vanilla MC single player, and a vanilla server we could not replicate the issue.

Most helpful comment

the == 3 is the key part, the modulus being used is basically irrelevant as any other value would still have the odd ticks here and there where the value would line up with spigots "don't tick"

All 10 comments

sounds like MC-4?

sounds like MC-4?

I did not find that when I was searching, I probably wasn't using the right terms while searching. But, I'm glad you did as I'm going to keep it monitored to see if/when its resolved, thank you for that!

However, after we switched back to a vanilla server the issue is completely gone, as well we've tried to re-create it multiple times on our now temporarily vanilla server (we really prefer paper) and have been unsuccessful in recreating it. That's why we though it was a paper related issue.

We also contacted our server host (paid service) and asked about the bug/what was going on. They were who suggested testing it on a single player vanilla, vanilla server, and testing again on paper to recreate the issue to determine where the bug/issue needed to be reported. After going through those steps, they suggested we report it here, as they hadn't heard of that specific bug.

Extra: When we were on paper 1.15 version 42 we were able to recreate it.. I would say about 75% of the time. There were definitely times we couldn't recreate it but that usually involved it being closer to the ground, which is why in the steps to reproduce I suggested to use 4-5 blocks above the ground. That is when we had the most success recreating the issue.

All that said, if it is a vanilla issue I truthfully do not understand why it was only occurring on the paper server.

Also I apologize for the reply being so long, but thank you again for linking that bug report. I have it saved and will monitor it.

Edit: I looked further into the Mc-4, but I think our issue might be slightly different? Ours occurs when the block the item was on despawned or was broken. The examples in the Mc-4 show the block still there, though that might just be to further show what is happening, if that is the case I apologize.

This bug occurs upstream in Spigot 2560, but NOT CraftBukkit 2560.

I lowered item merge radius to 0, but this dsync bug still persisted, so it probably has something to do with entity positions not being correctly updated between the client and server, resulting in MC-4 like behavior.

We tried the same merge radius issue on the recommendation of our server host. Issue persisted the same as yours. Thanks for the reply, glad to get any information regarding the issue. It seems like they've made some improvements to vanilla's performance but overall I still prefer paper for the other tweaks that can be made.

The cause of this problem is the entity activation feature of spigot. Most entities are skipped every forth tick (class ActivationRange, lines 271 - 275), items on the ground try to check every forth tick if they should fall now (class EntityItem, line 89). So if the check is exactly in the skipped tick it will be skipped every time and the item will never start to fall.

This has been happening on paper 1.14.4 as well. I just assumed that the vanilla bug had returned tbh

EAR has been a known issue around this for a while, just not really had the capacity to get to it... Soonâ„¢

I think the fix is incorrect, it is still "% 4". I would recommend something like (this.ticksLived + this.getId()) % 5 == 0) (or % 3)

the == 3 is the key part, the modulus being used is basically irrelevant as any other value would still have the odd ticks here and there where the value would line up with spigots "don't tick"

Ok, I see its correct. I had missed that the activation check also uses ticksLived.

Was this page helpful?
0 / 5 - 0 ratings