WeaponMechanics | Guns in Minecraft

WeaponMechanics | Guns in Minecraft 4.0.5

  • Adds the DropItem mechanic
  • Fixes delayBeforePlay or repeatInterval causing errors
  • Fixes changing spread bounds not working since 4.0.0 recode.
  • Hotfix consumables not working in 4.0.0 recode
    • Consumables are now a bit smarter... They can work with durability, and handle shooting a bit smarter behind the scenes
    • The WeaponShootEvent may now fire with a null projectile
  • Let WeaponReloadEvent be cancellable
    • The event is cancelled if the gun is already full, or if the reload duration is set to 0
  • Fix misc issues with Reload cancellation. Weapon reloading is now automatically cancelled more often when dequipping weapons.
  • Fix vector providers causing serialization errors
  • Performance improvements in the ShootLocationChooser
  • Fix WeaponMechanicsCosmetics block damage ignoring WorldGuard flags
  • Fix EntityType parsing not supporting tags
  • Fix BlockType parsing not supporting tags
  • Fix the new WeaponRecoilEvent causing errors in console when used with WeaponMechanicsPlus
  • Dropped support for anything below 1.21.4
  • Added 1.21.4 support
  • New Recoil system
    • This works off of "forces" instead of static increments
    • The experience is much smoother, and prevents infinite climb
    • Mimics how AAA FPS handle recoil
  • New Durability system
    • Works off of the durability item component now
    • Shows durability bar
    • Automatically removes durability from the weapon after shooting
  • Dropped support for ProtocolLib... Use PacketEvents instead.



Here is an example of that new Recoil system:
YAML:
    Recoil:
      Mean_X: 0.3            # Slight horizontal pull
      Mean_Y: 1.6            # Stronger vertical recoil
      Variance_X: 0.3        # Some randomness left/right
      Variance_Y: 0.3        # Some randomness up/down
      Speed: 3.0             # Fairly snappy kick
      Damping: 0.1           # Prevents infinite climb
      Damping_Recovery: 0.15 # Steady recover toward center
      Smoothing: 0.4         # Smooth out big jolts
      Max_Accumulation: 15.0 # Caps max climb