How to make mobs drop items randomly

Started by Clint42 on

Topic category: Help with modding (Java Edition)

Last seen on 09:41, 29. Aug 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make mobs drop items randomly

How can I make a mob drop items randomly - similarly to the armadillo dropping scutes - in a non-laggy way?

Last seen on 13:04, 5. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
when entity dies: if random…
Tue, 08/13/2024 - 13:47

when entity dies: 
if random integer between 1 and 10 == 1:
spawn dropped item at x y z of target entity

Last seen on 09:41, 29. Aug 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't want it to drop it…
Tue, 08/13/2024 - 15:01

I don't want it to drop it when it dies, but I want it to drop it when it is idle. Kind of like when a chicken dropping an egg.

Last seen on 13:04, 5. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe use random on entity…
Wed, 08/14/2024 - 10:45

maybe use random on entity update tick?