[DEV] New Cloth Config GUIs, new nojang apis, and bug fixes
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
-def majorMc = "1.21.2";
|
||||
+def majorMc = "1.21";
|
||||
def modLoaders = "neoforge|fabric|quilt|paper";
|
||||
-def supportedMc = "1.21.3";
|
||||
-def supportedMc = "1.21.3|1.21.4";
|
||||
-def reltype = "port";
|
||||
+def supportedMc = "1.21|1.21.1";
|
||||
+def reltype = "snapshot";
|
||||
|
@@ -0,0 +1,11 @@
|
||||
--- a/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/ClothConfigScreenBuilder.java
|
||||
+++ b/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/ClothConfigScreenBuilder.java
|
||||
@@ -390,7 +390,7 @@
|
||||
config.saveConfig(config);
|
||||
Files.deleteIfExists(backupPath);
|
||||
} catch (Exception e) {
|
||||
- Minecraft.getInstance().getToastManager().addToast(
|
||||
+ Minecraft.getInstance().getToasts().addToast(
|
||||
new SystemToast(
|
||||
SystemToast.SystemToastId.PACK_LOAD_FAILURE,
|
||||
Component.literal("Failed To Save Config"),
|
@@ -1,6 +1,6 @@
|
||||
--- a/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java
|
||||
+++ b/Common/src/main/java/com/hypherionmc/craterlib/client/gui/config/CraterConfigScreen.java
|
||||
@@ -217,7 +217,7 @@
|
||||
@@ -218,7 +218,7 @@
|
||||
//RenderSystem.disableTexture();
|
||||
Tesselator tesselator = Tesselator.getInstance();
|
||||
BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
buffer.addVertex(scrollbarPositionMinX, maxY, 0.0f).setColor(0, 0, 0, 255);
|
||||
buffer.addVertex(scrollbarPositionMaxX, maxY, 0.0f).setColor(0, 0, 0, 255);
|
||||
@@ -244,7 +244,7 @@
|
||||
@@ -245,7 +245,7 @@
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.blendFuncSeparate(770, 771, 0, 1);
|
||||
//RenderSystem.disableTexture();
|
||||
@@ -18,7 +18,7 @@
|
||||
Matrix4f matrix = matrices.last().pose();
|
||||
buffer.addVertex(matrix, 0, TOP + 4, 0.0F).setUv(0, 1).setColor(0, 0, 0, 0);
|
||||
buffer.addVertex(matrix, width, TOP + 4, 0.0F).setUv(1, 1).setColor(0, 0, 0, 0);
|
||||
@@ -266,7 +266,7 @@
|
||||
@@ -267,7 +267,7 @@
|
||||
protected void overlayBackground(Matrix4f matrix, int minX, int minY, int maxX, int maxY, int red, int green, int blue, int startAlpha, int endAlpha) {
|
||||
Tesselator tesselator = Tesselator.getInstance();
|
||||
BufferBuilder buffer = tesselator.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX_COLOR);
|
||||
|
@@ -1,11 +1,11 @@
|
||||
--- a/Fabric/build.gradle
|
||||
+++ b/Fabric/build.gradle
|
||||
@@ -116,8 +116,8 @@
|
||||
@@ -117,8 +117,8 @@
|
||||
setVersionType("release")
|
||||
setChangelog(rootProject.file("changelog.md"))
|
||||
setProjectVersion("${minecraft_version}-${project.version}")
|
||||
- setDisplayName("[FABRIC/QUILT 1.21.3] CraterLib - ${project.version}")
|
||||
- setGameVersions("1.21.3")
|
||||
- setDisplayName("[FABRIC/QUILT 1.21.3/4] CraterLib - ${project.version}")
|
||||
- setGameVersions("1.21.3", "1.21.4")
|
||||
+ setDisplayName("[FABRIC/QUILT 1.21.x] CraterLib - ${project.version}")
|
||||
+ setGameVersions("1.21", "1.21.1")
|
||||
setLoaders("fabric", "quilt")
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/Forge/build.gradle
|
||||
+++ /dev/null
|
||||
@@ -1,116 +1,0 @@
|
||||
@@ -1,126 +1,0 @@
|
||||
-// Adjust the output jar name here
|
||||
-archivesBaseName = "${mod_name.replace(" ", "")}-Forge-${minecraft_version}"
|
||||
-
|
||||
@@ -8,6 +8,8 @@
|
||||
- // Compat
|
||||
- // NOT AVAILABLE ON FORGE modImplementation("maven.modrinth:vanishmod:${vanishmod}")
|
||||
-
|
||||
- modImplementation("me.shedaniel.cloth:cloth-config-forge:${cloth_config}")
|
||||
-
|
||||
- // Do not edit or remove
|
||||
- implementation project(":Common")
|
||||
-}
|
||||
@@ -116,4 +118,12 @@
|
||||
- setArtifact(remapJar)
|
||||
- setCurseEnvironment("both")
|
||||
- setIsManualRelease(true)
|
||||
-
|
||||
- curseDepends {
|
||||
- optional("cloth-config")
|
||||
- }
|
||||
-
|
||||
- modrinthDepends {
|
||||
- optional("cloth-config")
|
||||
- }
|
||||
-}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/Forge/src/main/java/com/hypherionmc/craterlib/mixin/ConfigScreenHandlerMixin.java
|
||||
+++ /dev/null
|
||||
@@ -1,43 +1,0 @@
|
||||
@@ -1,44 +1,0 @@
|
||||
-package com.hypherionmc.craterlib.mixin;
|
||||
-
|
||||
-import com.hypherionmc.craterlib.client.gui.config.CraterConfigScreen;
|
||||
@@ -32,13 +32,14 @@
|
||||
- @Inject(at = @At("RETURN"), method = "getScreenFactoryFor", cancellable = true, remap = false)
|
||||
- private static void injectConfigScreen(IModInfo selectedMod, CallbackInfoReturnable<Optional<BiFunction<Minecraft, Screen, Screen>>> cir) {
|
||||
- ConfigController.getMonitoredConfigs().forEach((conf, watcher) -> {
|
||||
- if (!conf.getClass().isAnnotationPresent(NoConfigScreen.class)) {
|
||||
- ModuleConfig config = (ModuleConfig) conf;
|
||||
- if (config.getModId().equals(selectedMod.getModId())) {
|
||||
- cir.setReturnValue(
|
||||
- Optional.of((minecraft, screen) -> new CraterConfigScreen(config, screen))
|
||||
- );
|
||||
- }
|
||||
- AbstractConfig config = watcher.getLeft();
|
||||
- if (config.getClass().isAnnotationPresent(NoConfigScreen.class))
|
||||
- return;
|
||||
-
|
||||
- if (watcher.getLeft().getClass().isAnnotationPresent(ClothScreen.class) && (ModloaderEnvironment.INSTANCE.isModLoaded("cloth_config") || ModloaderEnvironment.INSTANCE.isModLoaded("cloth-config") || ModloaderEnvironment.INSTANCE.isModLoaded("clothconfig"))) {
|
||||
- ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> ClothConfigScreenBuilder.buildConfigScreen(config, screen))));
|
||||
- } else {
|
||||
- //ModList.get().getModContainerById(config.getModId()).ifPresent(c -> c.registerExtensionPoint(IConfigScreenFactory.class, ((minecraft, screen) -> new CraterConfigScreen(config, screen))));
|
||||
- }
|
||||
- });
|
||||
- }
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- a/NeoForge/build.gradle
|
||||
+++ b/NeoForge/build.gradle
|
||||
@@ -35,12 +35,7 @@
|
||||
@@ -37,12 +37,7 @@
|
||||
|
||||
unimined.minecraft {
|
||||
neoForged {
|
||||
@@ -14,12 +14,12 @@
|
||||
mixinConfig("${mod_id}.mixins.json", "${mod_id}.neoforge.mixins.json")
|
||||
}
|
||||
}
|
||||
@@ -114,8 +109,8 @@
|
||||
@@ -116,8 +111,8 @@
|
||||
setVersionType("release")
|
||||
setChangelog(rootProject.file("changelog.md"))
|
||||
setProjectVersion("${minecraft_version}-${project.version}")
|
||||
- setDisplayName("[NeoForge 1.21.3] CraterLib - ${project.version}")
|
||||
- setGameVersions("1.21.3")
|
||||
- setDisplayName("[NeoForge 1.21.3/1.21.4] CraterLib - ${project.version}")
|
||||
- setGameVersions("1.21.3", "1.21.4")
|
||||
+ setDisplayName("[NeoForge 1.21.x] CraterLib - ${project.version}")
|
||||
+ setGameVersions("1.21", "1.21.1")
|
||||
setLoaders("neoforge")
|
||||
|
@@ -16,7 +16,16 @@
|
||||
|
||||
# Forge
|
||||
forge_version=50.0.6
|
||||
@@ -42,7 +42,7 @@
|
||||
@@ -29,7 +29,7 @@
|
||||
adventure=4.17.0
|
||||
rpc_sdk=1.0
|
||||
discord_formatter=2.0.0
|
||||
-cloth_config=17.0.144
|
||||
+cloth_config=15.0.140
|
||||
|
||||
# Mod Dependencies
|
||||
fabrictailor=2.3.1
|
||||
@@ -43,7 +43,7 @@
|
||||
# Publishing
|
||||
curse_id=867099
|
||||
modrinth_id=Nn8Wasaq
|
||||
|
Reference in New Issue
Block a user