Laurens
- Laurenss
- JIRAUSER565197
- Europe/Stockholm
- Yes
- No
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.
Expected results
Block should be placed.
Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.
This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;
Notes
This isn't a duplicate of MC-95720, MC-95720
3is about the inventory desync caused by an invalid block placement. This is report is about why the invalid block placement happens in the first case.
Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement wise is very hard.
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.
Expected results
Block should be placed.
Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.
This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;
Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This
isreport is about why the invalid block placement happens in the first case.
Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement
wise is very hard.When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.
Expected results
Block should be placed.
Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.
This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;
Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first case.
Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.
Placing blocksnext to bounding box when slowly moving are getting cancelledBlocks placed next to bounding box when slowly moving are getting cancelled
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.
Expected results
Block should be placed.
Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.
This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;
Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first case.
Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.
Expected results
Block should be placed.
Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.
This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first case.
Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.
Expected resultsBlock should be placed.
Code analysisAt net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.
This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first case.
Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.Expected results
Block should be placed.Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first case.Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.Expected results
Block should be placed.Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the firstcase.Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.Expected results
Block should be placed.Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first place.Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.Expected results
Block should be placed.Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first place.Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.Expected results
Block should be placed.Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This may have been implemented with the thought of not sending the position for very small moves (floating-point precision or very small moves <0.0001), however, this already exists, if the clients motion is less than 0.003 it will be set to 0.This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first place.
Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.
When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.Expected results
Block should be placed.Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This may have been implemented with the thought of not sending the position for very small moves (floating-point precision or very small moves <0.0001), however,this already exists, if the clients motion is less than 0.003 it will be set to 0.
This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first place.Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.When you place a block close to your bounding box when you're slowly moving backward the block gets canceled by the server.
Steps to reproduce
1. Make sure you move very slow, less than 0.03 blocks per tick. I will use cobweb and sneak for this.
2. Move backward.
3. Try to place the block as close as possible to your bounding box.
using cobweb.mp4Observed results
The server thinks you're placing the block inside yourself and therefore cancels it.Expected results
Block should be placed.Code analysis
At net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved at least 0.03 blocks or when 20 ticks have passed.This means that the bounding box from the server can be off by max 0.03 blocks.
final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 9.0E-4 || this.positionReminder >= 20;There is no good reason for this, you want the server to have the same location as the client.
Suggested fix
Send the position at every move.final double double4 = this.getX() - this.xLast; final double double5 = this.getY() - this.yLast1; final double double6 = this.getZ() - this.zLast; ++this.positionReminder; boolean boolean4 = double4 * double4 + double5 * double5 + double6 * double6 > 0 || this.positionReminder >= 20;Notes
This may have been implemented with the thought of not sending the position for very small moves (floating-point precision or very small moves <0.0001), however this already exists, if the clients motion is less than 0.003 it will be set to 0.This isn't a duplicate of MC-95720, MC-95720 is about the inventory desync caused by an invalid block placement. This report is about why the invalid block placement happens in the first place.
Off topic
This 0.03 is also the reason why making an unbypassable anticheat movement-wise is very hard.
Laurens Yes, you are absolutely right, it should work like this. However it's not a simple change to do at the moment, as it has implications for how the offhand is handled, and the resulting changes have implications for modded servers.
The current fix is a small patch to avoid the most annoying part of the issue from showing up.
Thanks Laurens for testing the issue in the latest versions. Though in general it is not necessary to confirm a bug for every version; most important is to confirm it for releases or when the changelog indicates that similar bugs have been fixed or that the game logic has been changed in this area.

I wonder if they will ever fix this, it is marked as important and should be a simple fix
@panda4994 Why exactly are liquids calculated server-side? It would be much simpler to calculate it client-side and have the server validate it, just like the rest off the blocks.
Can confirm in 21w11a
This report contains two bugs.
1. The inventory desync
When a block is canceled the server doesn't update the player's inventory.
2. The invalid block placement
The server thinks you're placing a block inside yourself therefore it cancels the block. This is because the client doesn't send its position when you move less than 0.03 blocks.
at net.minecraft.client.player.localplayer.sendPosition() you can see that the client won't send its position to the server unless the player moved atleast 0.03 blocks or when 20 ticks have passed.
I can't think of a good reason for this, you want the server to have the same location as the client. A simple fix would be to send the position when the player moved more than 0 blocks.
You might think why 0, what if the client moved 0.0000001 blocks? Do you want to send the position in that case? Well basically you can't, if no keys are pressed and the client's motion is lower than 0.003 it will be set to 0. And then again, even if it is sent each tick it is such a small packet you wouldn't notice any increase in bandwidth.
Can confirm in 21w13a
Can confirm in 21w14a
Can confirm in 21w15a
[Helper] clam lol That could work but is quite a big change, it would be much simpler to update the player's inventory after their block is being canceled.
Can confirm in 21w16a
Using cobweb you can easily verify if this bug still exists, see attachment
using cobweb.mp4
Can confirm in 21w17a
Can confirm in 21w18a
Can confirm in 21w19a
Can confirm in Pre-release 4
yes, can confirm in 1.17.1 water desync 1.17.1.mp4
Also happens when your yaw is exactly 90 or 180 degrees. maintain speed with yaw 90.mp4