To explain, when a player kills certain mobs, they have a chance to drop specific items. For example, when a player kills a zombie, they have a chance to drop iron tools, armour, iron ingots, and even potatoes or carrots.

If I wanted to create a mob-grinder, is there a way to spawn mobs that act as if they can be killed by players, if a player hasn't actually touched them using only commands/command blocks? (No mods)

  • 2
    I'm not sure how but I think you can 'fake' player kill by using projectile with ownerName NBT. I'm currently experimenting with it. – QbsidianH20 Nov 15 '14 at 7:14
  • @QbsidianH20 have you had any luck with this? – Ben Jul 1 '15 at 23:11

I don't quite understand what you mean but there were 2 things I thought you could have meant.

The first one was to spawn the Mob with half a heart so there a one-shot-kill and for that, you would do: /summon Zombie ~ ~ ~ {Attributes:[{Name:generic.maxHealth,Base:0.5}]}

The second thing I got was to make the Mob Invulnerable and for that, you would do: /summon Zombie ~ ~ ~ {Invulnerable:1}

However, if you're trying to spawn a mob that has an attribute to define "Hit by player", unfortunately there is no such command.

| improve this answer | |
  • Let's put it this way... If you hit a zombie off a ledge, and they die from fall damage, it counts as "Killed by player". Same as if you hit them while burning (while the sun is up) and they die from fire damage. Is there a way to give a mob an attribute that defines "hit by player"? – Ben Nov 14 '14 at 1:08
  • I'm afraid that is not possible, when a mob is spawned it's completely natural. Also you can't use /clone for entities so that won't work either – FireStrike289 Nov 14 '14 at 1:17
  • so there is no way to do a command like /summon Zombie ~ ~20 ~ {Attributes[(hit by player)]}? – Ben Nov 14 '14 at 1:37
  • Nope. Sorry. :( – FireStrike289 Nov 14 '14 at 1:42
  • Bugger eh? Haha no worries thanks anyway :) – Ben Nov 14 '14 at 1:43

Mobs can drop items even if they die from other sources. The only thing they won't drop is XP. If you want to "farm" them put the command block to spawn them near a sure-death trap.

| improve this answer | |
  • I understand they do drop some items, however there are other items that will only be dropped if the mob is killed by a player. For example, a zombie, if killed by a player, has a chance to drop iron gear, armour, iron ingots, potatoes or carrots. I'm interested in trting to find a way to make a mob drop these items even if a player has not attacked them – Ben Jul 1 '15 at 23:11

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.