// Path: src/main/java/net/spellcraftgaming/rpghud/gui/hud/HudHotbarWidget.java
// @Environment(EnvType.CLIENT)
// public class HudHotbarWidget extends HudDefault {
// 
// 	public HudHotbarWidget(MinecraftClient mc, String hudKey, String hudName) {
// 		super(mc, hudKey, hudName);
// 		this.chatOffset = -22;
// 	}
// 
// 	@Override
// 	public HudElement setElementArmor() {
// 		return new HudElementArmorHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementFood() {
// 		return new HudElementFoodHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementHealth() {
// 		return new HudElementHealthHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementHealthMount() {
// 		return new HudElementHealthMountHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementLevel() {
// 		return new HudElementLevelHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementWidget() {
// 		return new HudElementWidgetHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementHotbar() {
// 		return new HudElementHotbarHotbar();
// 	}
// }
// 
// Path: src/main/java/net/spellcraftgaming/rpghud/main/ModRPGHud.java
// @Environment(EnvType.CLIENT)
// 
// public class ModRPGHud implements ClientModInitializer{
//     public final String MODID = "rpg-hud";
// 
// 	public static ModRPGHud instance;
//     
// 	public static boolean[] renderDetailsAgain = { false, false, false };
// 
// 	public static int screenOffset = 0;
// 	
// 	public Settings settings;
// 
// 	/** Map of all registered HUDs */
// 	public Map<String, Hud> huds = new LinkedHashMap<String, Hud>();
// 	
//     public void onInitializeClient()
//     {
//         instance = this;
// 		this.settings = new Settings();
// 		this.registerHud(new HudVanilla(MinecraftClient.getInstance(), "vanilla", "Vanilla"));
// 		this.registerHud(new HudSimple(MinecraftClient.getInstance(), "simple", "Simplified"));
// 		this.registerHud(new HudDefault(MinecraftClient.getInstance(), "default", "Default"));
// 		this.registerHud(new HudExtendedWidget(MinecraftClient.getInstance(), "extended", "Extended Widget"));
// 		this.registerHud(new HudFullTexture(MinecraftClient.getInstance(), "texture", "Full Texture"));
// 		//this.registerHud(new HudHotbarWidget(MinecraftClient.getInstance(), "hotbar", "Hotbar Widget"));
// 		this.registerHud(new HudModern(MinecraftClient.getInstance(), "modern", "Modern Style"));
// 
// 		if (!isHudKeyValid(this.settings.getStringValue(Settings.hud_type))) {
// 			this.settings.setSetting(Settings.hud_type, "vanilla");
// 		}
//         new RenderOverlay();
//         if (isClass("io.github.prospector.modmenu.ModMenu")) screenOffset = 12;
//     }
//     
// 	/**
// 	 * Register a new HUD
// 	 * 
// 	 * @param hud
// 	 *            the hud to be registered
// 	 */
// 	public void registerHud(Hud hud) {
// 		this.huds.put(hud.getHudKey(), hud);
// 	}
// 
// 	/** Returns the active HUD */
// 	public Hud getActiveHud() {
// 		return this.huds.get(this.settings.getStringValue(Settings.hud_type));
// 	}
// 
// 	/** Returns the vanilla HUD */
// 	public Hud getVanillaHud() {
// 		return this.huds.get("vanilla");
// 	}
// 
// 	public boolean isVanillaHud() {
// 	    return this.settings.getStringValue(Settings.hud_type) == "vanilla";
// 	}
// 	
// 	/** Checks if a Hud with the specified key is registered */
// 	public boolean isHudKeyValid(String key) {
// 		return this.huds.containsKey(key);
// 	}
// 	
// 	public static boolean isClass(String className) {
// 	    try  {
// 	        Class.forName(className);
// 	        return true;
// 	    }  catch (ClassNotFoundException e) {
// 	        return false;
// 	    }
// 	}
// }


import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.hud.ChatHud;
import net.minecraft.client.util.math.MatrixStack;
import net.spellcraftgaming.rpghud.gui.hud.HudHotbarWidget;
import net.spellcraftgaming.rpghud.main.ModRPGHud;

package net.spellcraftgaming.rpghud.mixin;




@Mixin(ChatHud.class)
public class ChatMixin {

    @Inject(at = @At("HEAD"), method = "render")
    private void renderChat(CallbackInfo into) {

// Path: src/main/java/net/spellcraftgaming/rpghud/gui/hud/HudHotbarWidget.java
// @Environment(EnvType.CLIENT)
// public class HudHotbarWidget extends HudDefault {
// 
// 	public HudHotbarWidget(MinecraftClient mc, String hudKey, String hudName) {
// 		super(mc, hudKey, hudName);
// 		this.chatOffset = -22;
// 	}
// 
// 	@Override
// 	public HudElement setElementArmor() {
// 		return new HudElementArmorHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementFood() {
// 		return new HudElementFoodHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementHealth() {
// 		return new HudElementHealthHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementHealthMount() {
// 		return new HudElementHealthMountHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementLevel() {
// 		return new HudElementLevelHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementWidget() {
// 		return new HudElementWidgetHotbar();
// 	}
// 
// 	@Override
// 	public HudElement setElementHotbar() {
// 		return new HudElementHotbarHotbar();
// 	}
// }
// 
// Path: src/main/java/net/spellcraftgaming/rpghud/main/ModRPGHud.java
// @Environment(EnvType.CLIENT)
// 
// public class ModRPGHud implements ClientModInitializer{
//     public final String MODID = "rpg-hud";
// 
// 	public static ModRPGHud instance;
//     
// 	public static boolean[] renderDetailsAgain = { false, false, false };
// 
// 	public static int screenOffset = 0;
// 	
// 	public Settings settings;
// 
// 	/** Map of all registered HUDs */
// 	public Map<String, Hud> huds = new LinkedHashMap<String, Hud>();
// 	
//     public void onInitializeClient()
//     {
//         instance = this;
// 		this.settings = new Settings();
// 		this.registerHud(new HudVanilla(MinecraftClient.getInstance(), "vanilla", "Vanilla"));
// 		this.registerHud(new HudSimple(MinecraftClient.getInstance(), "simple", "Simplified"));
// 		this.registerHud(new HudDefault(MinecraftClient.getInstance(), "default", "Default"));
// 		this.registerHud(new HudExtendedWidget(MinecraftClient.getInstance(), "extended", "Extended Widget"));
// 		this.registerHud(new HudFullTexture(MinecraftClient.getInstance(), "texture", "Full Texture"));
// 		//this.registerHud(new HudHotbarWidget(MinecraftClient.getInstance(), "hotbar", "Hotbar Widget"));
// 		this.registerHud(new HudModern(MinecraftClient.getInstance(), "modern", "Modern Style"));
// 
// 		if (!isHudKeyValid(this.settings.getStringValue(Settings.hud_type))) {
// 			this.settings.setSetting(Settings.hud_type, "vanilla");
// 		}
//         new RenderOverlay();
//         if (isClass("io.github.prospector.modmenu.ModMenu")) screenOffset = 12;
//     }
//     
// 	/**
// 	 * Register a new HUD
// 	 * 
// 	 * @param hud
// 	 *            the hud to be registered
// 	 */
// 	public void registerHud(Hud hud) {
// 		this.huds.put(hud.getHudKey(), hud);
// 	}
// 
// 	/** Returns the active HUD */
// 	public Hud getActiveHud() {
// 		return this.huds.get(this.settings.getStringValue(Settings.hud_type));
// 	}
// 
// 	/** Returns the vanilla HUD */
// 	public Hud getVanillaHud() {
// 		return this.huds.get("vanilla");
// 	}
// 
// 	public boolean isVanillaHud() {
// 	    return this.settings.getStringValue(Settings.hud_type) == "vanilla";
// 	}
// 	
// 	/** Checks if a Hud with the specified key is registered */
// 	public boolean isHudKeyValid(String key) {
// 		return this.huds.containsKey(key);
// 	}
// 	
// 	public static boolean isClass(String className) {
// 	    try  {
// 	        Class.forName(className);
// 	        return true;
// 	    }  catch (ClassNotFoundException e) {
// 	        return false;
// 	    }
// 	}
// }


// Path: src/main/java/net/spellcraftgaming/rpghud/mixin/ChatMixin.java
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.hud.ChatHud;
import net.minecraft.client.util.math.MatrixStack;
import net.spellcraftgaming.rpghud.gui.hud.HudHotbarWidget;
import net.spellcraftgaming.rpghud.main.ModRPGHud;

package net.spellcraftgaming.rpghud.mixin;




@Mixin(ChatHud.class)
public class ChatMixin {

    @Inject(at = @At("HEAD"), method = "render")
    private void renderChat(CallbackInfo into) {

        if(ModRPGHud.instance.getActiveHud() instanceof HudHotbarWidget) {
