そのワールドにいるモブの数をサイドバーに表示する。
Command (Chatbox)
/scoreboard objectives add Count dummy
Command block: Repeat
/execute store result score husk Count if entity @e[type=husk]
Command block: Chain
/scoreboard objectives setdisplay sidebar Count
Countは任意の名前。
huskは任意のモブ。
これでhuskの数を数え、リアルタイムにサイドバーに反映される。
こちらのモブ対決では、右側のサイドバーに残り何体いるか表示させています。