// Path: src/main/java/com/cazsius/solcarrot/SOLCarrot.java
// @Mod(SOLCarrot.MOD_ID)
// @Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
// public final class SOLCarrot {
// 	public static final String MOD_ID = "solcarrot";
// 	
// 	public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
// 	
// 	private static final String PROTOCOL_VERSION = "1.0";
// 	public static SimpleChannel channel = NetworkRegistry.ChannelBuilder
// 		.named(resourceLocation("main"))
// 		.clientAcceptedVersions(PROTOCOL_VERSION::equals)
// 		.serverAcceptedVersions(PROTOCOL_VERSION::equals)
// 		.networkProtocolVersion(() -> PROTOCOL_VERSION)
// 		.simpleChannel();
// 	
// 	public static ResourceLocation resourceLocation(String path) {
// 		return new ResourceLocation(MOD_ID, path);
// 	}
// 	
// 	// TODO: not sure if this is even implemented anymore
// 	@SubscribeEvent
// 	public static void onFingerprintViolation(FMLFingerprintViolationEvent event) {
// 		// This complains if jar not signed, even if certificateFingerprint is blank
// 		LOGGER.warn("Invalid Fingerprint!");
// 	}
// 	
// 	@SubscribeEvent
// 	public static void setUp(FMLCommonSetupEvent event) {
// 		channel.messageBuilder(FoodListMessage.class, 0)
// 			.encoder(FoodListMessage::write)
// 			.decoder(FoodListMessage::new)
// 			.consumer(FoodListMessage::handle)
// 			.add();
// 	}
// 	
// 	public SOLCarrot() {
// 		SOLCarrotConfig.setUp();
// 	}
// }


import com.cazsius.solcarrot.SOLCarrot;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.registries.IForgeRegistryEntry;
package com.cazsius.solcarrot.lib;


public final class Localization {
	public static String keyString(String domain, IForgeRegistryEntry entry, String path) {
		final ResourceLocation location = entry.getRegistryName();
		assert location != null;
		return keyString(domain, location.getPath() + "." + path);
	}
	
	/** e.g. keyString("tooltip", "eaten_status.not_eaten_1") -> "tooltip.solcarrot.eatenStatus.not_eaten_1") */
	public static String keyString(String domain, String path) {
// Path: src/main/java/com/cazsius/solcarrot/SOLCarrot.java
// @Mod(SOLCarrot.MOD_ID)
// @Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
// public final class SOLCarrot {
// 	public static final String MOD_ID = "solcarrot";
// 	
// 	public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
// 	
// 	private static final String PROTOCOL_VERSION = "1.0";
// 	public static SimpleChannel channel = NetworkRegistry.ChannelBuilder
// 		.named(resourceLocation("main"))
// 		.clientAcceptedVersions(PROTOCOL_VERSION::equals)
// 		.serverAcceptedVersions(PROTOCOL_VERSION::equals)
// 		.networkProtocolVersion(() -> PROTOCOL_VERSION)
// 		.simpleChannel();
// 	
// 	public static ResourceLocation resourceLocation(String path) {
// 		return new ResourceLocation(MOD_ID, path);
// 	}
// 	
// 	// TODO: not sure if this is even implemented anymore
// 	@SubscribeEvent
// 	public static void onFingerprintViolation(FMLFingerprintViolationEvent event) {
// 		// This complains if jar not signed, even if certificateFingerprint is blank
// 		LOGGER.warn("Invalid Fingerprint!");
// 	}
// 	
// 	@SubscribeEvent
// 	public static void setUp(FMLCommonSetupEvent event) {
// 		channel.messageBuilder(FoodListMessage.class, 0)
// 			.encoder(FoodListMessage::write)
// 			.decoder(FoodListMessage::new)
// 			.consumer(FoodListMessage::handle)
// 			.add();
// 	}
// 	
// 	public SOLCarrot() {
// 		SOLCarrotConfig.setUp();
// 	}
// }


// Path: src/main/java/com/cazsius/solcarrot/lib/Localization.java
import com.cazsius.solcarrot.SOLCarrot;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.registries.IForgeRegistryEntry;

package com.cazsius.solcarrot.lib;


public final class Localization {
	public static String keyString(String domain, IForgeRegistryEntry entry, String path) {
		final ResourceLocation location = entry.getRegistryName();
		assert location != null;
		return keyString(domain, location.getPath() + "." + path);
	}
	
	/** e.g. keyString("tooltip", "eaten_status.not_eaten_1") -> "tooltip.solcarrot.eatenStatus.not_eaten_1") */
	public static String keyString(String domain, String path) {
		return domain + "." + SOLCarrot.MOD_ID + "." + path;