package net.pietru.omni_power;

import dev.crmodders.flux.api.v5.block.impl.BasicResourceBlock;
import dev.crmodders.flux.api.v5.generators.BlockGenerator;
import dev.crmodders.flux.registry.FluxRegistries;
import dev.crmodders.flux.tags.Identifier;
import finalforeach.cosmicreach.blockevents.BlockEvents;
import net.pietru.omni_power.blockevents.Power;
import dev.crmodders.cosmicquilt.api.entrypoint.ModInitializer;
import org.quiltmc.loader.api.ModContainer;
import org.quiltmc.loader.api.QuiltLoader;

public class OmniPower implements ModInitializer {
	public static final String MOD_ID = "omni_power";
	public static boolean block_entities = false;
	public static final String[] blocks = {
			"cable",
			"lever",
			"door_cube",
			"cable_merger",
			"cable_adapter"
	};
	@Override
	public void onInitialize(ModContainer mod) {
		if (QuiltLoader.isModLoaded("becraft"))
			block_entities=true;
		System.out.println("OmniPower Mod Initialized!");
		BlockEvents.registerBlockEventAction(Power.class);
		for (String block:blocks) {
			//Block.getInstance(MOD_ID+":"+block);
			//BlockBuilderUtils.getBlockFromJson(new Identifier(MOD_ID, block));
			FluxRegistries.BLOCKS.register(
					new Identifier(MOD_ID, block),
					BlockGenerator::createGenerator
			);
		}
	}
}

