package studio.halbear.hem.procedures;

import studio.halbear.hem.entity.HotAirBalloonEntity;
import studio.halbear.hem.HemMod;

import net.minecraft.entity.Entity;

import java.util.Map;

public class HotAirBalloonUIDisplayOverlayIngameProcedure {

	public static boolean executeProcedure(Map<String, Object> dependencies) {
		if (dependencies.get("entity") == null) {
			if (!dependencies.containsKey("entity"))
				HemMod.LOGGER.warn("Failed to load dependency entity for procedure HotAirBalloonUIDisplayOverlayIngame!");
			return false;
		}
		Entity entity = (Entity) dependencies.get("entity");
		if (entity.isPassenger() && (entity.getRidingEntity()) instanceof HotAirBalloonEntity.CustomEntity) {
			return true;
		}
		return false;
	}
}
