NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

Add hook for projectile weapon to define default ammo

Open TelepathicGrunt opened this issue 9 months ago • 1 comments

The issue is that a Creative Mode player without valid ammo for a modded projectile weapon will be given vanilla Arrow in LivingGetProjectileEvent. To get around this, a getDefaultCreativeAmmo method was added to ProjectileWeaponItem that should be overridden by modded items to specify what ammo the weapon should fallback to for creative mode without valid inventory ammo.

Name of the method and its params is open for discussion. Was sure on name and what params to give it.

Closes: https://github.com/neoforged/NeoForge/issues/489

TelepathicGrunt avatar May 17 '24 11:05 TelepathicGrunt