Adjusts night vision effect times to accommodate for lag to reduce flashing skies.
This commit is contained in:
codycoolwaffle authored and Vasco Lavos committed 2018-08-27 12:11:42 +01:00
1 parent 53841ec4d2
commit 484465a418
1 file changed
+2 -2
@@ -102,8 +102,8 @@ public class ItemBloodPendant extends ItemBauble implements IBrewContainer, IBre
if(ManaItemHandler.requestManaExact(stack, eplayer, (int) Math.ceil(cost), false)) {
PotionEffect currentEffect = player.getActivePotionEffect(effect.getPotion());
boolean nightVision = effect.getPotion() == MobEffects.NIGHT_VISION;
if(currentEffect == null || currentEffect.getDuration() < (nightVision ? 205 : 10)) {
PotionEffect applyEffect = new PotionEffect(effect.getPotion(), nightVision ? 285 : 80, effect.getAmplifier(), true, true);
if(currentEffect == null || currentEffect.getDuration() < (nightVision ? 305 : 3)) {
PotionEffect applyEffect = new PotionEffect(effect.getPotion(), nightVision ? 385 : 80, effect.getAmplifier(), true, true);
player.addPotionEffect(applyEffect);
}