Escape saves config and added a immersive portals comment
This commit is contained in:
@@ -18,10 +18,11 @@ import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
// Logger (for debug stuff)
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
// Uses https://github.com/TheElectronWill/night-config for toml (only for Fabric since Forge allready includes this)
|
||||
// Uses https://github.com/TheElectronWill/night-config for toml (only for Fabric since Forge already includes this)
|
||||
|
||||
import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||
|
||||
@@ -33,6 +34,7 @@ import com.seibel.lod.core.config.*;
|
||||
|
||||
// Minecraft imports
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Font;
|
||||
@@ -48,7 +50,6 @@ import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.TextComponent;
|
||||
import net.minecraft.network.chat.TranslatableComponent;
|
||||
import net.minecraft.client.resources.language.I18n; // translation
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.minecraft.client.gui.narration.NarratableEntry; // Remove in 1.16
|
||||
|
||||
/**
|
||||
@@ -60,7 +61,7 @@ import net.minecraft.client.gui.narration.NarratableEntry; // Remove in 1.16
|
||||
* Credits to Motschen
|
||||
*
|
||||
* @author coolGi2007
|
||||
* @version 1-6-2022
|
||||
* @version 1-14-2022
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public abstract class ConfigGui
|
||||
@@ -486,6 +487,15 @@ public abstract class ConfigGui
|
||||
super.tick();
|
||||
}
|
||||
|
||||
|
||||
/** When you close it, it goes to the previous screen and saves */
|
||||
@Override
|
||||
public void onClose()
|
||||
{
|
||||
saveToFile();
|
||||
Objects.requireNonNull(minecraft).setScreen(this.parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init()
|
||||
{
|
||||
|
||||
+17
-1
@@ -38,7 +38,6 @@ dependencies {
|
||||
// Fabric loader
|
||||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||
|
||||
// TODO: This is only for LodMain, try to find a way to remove it
|
||||
// Fabric API
|
||||
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
|
||||
|
||||
@@ -54,6 +53,23 @@ dependencies {
|
||||
// Iris
|
||||
// modImplementation "maven.modrinth:iris:${project.iris_version}"
|
||||
|
||||
// Immersive Portals
|
||||
/*
|
||||
modImplementation("com.github.qouteall.ImmersivePortalsMod:build:${project.immersive_portals_version}") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
transitive(false)
|
||||
}
|
||||
modImplementation("com.github.qouteall.ImmersivePortalsMod:imm_ptl_core:${project.immersive_portals_version}") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
transitive(false)
|
||||
}
|
||||
modImplementation("com.github.qouteall.ImmersivePortalsMod:q_misc_util:${project.immersive_portals_version}") {
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
transitive(false)
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// Toml
|
||||
implementation("com.electronwill.night-config:toml:${rootProject.toml_version}")
|
||||
|
||||
@@ -15,6 +15,7 @@ fabric_api_version=0.44.0+1.18
|
||||
modmenu_version=3.0.0
|
||||
sodium_version=mc1.18-0.4.0-alpha5
|
||||
# iris_version=1.18.x-v1.1.4
|
||||
# immersive_portals_version = v1.0.4-1.18
|
||||
|
||||
# Forge loader
|
||||
forge_version=39.0.5
|
||||
|
||||
Reference in New Issue
Block a user