Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple issues with Night Vision Upgrade in Pneumatic Helmet #1347

Open
Vaelzan opened this issue Sep 7, 2024 · 4 comments
Open

Multiple issues with Night Vision Upgrade in Pneumatic Helmet #1347

Vaelzan opened this issue Sep 7, 2024 · 4 comments
Labels
Bug Fixed in Dev Issue will be closed after next release

Comments

@Vaelzan
Copy link

Vaelzan commented Sep 7, 2024

Describe the bug

When the Night Vision Upgrade is installed into a helmet but turned off, this also prevents other sources of the Night Vision effect from working, such as drinking a Night Vision Potion.

Additionally, when the upgrade is turned on it only refreshes when the timer hits zero, causing the screen to pulse / flicker with darkness for about 5-10 seconds before each refresh due to the way the night vision effect wears off. This could probably be fixed by refreshing the buff with 10 seconds to go (or maybe even 15 to account for potential TPS issues on servers?) instead of right at 0.

Expected behavior

Night Vision from other sources should work while the upgrade is disabled - disabling it should really act the same as if the module wasn't installed at all.

Permanent Night Vision effects shouldn't allow the timer of the effect to drop below 10 seconds due to vanilla fading behaviour.

Which Minecraft version are you using?

1.20.1

Which version of PneumaticCraft: Repressurized are you using?

6.0.17

@Vaelzan Vaelzan added the Bug label Sep 7, 2024
@desht
Copy link
Member

desht commented Sep 9, 2024

This could probably be fixed by refreshing the buff with 10 seconds to go (or maybe even 15 to account for potential TPS issues on servers?) instead of right at 0.

That's already the case. The buff is refreshed at 11 seconds to go, and I never see the flickering that you report.

if (enabled && hasPressure && (nvInstance == null || nvInstance.getDuration() <= 220)) {
                player.addEffect(new MobEffectInstance(MobEffects.NIGHT_VISION, 500, 0, false, false));

I have a fix for the other issue though (not playing nice with other source of night vision).

@Vaelzan
Copy link
Author

Vaelzan commented Sep 9, 2024

I suspect that may have been as a result of low server TPS. I think it was averaging around 10 TPS at the time. I'm not sure why it wouldn't still have refreshed before zero though even with the delay there + significant latency, as it certainly wasn't over eleven seconds of delays. SonoranViking also experienced the same thing.

Edit: Tested it again at 20 TPS and it's fine. I guess my only suggestion then would be that it'd work better on struggling servers if leaving more buffer time - potentially a one minute buff refreshed at the 20 second mark?

@desht
Copy link
Member

desht commented Sep 9, 2024

I guess I could increase the buffer time, yeah.

@desht desht added the Fixed in Dev Issue will be closed after next release label Oct 2, 2024
@desht
Copy link
Member

desht commented Oct 20, 2024

Fixed in 8.2.0 for 1.21.1

1.20.1 release coming soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fixed in Dev Issue will be closed after next release
Projects
None yet
Development

No branches or pull requests

2 participants