-
Bug
-
Resolution: Invalid
-
None
-
Minecraft 1.10.2, Minecraft 16w33a, Minecraft 1.12.2
-
Confirmed
The bug
The command stat AffectedEntities is always set to 1 when a command without a player index is executed.
How to reproduce
- :
/scoreboard objectives add stats dummy
- :
scoreboard players set affectedEntities stats 0
- :
/scoreboard objectives setdisplay sidebar stats
- Run in command block:
/setblock ~ ~1 ~ command_block default replace {Command:"/say Test",CommandStats:{AffectedEntitiesName:"affectedEntities",AffectedEntitiesObjective:"stats"}}
- Activate the new command block
→ The score of "affectedEntities" is now 1
The reason
The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.
The reason for this is that the method net.minecraft.command.CommandHandler.executeCommand(ICommandSender, String) sets the affected entities stat to 1 if the command contains no player index.