Certain block entities, when newly placed next to a power source, won't activate until they receive a block update.
Steps To Reproduce:
1. Place a command block to where it will be powered as soon as it is placed.
2. Type a command into the command block, e.g.: "say test".
> Notice the command block won't output "test" although it's powered.
3. Cause a block update next to the command block.
> Notice the command block now outputs "test".
This also occurs with dispensers, droppers, and note blocks.
See also:
MC-51340, it also happens if you got certain block entities with NBT data (e.g. a command block with an inserted command) and place that manually next to a power source, as well as
MC-31100 if you setblock certain block entities with NBT data where they would get powered, as well as
MC-80901 as falling block.
Code analysis by @unknown in this comment.
Related issues
duplicates
Attachments
Comments


Please attach screenshots.
Confirmed. Attached screenshots.
Sorry for not adding screenshots, i wasn't sure of a good way of showing it in a screenshot.

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Updated

Is this still a concern in the current Minecraft version 1.7.4 / Launcher version 1.3.8 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Confirmed for 14w20b

Duplicated by:
MC-50612
Confirmed for 1.8-pre1.

Confirmed for
1.8.3 only for redstone it is diagonally (probably because of the redstone update order), but you can also place a block directly next to it to cause the update
Could the title be updated to something more accurate, like "Some redstone components do not update themselves when placed"? This bug also occurs with dispensers, droppers, and note blocks.

Confirmed for:
1.8.6
Seems to be caused by wether the block is a TileEntity or not. Non-TileEntities like pistons, lamps... work. TileEntities like command blocks and dispensers don't
Relates to:

Duplicated by:
First of all this whole block placing updating blocks thing is really complicated and confusing with Minecraft. Because of that the provided fix might cause other problems but I hope I got that right and currently it does not cause other problems.
The method setBlockState(BlockPos p_177436_1_, IBlockState p_177436_2_)
in the class /Client/src/net/minecraft/world/chunk/Chunk.java
(MCP 1.8 names) which is called at some point after a block was placed or destroyed used to call only var15.updateContainingBlockInfo();
however I am unsure what this method actually does...
For TileEntities the onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
method must be called to update them. This method is called by the notifyBlockOfStateChange(BlockPos pos, final Block blockIn)
method.
The reason why this did not affect basic redstone powered blocks is that they update themselves when the onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
is called (and this method is called).
public IBlockState setBlockState(BlockPos p_177436_1_, IBlockState p_177436_2_)
{
//...
if (var8 == p_177436_2_)
{
return null;
}
else
{
//...
if (var11.getBlockByExtId(var3, var4 & 15, var5) != var9)
{
return null;
}
else
{
if (var9 instanceof ITileEntityProvider)
{
var15 = this.func_177424_a(p_177436_1_, Chunk.EnumCreateEntityType.CHECK);
if (var15 == null)
{
var15 = ((ITileEntityProvider)var9).createNewTileEntity(this.worldObj, var9.getMetaFromState(p_177436_2_));
this.worldObj.setTileEntity(p_177436_1_, var15);
}
if (var15 != null)
{
// Added the following line
worldObj.notifyBlockOfStateChange(var15.getPos(), var15.getBlockType());
var15.updateContainingBlockInfo();
}
}
}
}
}

Still in 1.9.4
Can confirm for 1.11
Confirmed for 1.12 pre-7.
Confirmed for 1.12 release.
(@unknown Thank you also here 🙂)

Ticket is yours now, @unknown
Merging with MC-51340 as it's the same cause.