How do I make a custom right click tool action?

Started by ArtemHOTA on

Topic category: Help with modding (Java Edition)

Last seen on 17:30, 24. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a custom right click tool action?

I want to make that when you right click with a special custom tool/item (for example a pickaxe) on a Budding Amethyst, it transforms into a normal amethyst block and drops a random amount of Amethyst Crystals (1-8). please help me, this is my first time of doing something in mcreator and.. yeah

Last seen on 20:38, 24. Jun 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
do a when item is used…
Wed, 06/12/2024 - 20:41

do a when item is used trigger on the pickaxe or create a procedure that checks if that item used on the block is your pickaxe

Then after one of these are done, check if the block is a budding amethyst, and if it is, get coordinates of the block the replace the block. Example:

if item is Pickaxe AND block is budding amethyst

Then get coordinates of block and replace block at coordinates with amethyst block

Last seen on 17:30, 24. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! It worked! I also…
Fri, 06/14/2024 - 16:08

Thanks! It worked! I also figured out how to make it drop 1 amethyst, but how do i make it drop multiple? And also I added a custom item which drops from budding amethyst, and I want it to drop with some chance, is there a way to make it?

Last seen on 20:38, 24. Jun 2024
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think you can use a loot…
Sun, 06/16/2024 - 19:32

I think you can use a loot table to drop a random amount, but that would cause it to do it every single block, not just the one the pickaxe creates. My only problem is connecting a loot table to the block, but this should help. This is probably better.

https://mcreator.net/forum/64252/how-make-block-drop-items-loot-table

Or you can do a when block is broken procedure so that if the block is broken and is a amythest bud, place random amount of _ items, But might have more trouble creating. Example:

if: amythest block broken

do: repeat drop _ item (get random number between 0-8) times

-PixelKid