Global trigger "player right clicks with item" should provide an "itemstack" dependecy

Started by MargoxaTheGamer on Thu, 05/13/2021 - 18:51

Topic category: Feature requests and ideas for MCreator

Last seen on 08:41, 9. Jun 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Global trigger "player right clicks with item" should provide an "itemstack" dependecy
Thu, 05/13/2021 - 19:28 (edited)

Reason to add this:

In most of the cases when someone uses this global trigger, they need it to add a new event to vanilla existing item, when used by right clicking and not by left clicking.

In my case, I added a new enchantment, and I wanted to add a new procedure, that checks if the player shoot with a bow with a new enchantment and spawn ice, where arrow landed. The problem is that "Player uses item", "Player finishes using item", "Player stops using item" are triggered, when player hits with item too. It would be weird if a bow with freezing enchantment would spread ice when hitting mobs(that also means that player can spread ice and don't consume durability of the bow), it's also weird for other mechanics with the new enchantment. So I need to make sure, that when player SHOOTS with the bow - it spreads ice and not when player HITS with it. So I choosed 'Player right clicks with item" to make another procedure, that makes variable true if player right clicked with a bow, and then depending on this variable game check if player finishes using item and spreads ice. But "Player right clicks with item" doesn't provide an itemstack dependecy for some reason, however the trigger contains item, so I think it should be possible to add this.

In short, I think my case isn't the only one, where the user would want to use this global trigger to do some action to the item, I think this global trigger is almost useless for now, when it doesn't serve the purpose most would use it for.

 

EDIT: Oh sorry, I just realised, that I wrote, that I used "Player finished using item" for a bow, however I used "Entity attacked" and yes, actually it spreads ice only when entity is hurt by a bow, but the feature still would be neat.

Edited by MargoxaTheGamer on Thu, 05/13/2021 - 19:28