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 xd, final LivingEntity akz) {
        return !akz.getBrain().isActive(Activity.REST) && akz.isSleeping();
    }
    
    @Override
    protected void start(final ServerLevel xd, final LivingEntity akz, final long long3) {
        akz.stopSleeping();
    }
}
