package asm.mixins;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.main.Main;
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;

@Environment(EnvType.CLIENT)
@Mixin({Main.class})
public class MixinMain {
   @Inject(
      method = {"<clinit>"},
      at = {@At("TAIL")}
   )
   private static void hookStaticInit(CallbackInfo ci) {
      System.setProperty("java.awt.headless", "false");
   }
}
