VulkanShader_1.21.10-0.0.4-alpha.jar

Download file
    package net.vulkanmod.config;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.util.Collections;
import net.vulkanmod.config.video.VideoModeManager;
import net.vulkanmod.config.video.VideoModeSet;

public class Config {
   public VideoModeSet.VideoMode videoMode = VideoModeManager.getFirstAvailable().getVideoMode();
   public int windowMode = 0;
   public int advCulling = 2;
   public boolean indirectDraw = true;
   public boolean uniqueOpaqueLayer = true;
   public boolean entityCulling = true;
   public int device = -1;
   public int monitorIndex = 0;
   public int ambientOcclusion = 1;
   public int frameQueueSize = 2;
   public int builderThreads = 0;
   public boolean backFaceCulling = true;
   public boolean textureAnimations = true;
   public String shaderPack = "Internal";
   private static Path CONFIG_PATH;
   private static final Gson GSON = (new GsonBuilder()).setPrettyPrinting().excludeFieldsWithModifiers(new int[]{2}).create();

   public void write() {
      if (!Files.exists(CONFIG_PATH.getParent(), new LinkOption[0])) {
         try {
            Files.createDirectories(CONFIG_PATH);
         } catch (IOException e) {
            e.printStackTrace();
         }
      }

      try {
         Files.write(CONFIG_PATH, Collections.singleton(GSON.toJson(this)));
      } catch (IOException e) {
         e.printStackTrace();
      }

   }

   public static Config load(Path path) {
      CONFIG_PATH = path;
      Config config;
      if (Files.exists(path, new LinkOption[0])) {
         try {
            FileReader fileReader = new FileReader(path.toFile());

            try {
               config = (Config)GSON.fromJson(fileReader, Config.class);
            } catch (Throwable var6) {
               try {
                  fileReader.close();
               } catch (Throwable var5) {
                  var6.addSuppressed(var5);
               }

               throw var6;
            }

            fileReader.close();
         } catch (IOException exception) {
            throw new RuntimeException(exception.getMessage());
         }
      } else {
         config = null;
      }

      return config;
   }
}
    
Download file