Fix light calculation to use actual visible level. Should now work on (#1295)
surface at night as well as underground. Tweak duration to reduce flicker.
This commit is contained in:
parent
383be360ff
commit
778838e2b0
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ public class LivingArmourUpgradeNightSight extends LivingArmourUpgrade {
|
|||
|
||||
@Override
|
||||
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
|
||||
if (world.getLight(player.getPosition()) <= 9) {
|
||||
if (world.getLight(player.getPosition(), false) <= 9) {
|
||||
isActive = true;
|
||||
if (player.isPotionActive(MobEffects.NIGHT_VISION)) {
|
||||
int dur = player.getActivePotionEffect(MobEffects.NIGHT_VISION).getDuration();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue