How could I make a block drop a custom drop if broken with a specific tool?

Started by meelz_on_wheelz on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How could I make a block drop a custom drop if broken with a specific tool?

I'm attempting to make a "hammer" tool where if you break a stone or cobblestone block with it it drops rock pieces. How do I make this happen with the procedures?

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hammer Condition: when block…
Mon, 03/02/2020 - 12:23

Hammer Condition: when block is broken with tool

(If you don't want the original block to drop itself:)

     Procedure: Destroy block without drop

                          Spawn gem at x y z rock_pebble

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Code: If ( [Get Item In Main…
Mon, 03/23/2020 - 15:15

Code:

If ( [Get Item In Main Hand] == ["Obsidian Pickaxe"] ) Then (

     [Spawn Gem At [X] [Y] [Z] ["Obsidian Nugget"] ]

)

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh sry, I didn't read the…
Fri, 03/27/2020 - 14:06

Oh sry, I didn't read the full comment - New Code:

If ( [Get Block At [X] [Y] [Z] ] == ["Obsidian"] ) Then (

     [Spawn Gem At [X] [Y] [Z] ["Obsidian Chunk"] ]

)