package studio.halbear.hem.procedures;

import studio.halbear.hem.HemModVariables;
import studio.halbear.hem.HemMod;

import net.minecraft.entity.Entity;

import java.util.Map;

public class TestPlaneRightClickedOnEntityProcedure {

	public static void executeProcedure(Map<String, Object> dependencies) {
		if (dependencies.get("sourceentity") == null) {
			if (!dependencies.containsKey("sourceentity"))
				HemMod.LOGGER.warn("Failed to load dependency sourceentity for procedure TestPlaneRightClickedOnEntity!");
			return;
		}
		Entity sourceentity = (Entity) dependencies.get("sourceentity");
		{
			boolean _setval = (true);
			sourceentity.getCapability(HemModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {
				capability.PilotingVehicle = _setval;
				capability.syncPlayerVariables(sourceentity);
			});
		}
	}
}
