package net.mcreator.azertymod.procedures;

import net.minecraft.world.World;

import net.mcreator.azertymod.AzertymodVariables;
import net.mcreator.azertymod.AzertymodElements;

@AzertymodElements.ModElement.Tag
public class AzertySolarPannelUpdateTickProcedure extends AzertymodElements.ModElement {
	public AzertySolarPannelUpdateTickProcedure(AzertymodElements instance) {
		super(instance, 36);
	}

	public static void executeProcedure(java.util.HashMap<String, Object> dependencies) {
		if (dependencies.get("world") == null) {
			System.err.println("Failed to load dependency world for procedure AzertySolarPannelUpdateTick!");
			return;
		}
		World world = (World) dependencies.get("world");
		if ((world.isDaytime())) {
			if (((AzertymodVariables.MapVariables.get(world).Energy) < (AzertymodVariables.MapVariables.get(world).Max_energy))) {
				AzertymodVariables.MapVariables.get(world).Energy = (double) ((AzertymodVariables.MapVariables.get(world).Energy) + 1);
				AzertymodVariables.MapVariables.get(world).syncData(world);
			}
		}
	}
}
