Left clicking a block makes it drop an item

Started by Trionsarte on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Nov 2023
Points:
95

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
Left clicking a block makes it drop an item

Hello!
I'm currently working on a mod, and for one of its main components I need a certain block to drop an item when left clicked. Can anybody please explain how to do this?
I know it has something to do with procedures, I just can't figure out what do I need the procedure to do.

Active 10 months ago
Joined Jun 2023
Points:
250

User statistics:

  • Modifications: 0
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 103
When player left click on…
Sat, 11/11/2023 - 09:28

When player left click on block :

      If   is get block at x y z   the same block as  "your block"

      do :  spawn "your item"  at x y z 

Active 11 months ago
Joined Apr 2024
Points:
55

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
ofter 2 items are dropped…
Fri, 04/05/2024 - 19:09

ofter 2 items are dropped due to the click lasting more than 1 click