open gui with right click, whit item, and shoot projectile, with left click, with the same item

Started by EnderX on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
open gui with right click, whit item, and shoot projectile, with left click, with the same item
Sat, 04/05/2025 - 19:51 (edited)

I want to create a wizard mod.

i want to open a gui with right click, with a specifick modded item, and shoot a projectile, with left click, with the same modded item.

in the gui the player can choose a projectile with buttons. and with left click the item shoot that specific projectile.

can i do it?

if i can, how?

sorry, my english is not good.

Edited by EnderX on Sat, 04/05/2025 - 19:51
Joined Feb 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think it is possible with…
Thu, 04/10/2025 - 23:32

I think it is possible with a global trigger, but you need to make three procedures, because there is a "player right clicks with item" but for the left click there is "player left click on block" and "left click on air", so you need to cover both and add a IF DO that checks if the player has the item in their main hand. 

Alternatively, you could set up the GUI to open with a Key binding.