Skip to content

Add per-projectile uncertainty configuration to paper-global.yml#14006

Open
LoliColleen wants to merge 1 commit into
PaperMC:mainfrom
LoliColleen:add-projectile-uncertainty-config
Open

Add per-projectile uncertainty configuration to paper-global.yml#14006
LoliColleen wants to merge 1 commit into
PaperMC:mainfrom
LoliColleen:add-projectile-uncertainty-config

Conversation

@LoliColleen

Copy link
Copy Markdown

Summary

Adds a projectiles.uncertainty section to paper-global.yml that allows server owners to override the uncertainty parameter passed to Projectile#shoot on a per-entity-type basis.

  • Introduces ProjectileUncertainty.resolve(EntityType, float) to look up configured values from GlobalConfiguration
  • Configuration keys are Minecraft entity type ids (e.g. minecraft:arrow, minecraft:snowball)
  • Unconfigured types keep vanilla behavior; setting a value to 0 removes random spread for that projectile type
  • Per-entry default preserves the vanilla uncertainty for that call site

Configuration is applied at the call sites where uncertainty is originally passed (bow/crossbow shootProjectile, throwable items, mob ranged attacks, dispensers, and Bukkit API launch paths), not inside Projectile#shoot or the shared spawn helpers.

Configuration example

projectiles:
  uncertainty:
    minecraft:arrow: 0
    minecraft:snowball: 0
    minecraft:trident: default

@LoliColleen LoliColleen requested a review from a team as a code owner June 29, 2026 10:51
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

1 participant