Different Projectiles Shoot for Left and Right Clicks

Started by ThePaintMethod on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Different Projectiles Shoot for Left and Right Clicks

Hi! I'm just getting started with this, so I don't know much yet. I am trying to make a mod that brings some elements from my favorite game, Epic Mickey, to minecraft. To anyone familiar with the game, I am trying to make the brush that will shoot one custom projectile (Paint) when the player right clicks, which is simple. But I also want the brush to be able to shoot a different custom projectile (Thinner) when the player left clicks. I have been able to get both projectiles to shot by using the "When entity swings item" trigger, but that also makes the Paint projectile fire as well. How can I make it so that only Paint fires when the player right clicks and only Thinner is fired when the player left clicks? Any help would be greatly appreciated! Thank you so much in advance! :)

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do you want that in general…
Sun, 04/07/2024 - 18:47

Do you want that in general this will always happen, or do you want this to happen only with a certain item in hand?

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know if without any…
Sun, 04/07/2024 - 19:17

I don't know if without any item is possible for clicks. I will do more research on it. But until then, if needed, maybe you could try using keybinds. You could create a keybind for maybe 'f' to shoot paint and 'x' to shoot thinner.

Underneath "Item Extension"

options display

Note: I have a few different options because I have Geckolib, but that's not important in this case

Name the keybind name (doesn't have to be related to what the trigger key actually is)

 

dropdown of keys and trigger options

Then you can add a procedure to either trigger, depending on what you want and connect this code. Customize the options to your needs. NOTE: if you find that the projectile is not working, then try replacing the y with (y + 1); & replace Spearentity (from my mod) with whatever projectile you are shooting

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay great!!! Thank you so…
Mon, 04/08/2024 - 12:29

Okay great!!! Thank you so much!!!