3

In a custom Minecraft map I'm making, I have a pet shop where you can spend points you've earned on the main map levels to "adopt" pets. This includes horses, cats, and dogs. That's all fine. However, in another room nearby, but not adjacent to, the pet shop, I have a NoAI skeleton as decoration/signage for a minigame involving skeletons. Annoyingly, the untamed wolf in the pet shop (the one that you will tame when you adopt it) is becoming aggressive towards this NoAI skeleton, even through several walls and over 25 blocks away. I tried setting its Angry tag to 0b every tick, but that just makes him flash between hostile and passive on and off each tick.

How can I stop him from noticing the skeleton if he can see through walls? Or at least, can I stop him from becoming angry at this particular skeleton?

1 Answer 1

3

Mobs that are on the same scoreboard team will no longer be aggressive to one another. This includes wolves attacking skeletons, zombies attacking villagers, hostile mobs attacking players, etc.

/scoreboard teams add Friendly

/scoreboard teams join Friendly @e[type=Wolf] @e[type=Skeleton]
5
  • Ah! That sounds like it should work! I'll have to test it when I get a chance. One question: if the wolf is tamed, it doesn't lose its team association, right? So it'll still not be hostile towards my NoAI skeleton after being tamed, correct? Commented Nov 29, 2015 at 14:00
  • 1
    @IceMetalPunk So it appears that when the wolf is tamed, it will be forced to be in the same team as its owner (which includes no team at all), even after changing the wolf's team. The player would also need to be on the Friendly team for it to work completely.
    – Skylinerw
    Commented Nov 29, 2015 at 14:14
  • Ingenious solution. I'm curious, does the opposite work too? I.E. does putting two hostile mobs on opposing teams make them hostile towards each other?
    – MBraedley
    Commented Nov 30, 2015 at 1:10
  • @MBraedley Unfortunately not for 1.8. In 1.9, the only mob that does that are Shulkers. There is a way to make mobs fight each other using the ownerName tag for projectiles such as snowballs and thrown potions. I have a comment on /r/minecraft describing how to do this here, if interested.
    – Skylinerw
    Commented Nov 30, 2015 at 3:23
  • @Skylinerw Hm. For now, I don't necessarily need the untamed wolves to be hostile towards the player, so I guess that would be the solution I'm looking for. Thanks for your help! Commented Nov 30, 2015 at 4:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .