-
Bug
-
Resolution: Fixed
-
Minecraft 1.4.6, Minecraft 15w42a, Minecraft 15w47a, Minecraft 15w49b, Minecraft 15w50a, Minecraft 15w51b, Minecraft 16w03a, Minecraft 16w05b, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.2, Minecraft 16w15b, Minecraft 1.9.4, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 16w33a, Minecraft 16w39b, Minecraft 16w39c, Minecraft 16w44a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w18a, Minecraft 1.12 Pre-Release 6, Minecraft 1.12 Pre-Release 7, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2 Pre-Release 1, Minecraft 1.12.2
-
Confirmed
-
Survival
The bug
Mining lots of blocks at once by holding your mouse while equipped with a tool capable of instamining blocks (efficiency 5 diamond shovel vs dirt, for example) will leave some blocks on the server, but the client thinks they're gone.
This bug can occur on a server running 20 TPS constantly. It only occurs when the time to break a block is instant, e.g. with a diamond pickaxe on Nether rack or high-Efficiency diamond shovel on dirt. While the block in question disappears from the client's view (it is not rendered anymore and is removed from clientside collision), the server says it's still there and pushes the players' movement back when the client tries to move within the block's space. This can be a quite tricky and dangerous situation, especially when taking down a pillar below you: You fall into the ghost block again and again (many times a second) and cannot move. Client and server arrive at no consensus over whether the block is still there or not. Reloading the chunks on the client by pressing F3+A does not resolve this. It can be resolved by trying to place a new block in the old location. This of course fails server-side, the new block is not placed, but the old one reappears client-side. It can also be resolved by rejoining the server.
How to reproduce (with provided structure)
Partwise by francois137
- Download the attached structure bug_instamining.nbt and place it in the structures folder of your world folder
- Stand on the command block, and switch your gamemode to Survival
/gamemode survival
- Press the button
- Hold down the block breaking key (default: left click) and move forward without rotating
→ The red sandstone block became a ghost-block
How to reproduce
See Ghost-block reproduction (1.12).mp4 for the video version
- Build a two block wide sandstone tower
- Give yourself an efficiency pickaxe
/give @p diamond_pickaxe 1 0 {ench:[{id:32s,lvl:5s}]}
- Move to the top of the tower and stand in the middle of the two blocks
- Switch to Survival mode
/gamemode survival
- Look at one block
- Hold down the block breaking key (default: left click) and move towards the block you are looking at
→ While falling you get stuck in a ghost block
Code analysis
Based on 1.12 decompiled using MCP 9.40 PRE 1
It looks like this bug is caused by the server thinking that the player is not on ground and therefore cannot instamine a block while the client thinks it can. This can be seen when setting a breakpoint in net.minecraft.server.management.PlayerInteractionManager.onBlockClicked(BlockPos, EnumFacing) for the specific block position where a ghost block will be (see "How to reproduce (with provided structure)") and then following the method calls to EntityPlayer.getDigSpeed(IBlockState).
For lagging servers or clients this another cause could likely be the method net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(CPacketPlayerDigging) which is not sending a SPacketBlockChange packet to resync the block if the block position is too far away from the player.
Suggested fix by gnembon can be found in fix_miningGhostBlocks.PNG; explanation can be found in this comment
- is cloned by
-
MC-156852 Ghost blocks remain when insta-mining; reappearance of MC-5694
- Resolved
- is duplicated by
-
MC-77303 Invisible blocks in singleplayer
- Resolved
-
MC-91112 Invisible mined block in the nether
- Resolved
-
MC-95006 invisible blocks
- Resolved
-
MC-95948 ghost blocks
- Resolved
-
MC-96740 Player gets stuck while moving
- Resolved
-
MC-97035 Unable to walk through a certain block
- Resolved
-
MC-97873 Wrong block updating (very often)
- Resolved
-
MC-97992 Mining netherrack with effciency iv sometimes creates invicible block
- Resolved
-
MC-98229 The player gets stuck when it's mining blocks so fast (Invisible blocks)
- Resolved
-
MC-99456 Stuck in the air after digging in survival
- Resolved
-
MC-99829 Nether Damage/Bounderies Bug
- Resolved
-
MC-100219 Efficiency IV Creates "Ghost blocks"
- Resolved
-
MC-100622 Diamond shovel efficiency V creates "ghost blocks"
- Resolved
-
MC-101205 Invisible Blocks
- Resolved
-
MC-101397 game froze up
- Resolved
-
MC-102747 Player becoming stuck/suffocating while tunneling in Netherrack
- Resolved
-
MC-103926 Ghost block in 1.10
- Resolved
-
MC-104865 Invisible block bug
- Resolved
-
MC-105028 Dirt and stone becomes invisible randomly
- Resolved
-
MC-105885 Dirt block seems to be 'mined', becomes invisible, when walked into suffocates you
- Resolved
-
MC-106495 netherrack glitches
- Resolved
-
MC-106788 Some harvested blocks disappear but are still in the way
- Resolved
-
MC-108541 My showel is so fast and it makes the dirt to get bugged.
- Resolved
-
MC-109798 Invisible block can't stay when you dig very fast
- Resolved
-
MC-111116 Can't walk through across certain half-slab in nether at 106 / 6.5 / -28
- Resolved
-
MC-112583 Invisible barrier-like glitch upon mining with Efficiency V pickaxe and Haste beacon.
- Resolved
-
MC-112701 Nether Walls might regenerate.
- Resolved
-
MC-113496 Suffocating under a tree
- Resolved
-
MC-114740 Invisible blocks sometimes remain after breaking, block movement
- Resolved
-
MC-114787 Stuck in dirt or sand Location
- Resolved
-
MC-116743 Block Glitching item loss
- Resolved
-
MC-118876 Blocks not actually breaking in safe file but no longer visible in game until after a reload. Weird glitchy hitbox remains
- Resolved
-
MC-119973 Invisible blocks when mining.
- Resolved
-
MC-120735 Bugs of velocity break
- Resolved
-
MC-121505 There is a bug in 1.12 versions with the speed of efficiency for the blocks
- Resolved
-
MC-123638 Invisible blocks remain, when mining very fast
- Resolved
-
MC-124500 Invisible Blocks When Destroying Blocks Too Fast
- Resolved
-
MC-126233 Abgebaute Blöcke unsichtbar noch vorhanden
- Resolved
-
MC-128164 Fix a bug with digging dirt by spade with efficiency V (sometimes blocks bugging).
- Resolved
-
MC-131429 Block despawn Bug with efficiency V on Diamong Shovel
- Resolved
-
MC-1749 You sometimes get stuck on a block
- Resolved
-
MC-3804 While moving, Steve 'sticks' and can't keep going.
- Resolved
-
MC-5286 Block Corners
- Resolved
- relates to
-
MC-858 Server lag in singleplayer
- Resolved
-
MC-271406 Blocks reappear when mined instantly
- Resolved