Rosewood-Development / PlayerParticles

The PlayerParticles plugin made by Esophose
Other
170 stars 48 forks source link

Add disable-crit-particles and crit-only options to Arrow particle style #123

Closed Leomelonseeds closed 2 months ago

Leomelonseeds commented 2 months ago

Vanilla clients render critical particles on arrows that are shot from crossbows or fully charged bows. This can interfere with projectile trails and make them look unclean. I have added 2 options to fix this:

Aside from adding particles in vanilla, critical arrows also do more damage. Because this feature works by setting all arrows setCritical(false), an additional listener for ProjectileHitEvent restores the criticality and thus the damage behavior. These are the only 2 effects of critical arrows as per the Wiki.

Both features have been tested and verified working, and damage behaves as expected to vanilla values.

Esophose commented 2 months ago

The AbstractArrow class wasn't added until the 1.14 API so this will need some version compatibility changes for older versions. A version check with NMSUtil.getVersionNumber to switch between using Arrow and AbstractArrow depending on the server version should work.

Leomelonseeds commented 2 months ago

I added support for pre-1.14 versions. Unfortunately I don't have a test setup for pre-1.14 server, but the feature still works fine on 1.20.

Esophose commented 2 months ago

Thank you!