Topic category: Help with Minecraft modding (Java Edition)
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! :)
Do you want that in general this will always happen, or do you want this to happen only with a certain item in hand?
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"
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)
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
Okay great!!! Thank you so much!!!