<commit_before>package net.blay09.mods.eiramoticons.addon.pack;

import net.blay09.mods.eiramoticons.api.EiraMoticonsAPI;
import net.blay09.mods.eiramoticons.api.IEmoticon;
import net.blay09.mods.eiramoticons.api.IEmoticonLoader;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.resources.IResource;
import net.minecraft.util.ResourceLocation;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

public class IncludedPack implements IEmoticonLoader {

	private String group;
	private String[] emotes;

	public IncludedPack(String group, String[] emotes) {
		this.group = group;
		this.emotes = emotes;

		for(String emote : emotes) {
			IEmoticon emoticon = EiraMoticonsAPI.registerEmoticon(emote, this);
			emoticon.setTooltip(I18n.format("eiramoticons:group." + group));
			emoticon.setLoadData(new ResourceLocation("eiramoticons", "/packs/" + group + "/" + emote + ".png"));
		}
	}

	@Override
	public void loadEmoticonImage(IEmoticon emoticon) {
		try {
			IResource resource = Minecraft.getMinecraft().getResourceManager().getResource((ResourceLocation) emoticon.getLoadData());
			if(resource != null) {
				BufferedImage image = ImageIO.read(resource.getInputStream());
				if(image != null) {
					emoticon.setImage(image);
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}<commit_msg>Fix resource location for built versions.<commit_after>package net.blay09.mods.eiramoticons.addon.pack;

import net.blay09.mods.eiramoticons.api.EiraMoticonsAPI;
import net.blay09.mods.eiramoticons.api.IEmoticon;
import net.blay09.mods.eiramoticons.api.IEmoticonLoader;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.resources.IResource;
import net.minecraft.util.ResourceLocation;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

public class IncludedPack implements IEmoticonLoader {

	private String group;
	private String[] emotes;

	public IncludedPack(String group, String[] emotes) {
		this.group = group;
		this.emotes = emotes;

		for(String emote : emotes) {
			IEmoticon emoticon = EiraMoticonsAPI.registerEmoticon(emote, this);
			emoticon.setTooltip(I18n.format("eiramoticons:group." + group));
			emoticon.setLoadData(new ResourceLocation("eiramoticons", "packs/" + group + "/" + emote + ".png"));
		}
	}

	@Override
	public void loadEmoticonImage(IEmoticon emoticon) {
		try {
			IResource resource = Minecraft.getMinecraft().getResourceManager().getResource((ResourceLocation) emoticon.getLoadData());
			if(resource != null) {
				BufferedImage image = ImageIO.read(resource.getInputStream());
				if(image != null) {
					emoticon.setImage(image);
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
{'fraction_non_alphanumeric': 0.12190874259839778, 'fraction_numerical': 0.008359456635318705, 'mean_word_length': 5.059071729957806, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1794382', 'n_tokens_mistral': 1066, 'n_tokens_neox': 978, 'n_words': 163}