Unable to perform many right click actions when targeting the top face of blocks placed at y=255
Resolved
Fixed
91
The bug
Beds can be placed at y=255, however, beds placed at this height cannot be used and give an odd error message.
In chat, this message is
"Height limit for building is 256"
which might make sense when I'm placing the bed, but not when I'm trying to use it.
In the console, the following message appears:
"2013-03-07 07:19:37 [CLIENT] [INFO] [CHAT] §7Height limit for building is 256"
The "section 7" bit is obviously a glitch.
This applies to all blocks with a right-click action (repeater, comparator, lever, bed etc.). When right-clicking the upper side of a block this message appears. Any other side works fine.
Code analysis
Code analysis by @unknown can be found in this comment.
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is because the method net.minecraft.network.NetHandlerPlayServer.func_184337_a(CPacketPlayerTryUseItem) is used when the player tries to use an item. The problem is that this method will test if the placed block would be above the build limit before testing if the player is playing a block or if he is only interacting with a block or using an item.
Buckets get emptied, but liquid not set. Because of that there should be a "relates to" link to MC-54119. I think when there were blocks possible above 256, it would behave the same as MC-54119.
For command blocks, you're actually able to access the GUI, but it doesn't load correctly (command line is empty and all buttons except "Cancel" are disabled). See MC-126830.
confirmed for 1.14 with command blocks, which don't even display the contained command when clicked on the top face if it is bordering the height limit, as well as placing armor stands
§7 means the text is output in grey.