mojira.dev
MC-8471

Blocks cannot be placed on a block you are next to

The bug

Sometimes blocks cannot be placed on a block you directly standing next to. When you place them they appear for a short moment (client-side) but directly afterwards disappear.

How to reproduce

  1. Dig a 1 block deep hole

  2. Move up against any side or corner of the hole

  3. Attempt to place a repeater or comparator on the block you moved towards
    → The repeater will appear and disappear immediately, as if the server thinks you are occupying the space and cannot place a block.

If you cannot reproduce the bug, try sprinting against the block.

Cause

The cause seems to be that the server thinks the player is intersecting with the collision box of the block to be placed while the client thinks he is not.

For example

To check: box[13.0, 4.0, 8.0 -> 14.0, 4.875, 9.0]

Client player: box[14.0, 4.0, 8.080747030085668 -> 14.600000023841854, 5.799999952316284, 8.680747053927526]
Server player: box[13.999999999999998, 4.0, 8.085848427457286 -> 14.600000023841856, 5.799999952316284, 8.685848451299144]

However, it is interesting that the server let the client move inside the block in the first place.

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

Removed part
The reason why the method net.minecraft.network.NetHandlerPlayServer.processPlayer(CPacketPlayer) did not prevent the movement then is because it contracts the player bounding box by 0.0625. Removing this might solve the problem as well, but could result in the player being teleported back when running with the speed effect against a wall or similar.

Edit: Code analysis was partwise wrong. The actual reason is not quite clear.

Related issues

Comments

migrated

Unable to reproduce. Please provide screenshots.

migrated

Now I can't reproduce it either, having restarted. Sorry for the noise!

migrated

I've also experienced this issue, actually
( a lot )

migrated
migrated

I agree that the behavior in the above video is similar to what I experienced when I made this report.

migrated

Can you please reopen this ticket? The prove is in the video.

migrated

Reopened.

migrated

thanks ;P

migrated

I cannot reproduce in 1.5. Resolving as fixed.

kumasasa

Reopened due to MC-48517

migrated

why is this reopened all of a sudden?

kumasasa

Jesper the End :

[Mod] Kumasasa added a comment - Yesterday 11:44 PM

Reopened due to MC-48517

migrated

Confirmed for 1.7.4, 1.7.5 and 1.8 snapshots

migrated

More like repeaters, comparators and all other blocks. I think this bug is too major to be hidden away like this. Reproduceable in all snapshots. If you're lucky.

migrated

not being able to place certain blocks is not too much of a problem for me, but this also affects selectors. when you do /execute @a[x,y,z,0] inside a block, it will still detect the player, even though the coordinates are inside a block. And that kinda bugs me

migrated

It's not really a problem, but it looks really crappy, as it happens quite frequently when you are an intensive MC builder. Could a mod please update the title based on some closed duplicates? And also update the version to snapshot 29b?

migrated

https://www.youtube.com/watch?v=TKVL1R5C-Nw

Here, I uploaded this to prove it affects all blocks

migrated

Well for me it doesn't just look crappy, it's also a problem for me since my redstone breaks because of this bug

migrated

Confirmed in...well I've seen this since as long as I can remember playing (1.4.x?) Repeaters (and Comparators since they were introduced) have always been glitchy to place. This happens for me with Repeaters and Comparators when laying out complex redstone and appears to be different than MC-58153, which I notice when building in general. The more I think about it, This seems to have been around for awhile and I've only recently tried to reproduce and report it since my 1.8 snapshot LP. With the new launcher, I will have to go back and attempt to reproduce MC-8471 and MC-58153 in previous version.

migrated

confirmed for 14w32d

galaxy_2alex

Cannot Confirm in 1.8.1 Pre3 on Singleplayer. Was not able to test Multiplayer.

migrated

This issue still exists in 1.8.1 pre-3 and still affects ALL BLOCKS.

Why the title is still only alluding to repeaters and comparators is beyond me. I posted a video on july 23rd in this thread. Here it is again:

https://www.youtube.com/watch?v=TKVL1R5C-Nw

migrated

https://www.youtube.com/watch?v=77dkxtap-l0&list=UUek3flso2pgg_QoptI57pJw

Heres proof that it still happens in 1.8.1 pre-3...

migrated

Cannot reproduce in 1.8.1 pre-3. The video shown by Arjan might have been an upside down side stair oriented perpendicular to the player. That (and the accompanying 1/4 block quarter stair hitbox issue) can create a situation like the one shown in the video.

migrated

It's not always reproducable. If it isn't, try playing walking a few minutes and try again. It has nothing to do with orientation of stairs. It happens with blocks, and lately I also experienced it when placing ladders while climbing. I can reproduce, whenever I want, although sometimes I need to play for a few minutes.

migrated

Here is an image sequence (note the timestamps of the screenshots) to try and show this happening with oak wood. Also had it happen to a comparator earlier.

Was standing on a ladder when trying to place the block, it would disappear and when I right-click again it appears back in the hot-bar.

migrated

I originally posted this to MC-58153 before finding this much older issue. This is very easy to recreate. When placing a block at foot level in front of you while crouched it occurs at exactly 7/10ths of the block your in(in the direction your facing). Although does require some movement. Facing east while standing on 0.7 64 0.5 hold shift and tap forward and back keeping near X 0.7 while trying to place block at 1 65 0. Of coarse its easier in creative where can instantly destroy the block when it does get placed. These steps work anywhere, I just felt east in a positive chunk was easier to explain. East in a negative chunk would be at -0.3 instead, etc

Edit: release version 1.8.2

migrated

I can't reproduce this consistently, though I have had it occur in 1.8.7 on LAN. I was laying half slabs on the bottom half of the block, in the air, and I was sneaking over the edge to lay them in a row, and the block would flash for an instant and then disappear again if I was holding the arrow keys off the edge, OR if I was still moving a tiny bit. If I slowed down to a sure stop each and every time, the block would never flash and it would place properly.

migrated

This still happens in 15w32a. But only at certain places in a map and/or in certain directions. Happens in both creative and survival. This can ruin the ladder in main hand, a block in other hand climbing trick. Please fix.

ziggurism

Came here from MC-44773. Can confirm this bug in 16w04a.

ziggurism

Confirmed for 16w05a.

ziggurism

Confirmed for 16w05b.

ziggurism

Confirm for 1.9-pre1

ziggurism

Confirm for 1.9-pre2

ziggurism

Confirm for 1.9-pre3

ziggurism

Confirm for 1.9-pre4

ziggurism

Confirm for 1.9 Edit: redstonehelper has already marked it, oops

ziggurism

Confirm for 16w14a

ziggurism

Confirm for 16w15a.

ziggurism

Confirm 1.9.4

ziggurism

Confirm 16w20a.

ziggurism

Confirm 1.10.2

ziggurism

Confirm for 1.11

wobst.michael

Since I always had problems trying to reproduce this bug, can someone please check if this is still an issue in the latest development snapshot?

tryashtar

I also can't reproduce in the latest 1.13 snapshot using Jesper's video instructions

migrated

I have a similar problem. I am unable to place blocks in a 4x4 block area. 

migrated

(Unassigned)

Confirmed

placement, redstone, redstone-comparator, redstone-repeater

Snapshot 13w04a, Minecraft 1.7.4, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w32d, ..., Minecraft 16w20a, Minecraft 1.10.2, Minecraft 16w42a, Minecraft 1.11, Minecraft 17w06a

Snapshot 13w10b, Minecraft 18w05a

Retrieved