TransWikia.com

How can I make a minecraft command block kill only aggressive mob

Arqade Asked by Shadow Storm Playz on April 19, 2021

How can I make a command block kill all aggressive mobs, and not passive ones?

2 Answers

You can kill all aggressive mobs by setting the difficulty to peaceful.

/difficulty 0

Or you could /kill @e[type=X] where 'X' are mobs that are hostile.

/kill @e[type=cave_spider]
/kill @e[type=enderman]
and so on...

Answered by aytimothy on April 19, 2021

There's an nbt called "anger", and you can put it in the selector like @e[nbt={anger:1}] or sth cuz im not very sure whether that is the correct value for aggression. And then just kill this type of entities

Answered by RobertHunt on April 19, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP