mojira.dev
MC-75089

Slimes do not use the slot.weapon for attacks

If you spawn a slime using this command:

/summon Slime ~ ~ ~ {Size:1,Equipment:[{id:276,Count:1,Damage:0,tag:{ench:[{id:20,lvl:1}]}},{},{},{},{}]}

It will summon a slime holding a diamond sword enchanted with fire aspect 1, however, the slime does not use it.

This will work with most other mobs, for example, a Silverfish:

/summon Silverfish ~ ~ ~ {Equipment:[{id:276,Count:1,Damage:0,tag:{ench:[{id:20,lvl:1}]}},{},{},{},{}]}

This command will summon a Silverfish holding a diamond sword, and he WILL use it.

Related issues

Comments

migrated

Most likely because Slimes do not attack as part of their AI (a NoAI slime can still damage the player).

marcono1234

Relates to MC-88099

If @unknown opens this report, please close it again

Chuzume

Why this is "Works As Intended"? it should be changed. 

migrated

(Unassigned)

Unconfirmed

Minecraft 1.8.1

Retrieved