How to tell if player breaks block / kills entity?

Started by SourOrange on

Topic category: User side tutorials

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to tell if player breaks block / kills entity?

I am making a mod and need to add a drop to a block and want to make it so when a player breaks it it has a 1/150 chance to drop the item. how can i tell if the player breaks the block? or kills an entity?

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe do it in rare item or…
Tue, 08/20/2019 - 00:40

maybe do it in rare item or if killed then give a chance then if yes palce item at entity

 

Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But how could i do that with…
Tue, 08/20/2019 - 14:40

But how could i do that with mobs already in the game like creepers and skeletons?

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just do this:   tigger on…
Thu, 03/04/2021 - 20:25

just do this:

 

tigger on hit with weapon:

if not is event/target entity alive

do: (whater you wanna do)