<commit_before>package net.blay09.mods.bmc.image.renderable;

import net.blay09.mods.bmc.BetterMinecraftChatConfig;
import net.blay09.mods.bmc.api.image.IChatRenderable;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureUtil;

import java.awt.image.BufferedImage;

public class StaticChatRenderable implements IChatRenderable {

    private static final float MAX_WIDTH = 128;
    private static final float MAX_HEIGHT = 12;
    private static final float MAX_HEIGHT_SMALL = 8;

    private int textureId = -1;

    protected int width;
	protected int height;
	protected float scale = 1f;
	protected BufferedImage loadBuffer;

	protected StaticChatRenderable() {}

	public StaticChatRenderable(BufferedImage image) {
		width = image.getWidth();
		height = image.getHeight();
		calculateScale();
		loadBuffer = image;
	}

	protected void calculateScale() {
		float renderWidth = width;
		float renderHeight = height;<commit_msg>Fix emote scale, MAX_HEIGHT is now 14 to be 28/2 (28 being Twitch's default emote size). (blame zeek if everything looks terrible now)<commit_after>package net.blay09.mods.bmc.image.renderable;

import net.blay09.mods.bmc.BetterMinecraftChatConfig;
import net.blay09.mods.bmc.api.image.IChatRenderable;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureUtil;

import java.awt.image.BufferedImage;

public class StaticChatRenderable implements IChatRenderable {

    private static final float MAX_WIDTH = 128;
    private static final float MAX_HEIGHT = 14;
    private static final float MAX_HEIGHT_SMALL = 8;

    private int textureId = -1;

    protected int width;
	protected int height;
	protected float scale = 1f;
	protected BufferedImage loadBuffer;

	protected StaticChatRenderable() {}

	public StaticChatRenderable(BufferedImage image) {
		width = image.getWidth();
		height = image.getHeight();
		calculateScale();
		loadBuffer = image;
	}

	protected void calculateScale() {
		float renderWidth = width;
		float renderHeight = height;
{'fraction_non_alphanumeric': 0.08167233835683034, 'fraction_numerical': 0.01701507049100632, 'mean_word_length': 4.830028328611898, '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': '3318759', 'n_tokens_mistral': 671, 'n_tokens_neox': 616, 'n_words': 167}