mojira.dev
MC-59221

Skeleton and /replaceitem

Using the command /replaceitem on a skeleton produces an unwanted effect.
I'm using these commands on a clock.

/execute @p ~ ~ ~ execute @e[type=Skeleton,r=5] ~ ~ ~ replaceitem entity @e[type=Skeleton,r=1] slot.weapon iron_sword
/execute @p ~ ~ ~ execute @e[type=Skeleton,rm=5] ~ ~ ~ replaceitem entity @e[type=Skeleton,r=1] slot.weapon bow

When I get near the skelly, it switches the bow with a sword. That part is fine. But when I move away, it switches the sword for a bow (also fine) but what is the problem is that the skeleton never fires again after the new bow is in place.

Attachments

Comments 3

update The skeleton actually never fires when freshly summoned or naturally spawned in.

Apparently, skeletons cannot shoot their bows if the bow is constantly being replaced, because that is what your clock does. I can however not confirm that skeletons never shoot their bows, at least not when their bows are not getting replaced.

Cannot confirm.

  • Setup two command blocks, each with one of your two commands

  • Spawned a skeleton

  • Activated first command block, Skeleton attacks me by sword

  • Activated second command block, Skeleton attacks me by bow

Like @unknown wrote, this is caused by your clock.

CocoaMix

(Unassigned)

Unconfirmed

Minecraft 14w26b, Minecraft 14w26c

Retrieved