How do I get a mob (a cow) to drop items from time to time?

Started by cubeultm on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I get a mob (a cow) to drop items from time to time?

Alright, so I want to try to get a cow to drop my custom item, Cow Dung (don't ask why), at certain intervals, like the chicken does with the eggs.

How would I be able to do it using Procedures?

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure whenever a…
Wed, 04/19/2023 - 11:14

Make a procedure whenever a player joins the world and then make it do the command  execute as @e[type=minecraft:cow] run summon minecraft:item ~ ~ ~ {item:{id:”(the item you want to summon)”}}  and then add a wait block for however long you want the time in between the drops to be and then the run procedure block for the same procedure

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I do that in the…
Thu, 04/20/2023 - 10:51

How would I do that in the procedures item? Could you send some screenshots?

Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can also make a…
Thu, 04/20/2023 - 12:38

You can also make a procedure for 'On loaded entity tick update' and make this:

 

If Event/Target Entity is (sub)type cow
If Random integer between 1 and (Average amount of ticks you want it to take) = 1
Spawn Item/Gem () at x y z