Help with making Gun with Multiple Ammo Types

Started by Thagrahn on

Topic category: Help with modding (Java Edition)

Last seen on 09:41, 16. Jun 2023
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with making Gun with Multiple Ammo Types

I am using MCreator 2022.3, and trying to make a gun with multiple types of ammo, however this means that the actual projectile get set as part of the procedure called when used as a ranged weapon.

However, there doesn't seem to be an up to date tutorial for doing such things with ranged weapons. Though, I may just be overlooking it in the lost of older tutorials.

Since most of my modding is focused around rustic designs, an early revolver was going to be the design focus at first, but I figured that the off-hand slot as the ammo source made since for having multiple ammo types.

The different ammo types would also result in variations on number of projectiles fired at a time, damage per projectile, knockback, and the speed of the projectiles. A potato would have a lower speed through the air, but decent knockback. A carrot would have a better speed than a potato, but still slow, and have less knockback and damage. An iron pellet would have the highest damage and speed since gunpowder would be involved with the crafting of such bullets. Copper pellets would have a scatter effect with many low damaging projectiles with decent speed.

Problem is, how to set up the projectiles so they can be called via the procedure?