Actually Additions

Actually Additions

66M Downloads

Sometimes drill leaves ghost blocks (desync with server)

Ricket opened this issue ยท 7 comments

commented

When server is under heavy load (e.g. other players causing chunk generation), and the drill has 3x3 upgrade and speed upgrades, fairly often while mining the drill will leave blocks behind but on the client side the blocks look as though they have been broken. Then movement is stuck in that ghost block, until you place and re-break it or log out and back in.

ActuallyAdditions-1.12.2-r128.jar

modpack: FTB Revolution 1.4.0

commented

As far as I know that cannot be resolved, its just going to happen. It's not something that can be fixed.

commented

ItemDrill has several comments that say "Has to be called on both Server and Client." It looks like the drill "destroys" the block on both the client and the server. When they're out of sync because the server lags and doesn't break the blocks, then the blocks are broken on the client and thus this bug.

Take a look at how Tinker's Construct does it, for their AOE tools (e.g. hammer): https://github.com/SlimeKnights/TinkersConstruct/blob/master/src/main/java/slimeknights/tconstruct/library/utils/ToolHelper.java#L397

Or Draconic Evolution: https://github.com/brandon3055/Draconic-Evolution/blob/master/src/main/java/com/brandon3055/draconicevolution/items/tools/MiningToolBase.java#L396

Please update the drill for the same kind of pattern.

commented

I certainly remember TiC having the same issue a long time ago. I don't play anymore, so I haven't really kept up. Something must've changed somewhere to allow it to be fixed properly.

commented

Further looking at it, it appears the code in AA uses what TiC uses, just older. The TiC version also has a commented out version of a similar existing config in AA, so that config should probably be removed, honestly it might be whats causing the issues in the first place.

commented

There was still one edge case I noticed, but only on creative.
If you break something while moving, on the very edge of a block's AABB, the raytrace is different on client and server, and so you get ghost blocks. Not too much can be done about that. But that appears to be the only case where they still exist.

commented

Thanks! I'll see if I still notice it at all in the next release, but I suspect I won't hit it any more. I'm only playing survival.

commented

Drill has been working perfectly, no issues with the ghost blocks any more. Thanks for fixing it.