package dev.crucifixbeta.mod.modules.impl.misc;

import dev.crucifixbeta.api.events.eventbus.EventListener;
import dev.crucifixbeta.api.events.impl.ClientTickEvent;
import dev.crucifixbeta.mod.modules.Module;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.screen.DownloadingTerrainScreen;
import net.minecraft.client.gui.screen.ProgressScreen;

@Environment(EnvType.CLIENT)
public class NoTerrainScreen extends Module {

   public NoTerrainScreen() {
      super("NoTerrainScreen", Module.Category.Misc);
      this.setChinese("\u6ca1\u6709\u52a0\u8f7d\u754c\u9762");
   }

   @EventListener
   public void onEvent(ClientTickEvent event) {
      if (!nullCheck()) {
         if (mc.currentScreen instanceof DownloadingTerrainScreen || mc.currentScreen instanceof ProgressScreen) {
            mc.currentScreen = null;
         }
      }
   }
}
