Newer
Older
void-pack-super-server / work / decompile-ee3ecae0 / net / minecraft / server / PathfinderGoalRestrictSun.java
Simon Lindgren on 26 Mar 2020 624 bytes first commit
package net.minecraft.server;

public class PathfinderGoalRestrictSun extends PathfinderGoal {

    private final EntityCreature a;

    public PathfinderGoalRestrictSun(EntityCreature entitycreature) {
        this.a = entitycreature;
    }

    @Override
    public boolean a() {
        return this.a.world.isDay() && this.a.getEquipment(EnumItemSlot.HEAD).isEmpty() && this.a.getNavigation() instanceof Navigation;
    }

    @Override
    public void c() {
        ((Navigation) this.a.getNavigation()).c(true);
    }

    @Override
    public void d() {
        ((Navigation) this.a.getNavigation()).c(false);
    }
}