How do I turn Passive mobs Hostile?

How do I turn Passive mobs Hostile? - Black and Silver Mixing Board

Is there a way to spawn a usually passive mob (like a cow) hostile?

More specifically, I want to summon an Iron Golem that will automatically lock onto a player and attack them. I'm not a master at this kind of "advanced command block programming", so I'll leave it up to you guys... any ideas?



Best Answer

Unfortunately this is impossible without having to dive into minecrafts coding. However with your iron golem problem there is a way, its just a pain to do. According to the wikia iron golems created by the player will not harm the player who built it. Iron golems that have spawned naturally, such as in villages, will go aggro if the player hits villagers or the iron golem itself.

So in theory, you could take the iron golem from a village and hit it, that would make it aggro. Unfortunately that is the only way i can think of that you could possibly do something like that.

In conclusion. No, there isn't a well known way of turning a passive mob into a hostile mob using command blocks. Sorry.

Good luck with whatever your doing though!




Pictures about "How do I turn Passive mobs Hostile?"

How do I turn Passive mobs Hostile? - Crop faceless female entrepreneur in stylish jacket reading important documents in black folder
How do I turn Passive mobs Hostile? - Grilled Meats
How do I turn Passive mobs Hostile? - Crop faceless female entrepreneur in formal jacket turning pages of documents in folder while reading



How do you make mobs hostile?

Minecraft Bedrock Edition players can edit their world settings under \u201cGame\u201d and uncheck the box next to \u201cMob Spawning.\u201d Java Edition players can type \u201c/gamerule doMobSpawning false\u201d into the chat bar to disable mobs. You'll need to be a server admin and have cheats enabled.

How do you turn off passive mobs in Minecraft?

Passive mobs flee in random directions after being hurt, while hostile mobs face and chase/attack the player as soon as the player comes close. Neutral mobs remain neutral until a player or mob provokes it (usually by attacking), at which point the neutral mob becomes hostile toward and attack the entity that hit it.



Tutorial - How to Make Passive Mobs Hostile




More answers regarding how do I turn Passive mobs Hostile?

Answer 2

I think i have a simple command for this in order to set the iron golem to aggro to the nearest player. Put a repeating command block on always active facing straight up that says /execute @a ~~~ testfor @e[type=iron_golem,r=30]. Then add another command block one block away and put a comparitor in between facing out from the repeating command block, and set it to impulse needs redstone, and make it say /execute @a ~~~ /execute @e[type=iron_golem,r=30] ~~~ summon snowball ~~~

Answer 3

You need to make a new team via /scoreboard, and then go to this site to create an iron golem summon command that will make the iron golem target you.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Stephen Niemeier, Ono Kosuki, Pixabay, Ono Kosuki