package net.minecraft.world.entity.ai.behavior;

import net.minecraft.world.entity.schedule.Activity;
import net.minecraft.server.level.ServerLevel;
import java.util.Map;
import com.google.common.collect.ImmutableMap;
import net.minecraft.world.entity.LivingEntity;

public class WakeUp extends Behavior<LivingEntity> {
    public WakeUp() {
        super(ImmutableMap.of());
    }
    
    @Override
    protected boolean checkExtraStartConditions(final ServerLevel zd, final LivingEntity aoy) {
        return !aoy.getBrain().isActive(Activity.REST) && aoy.isSleeping();
    }
    
    @Override
    protected void start(final ServerLevel zd, final LivingEntity aoy, final long long3) {
        aoy.stopSleeping();
    }
}
