How can I create a crossbow?

Started by SkidadleSkadoodle on

Topic category: Help with modding (Java Edition)

Last seen on 16:23, 12. Aug 2021
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I create a crossbow?

I'm trying to make a mod with flintlock guns and etc. and i wanted to know how to make a crossbow just like in vanilla Minecraft, because the ranged item acts like a bow that you need to hold your right mouse button to shoot.

I also wanted to know how to make bullet/projectile drop, the ranged item doesn't simulate that. How would I go about these things?

 

Last seen on 16:48, 15. Apr 2023
Joined Jul 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For the crossbow I can't…
Sat, 03/14/2020 - 13:14

For the crossbow I can't help you but for the projectiles drop in your ranged item procedure you do, for example, when bullet hits a block spawn a Gem at X Y Z.

Last seen on 20:11, 4. Dec 2022
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm having a similar problem…
Thu, 06/30/2022 - 21:14

I'm having a similar problem. What I'm going to try is a tick event when the item is in the inventory. Then it detects how long the right-click button is held, and then replaces the item with a loaded version. Then for an "When Ranged Item Used", I'll return it back to the unloaded gun.