How to spawn a chicken that lays diamonds?

How to spawn a chicken that lays diamonds? - Free stock photo of agriculture, animal, beak

Is it possible to make a chicken drop something else instead of an egg by using commands? I've tried the following:

/summon Chicken ~  ~ ~ {Drop:[{id:diamond}]}   

It said "Object succesfully summoned", but the chicken still dropped an egg.
So, what is the command needed for spawning a chicken that lays diamonds?



Best Answer

There is no simple command to do this, but I have found a way to replace eggs that were just laid by a chicken with a diamond.

This makes use of the chicken's EggLayTime data tag, to mark chickens which are about to lay an egg. Unfortunately, this tag never actually reaches 0, it resets immediately. So, marking them 1 tick before will have to suffice. Create a scoreboard objective for the chickens:

/scoreboard objectives add eggLayer dummy

Now set up a repeat/chain command block line, and put in the following commands:

/scoreboard players remove @e[type=Chicken,score_eggLayer_min=1] eggLayer 1
/scoreboard players set @e[type=Chicken] eggLayer 2 {EggLayTime:1}
/execute @e[type=Chicken,score_eggLayer=1,score_eggLayer_min=1] ~ ~ ~ /scoreboard players tag @e[type=Item,c=1,r=1] add laidEgg {Item:{id:minecraft:egg}}
/entitydata @e[type=Item,tag=laidEgg] {Item:{id:minecraft:diamond},Tags:[]}

Chickens that will lay an egg in 1 tick get an eggLayer score of 2, which automatically decreased by 1 per tick until it reaches 0 again. 1 tick later, when the egg is actually laid, it is marked with a tag and transformed into a diamond using /entitydata.




Pictures about "How to spawn a chicken that lays diamonds?"

How to spawn a chicken that lays diamonds? - Cooked Meat on White Ceramic Plate
How to spawn a chicken that lays diamonds? - Close-Up Shot of a Black Chicken
How to spawn a chicken that lays diamonds? - Overhead Shot of Fried Chicken on a White Plate



How do you make chickens lay diamonds in Minecraft?

Diamond chickens lay diamonds and lapis lazuli instead of eggs like normal chickens.

Is there a diamond chicken in Minecraft?

Rainbow Hen Rainbow hens are the rarest chicken in Minecraftia. They are also the smallest chicken, only 3/4 of a block wide and 2/4 of a block high. They have large, peacock-like tail feathers that have white rings at the tips and are spread out in a fan-like shape.

What is the rarest chicken in Minecraft?

You cannot give a chicken a diamond. There was an April Fool's event in the Java edition of Minecraft that rarely caused a diamond chicken to spawn instead of a regular chicken. This chicken would lay diamonds and lapis lazuli instead of eggs but would explode if aggroed.



How to make chickens lay diamonds with Command blocks in Minecraft PE




More answers regarding how to spawn a chicken that lays diamonds?

Answer 2

/summon Chicken ~0 ~1 ~0 {Equipment:[{Count:1,id:whatever},{},{},{},{}],DropChances:[2.0F,0.0F,0.0F,0.0F,0.0F]}

The chicken will drop the item listed as whatever whenever it's killed.

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: ROMAN ODINTSOV, Denniz Futalan, Filipe Olivieri, Gabriela Sakita