mojira.dev
MC-3794

Chest direction placing glitch

The bug

When placing a chest it will glitch to another direction for a second.

How to reproduce

  1. Place a chest when you are facing north

  2. Place a chest in front of it

  3. You can see a double chest to another side for half a second

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 9

Same with trapped chests.

Sorry that i duplicated, i tried to search "double chest glitch" and i went through 61 bugs. I tried.

Added some labels for future reference.

Confirmed for

  • 14w30c

  • 14w31a

  • Minecraft 1.8-pre 1 also sometimes when breaking a double chest

Confirmed for 14w33c

Confirmed for

  • 15w37a

Confirmed for 1.9-pre1

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.

The reason for this is very likely that the method net.minecraft.block.BlockChest.onBlockPlaced(World, BlockPos, EnumFacing, float, float, float, int, EntityLivingBase) is not calling the method net.minecraft.block.BlockChest.checkForSurroundingChests(World, BlockPos, IBlockState).

This might be inefficient because the method net.minecraft.block.BlockChest.onBlockAdded(World, BlockPos, IBlockState) is doing this always, whereas the method mentioned before and the method net.minecraft.block.BlockChest.onBlockPlacedBy(World, BlockPos, IBlockState, EntityLivingBase, ItemStack) do this when the chest is placed by a player, which means the same tests are done three times at the end.

Is Prive

(Unassigned)

Confirmed

Minecraft 1.4.5, Minecraft 1.4.7, Snapshot 13w02b, Snapshot 13w10b, Minecraft 1.5, , Minecraft 17w06a, Minecraft 1.12 Pre-Release 6, Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2

Minecraft 17w49b

Retrieved