package fr.koka99cab.ibelievechickenfly.chickenboat;

import net.minecraft.world.entity.animal.chicken.Chicken;
import net.minecraft.world.entity.vehicle.boat.AbstractBoat;

public final class ChickenBoatUtil {
	private ChickenBoatUtil() {
	}

	public static boolean hasChickenPassenger(AbstractBoat boat) {
		return boat != null
			&& !boat.isRemoved()
			&& boat.hasPassenger(passenger -> passenger instanceof Chicken && passenger.isAlive());
	}
}
