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)

Active 2 years ago
Joined Apr 2023
Points:
276

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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?

Active 1 year ago
Joined Jul 2020
Points:
703

User statistics:

  • Modifications: 0
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 27
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

Active 2 years ago
Joined Apr 2023
Points:
276

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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?

Active 9 hours ago
Joined Oct 2021
Points:
665

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 77
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