2

I was messing around with conmand blocks and summoning tamed dogs. When I summon them, their tails are always down and they wimper and need food. What data tag would I add so their tail is up and I do not need to feed them?

4

The health of the wolf is what determines tail height. When not tame, its current and maximum health will be 8.0 (4 hearts). When the wolf is manually tamed by a player, both its current and maximum will become 20.0 (10 hearts).

However, there are a few issues with modifying the health of a wolf via /summon. When you summon the wolf pre-tamed, its generic.maxHealth attribute will initially be 8.0 as a result of instantiating a Wolf entity, meaning you cannot specify a higher current health. The game will not update its maxHealth to 20.0 until after being created. Since this update occurs after creation, its current health will remain at 8.0 from summoning.

The fix is to also specify a new maxHealth attribute value, but because this value change happens before its maxHealth is updated from being tame, any value you provide will be overwritten. Note: the maxHealth overwriting also occurs at all times after summoning, so you cannot use external mechanisms to change its maximum health; you'll need to use defensive methods such as the Resistance effect.

As such, the following will ensure the wolf will have the maximum health a wolf can have.

1.8:

/summon Wolf ~ ~1 ~ {Owner:"Skylinerw",HealF:20.0f,Attributes:[{Name:"generic.maxHealth",Base:20.0}]}

1.9:

/summon Wolf ~ ~1 ~ {Owner:"Skylinerw",Health:20.0f,Attributes:[{Name:"generic.maxHealth",Base:20.0}]}
2
  • What about summoning the wolf with active healing effect? – Antoine Hejlík Dec 2 '15 at 12:35
  • @AntoineHejlík Yep, that will work as well! /summon Wolf ~ ~1 ~ {Owner:"Skylinerw",ActiveEffects:[{Id:6,Duration:20}]} – Skylinerw Dec 2 '15 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.