2

I'm working on an special project in Minecraft at the moment and I really need your help.

The thing I want to do: Use a command to spawn a chicken which doesn't lay eggs or drop anything else.

How can I do that?

Thanks in advance.

4
  • As far as i know this is only possible with mods or server plugins, which would make it impossible for pocket edition. But maybe someone else has an idea how it could be done.
    – YanBear
    May 19, 2016 at 10:05
  • 2
    Can you please tell us whether you are using PE or PC edition? They are entirely separate games and have entirely separate answers. May 19, 2016 at 11:42
  • Have you made any attempt to solve this yourself? Arqade works better when askers show effort to solve their own problems; we see that you have a problem you've worked on, and answerers respond to that. You also get a more specific answer that's tailored exactly to the part you're stuck, and Arqade gets a very specific question. Everybody wins!
    – Frank
    May 19, 2016 at 11:58
  • You can set the "IsChickenJockey" Tag to true; but also name the chicken or use the "PersistencyRequired" Tag. @YanBear
    – John
    Jan 29, 2017 at 23:30

3 Answers 3

1

Assuming that you have access to command-blocks (which I do not know since you have not specified), you could create a command block which runs every 3 seconds or so where the command-block runs /entitydata @e[type=Chicken] {EggLayTime:30000}. This way, the Chicken's eggLayTime value will never hit 0, meaning that it can't lay an egg. As for drops, Letality's answer hit the mark, using /summon Chicken ~ ~ ~ {DeathLootTable:"invalid"} when creating the Chicken or simply changing the tag of the already existing ones with /entitydata @e[type=Chicken] {DeathLootTable:"invalid"} will be sufficient.

2
  • I think the commandblock is a good idea - I'll try soon. Thanks!
    – tr01
    May 22, 2016 at 8:26
  • Hey, great solution! Worked fine!
    – tr01
    Jun 8, 2016 at 15:29
3

As far as I know this is impossible to do the on the pocket edition else you make a mod for it. On the other hand, for the pc edition it quite easy to do. Just summon in a chicken with the EggLayTime data tag. An example is

/summon Chicken ~ ~ ~ {EggLayTime:32000}

This will summon a chicken who won't lay an egg until 32000 ticks have past.

Notes:

  • There are 20 ticks in a second!
  • Putting the value in the negative will make the chicken immediately lay an egg as soon as it spawns.

EDIT:

To make the chicken not drop anything when it dies all you need to do is give it an invalid loot table. The data tag DeathLootTable is used here. All you need to do is give it an invalid string and the chicken won't drop anything. Example of command below

/summon Chicken ~ ~ ~ {DeathLootTable:"invalid"}

Notes:

  • The chicken will still drop xp. If you don't want this happening the easiest solution is to run this command.

    /kill @e[type=EXOrb]

Hope this helps.

3
  • 32000 means something like ~27 minutes. Then it will go as normal. Probably not enough. However this number is INT, so it can be also something like 32.000.000, which would deny to lay them eggs for like 18,5 DAYS of gametime, which would be probably enough. For drops, probably Loot tables can be used. May 19, 2016 at 13:10
  • Oops forgot about the drops part. I'll edit my answer and add that in.
    – LethaIity
    May 19, 2016 at 13:14
  • 1
    To prevent errors, you can use the "minecraft:empty" loot table which is an empty loot table: /summon Chicken ~ ~ ~ {DeathLootTable:"empty"}
    – Skylinerw
    May 19, 2016 at 23:27
2

You can set the "IsChickenJockey" tag to 1, which will make it no longer lay eggs. Be sure to use a Name Tag on it, in order to prevent despawning.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .