mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Adjusts night vision effect times to accommodate for lag to reduce flashing skies.
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user