-
Bug
-
Resolution: Duplicate
-
None
-
1.16.4, 20w51a
-
None
-
Unconfirmed
-
(Unassigned)
If an enderman is given any tall flowers with commands, the flower will break immediately when placed.
What I expected to happen was...:
The tall flower being places as a player would place it, placing two blocks.
What actually happened was...:
No flower was placed.
Reproduction steps:
- Summon an enderman with
summon enderman ~ ~ ~ {carriedBlockState:{Name:"minecraft:sunflower"}}
- Spectate it
- Wait until it places the sunflower
- See that while the sunflower is removed from his hands, it doesn't get placed anywhere in the world
Code analysis
EnderMan.EndermanLeaveBlockGoal.tick runs
level.setBlock(blockPos, blockState3, 3); this.enderman.setCarriedBlock(null);
without running Block.setPlacedBy, which causes the block to not update correctly.
It can be fixed by adding
this.enderman.getCarriedBlock().getBlock().setPlacedBy(level, blockPos, this.enderman.getCarriedBlock(), this.enderman, this.enderman.getCarriedBlock().getBlock().asItem());
before doing
this.enderman.setCarriedBlock(null);
- duplicates
-
MC-183054 Enderman-placed wither skulls can't summon the wither/other missing block updates
- Open