0

I'm trying to make a command that makes every shulker always drop 2 shells but I can't get the command to work. I made all shulkers wear on the head shells but for some reason even though they have them on the head and the drop is 100% drop they don't drop the shells. I tried with zombies too, I gave them glass on the head but same thing anyone know how to make the shulkers drop 2 shells?

Here's the command I'm using:

/replaceitem entity @e[type=Shulker] slot.armor.head minecraft:shulker_shell 2 0 {ArmorDropChances:[0.085F,0.085F,0.085F,1.0F]}
  • 2
    Could you paste the command you're trying that isn't working? – SirBenet Nov 21 '16 at 20:02
  • 1
    /replaceitem entity @e[type=Shulker] slot.armor.head minecraft:shulker_shell 2 0 {ArmorDropChances:[0.085F,0.085F,0.085F,1.0F]} the idea is that since the shulker has thos 2 shells always will drop 2 shells and some times 3 because shulkers drop 1 shell some times i heard in a video in hermitcraft that xisuma made shulkers always drop 2 shells with the loot table i tryed tto find someone that showed this methode but i didn't find anything – Alex Nov 21 '16 at 22:48
1

The NBT data for /replaceitem is what should be applied to the item, not the entity. The item will instead have a custom ArmorDropChances tag that doesn't do anything.

You'll instead need to use /entitydata on the shulkers, where you can also change their equipment directly. The following will modify a shulker's data a single time:

/entitydata @e[type=Shulker,tag=!processed] {ArmorItems:[{},{},{},{id:"minecraft:shulker_shell",Count:2b}],ArmorDropChances:[0.085F,0.085F,0.085F,1.0F]}
/scoreboard players tag @e[type=Shulker,tag=!processed] add processed

Or if you do not have any other scoreboard tags on the shulkers, you can use a single command (which will delete all other tags):

/entitydata @e[type=Shulker,tag=!processed] {ArmorItems:[{},{},{},{id:"minecraft:shulker_shell",Count:2b}],ArmorDropChances:[0.085F,0.085F,0.085F,1.0F],Tags:["processed"]}
  • thanks skylinerw i tested the command and now all shulkers drop the 2 shells thanks a lot – Alex Nov 22 '16 at 23:32
0

I haven't tested this myself, but you could make a test for/scoreboard to check if a Shulker's health is zero, then kill all items near it (r=1)? Next, summon in 2 shells there.

  • i am not very good with commands and i don't know how to make this but it's a good idea it might work – Alex Nov 22 '16 at 8:47
  • This will not work because you cannot target dead entities (i.e. when their health is zero). – Skylinerw Nov 22 '16 at 10:11
  • @Skylinerw Oh, I thought that would work because I had done that with plugins and it would work fine. Since both plugins and command blocks are server side, I thought they would reference the same entity type. 😕 – ProgramFast Nov 22 '16 at 14:49

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.