The bug
When placing a chest it will glitch to another direction for a second.
How to reproduce
Place a chest when you are facing north
Place a chest in front of it
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
is duplicated by 3
Attachments
Comments 9
Sorry that i duplicated, i tried to search "double chest glitch" and i went through 61 bugs. I tried.
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.
Can confirm.