Skip to content

Commit

Permalink
change: Update to 1.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FlashyReese committed Aug 23, 2024
1 parent d91aec5 commit 635f139
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 102 deletions.
17 changes: 11 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ plugins {
id("fabric-loom") version ("1.7.2") apply (false)
}

val MINECRAFT_VERSION by extra { "1.21" }
val NEOFORGE_VERSION by extra { "21.0.76-beta" }
val FABRIC_LOADER_VERSION by extra { "0.15.11" }
val FABRIC_API_VERSION by extra { "0.100.4+1.21" }
val MINECRAFT_VERSION by extra { "1.21.1" }
val NEOFORGE_VERSION by extra { "21.1.23" }
val FABRIC_LOADER_VERSION by extra { "0.16.2" }
val FABRIC_API_VERSION by extra { "0.102.1+1.21.1" }

// This value can be set to null to disable Parchment.
val PARCHMENT_VERSION by extra { "2024.06.23" }
val PARCHMENT_VERSION by extra { null }

// https://semver.org/
val MOD_VERSION by extra { "0.5.7" }
val MOD_VERSION by extra { "0.6.0-beta.1" }

allprojects {
apply(plugin = "java")
Expand All @@ -24,6 +24,11 @@ tasks.withType<JavaCompile> {
}

subprojects {
repositories {
maven("https://maven.parchmentmc.org/")
maven("https://api.modrinth.com/maven")
}

apply(plugin = "maven-publish")

java.toolchain.languageVersion = JavaLanguageVersion.of(21)
Expand Down
6 changes: 1 addition & 5 deletions common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ plugins {
id("fabric-loom") version "1.7.2"
}

repositories {
maven("https://maven.parchmentmc.org/")
}

val MINECRAFT_VERSION: String by rootProject.extra
val PARCHMENT_VERSION: String? by rootProject.extra
val FABRIC_LOADER_VERSION: String by rootProject.extra
Expand Down Expand Up @@ -45,7 +41,7 @@ dependencies {
modCompileOnly("net.fabricmc.fabric-api:fabric-renderer-api-v1:3.2.9+1172e897d7")
implementation(group = "com.lodborg", name = "interval-tree", version = "1.0.0")

modImplementation(files(rootDir.resolve("sodium-fabric.jar")))
modImplementation(/*files(rootDir.resolve("sodium-fabric.jar"))*/ "maven.modrinth:sodium:mc1.21-0.6.0-beta.1-fabric")
}

tasks.withType<AbstractRemapJarTask>().forEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import me.flashyreese.mods.sodiumextra.client.gui.SodiumExtraGameOptions;
import me.flashyreese.mods.sodiumextra.client.gui.SodiumExtraHud;
import net.caffeinemc.caffeineconfig.CaffeineConfig;
import net.caffeinemc.mods.sodium.client.services.PlatformInfoAccess;
import net.caffeinemc.mods.sodium.client.services.PlatformRuntimeInformation;
import net.minecraft.client.DeltaTracker;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
Expand Down Expand Up @@ -76,7 +76,7 @@ public static CaffeineConfig mixinConfig() {

//.withLogger(SodiumExtraClientMod.logger())
.withInfoUrl("https://github.com/FlashyReese/sodium-extra-fabric/wiki/Configuration-File")
.build(PlatformInfoAccess.getInstance().getConfigDirectory().resolve("sodium-extra.properties"));
.build(PlatformRuntimeInformation.getInstance().getConfigDirectory().resolve("sodium-extra.properties"));
}
return MIXIN_CONFIG;
}
Expand All @@ -86,7 +86,7 @@ public static ClientTickHandler getClientTickHandler() {
}

private static SodiumExtraGameOptions loadConfig() {
return SodiumExtraGameOptions.load(PlatformInfoAccess.getInstance().getConfigDirectory().resolve("sodium-extra-options.json").toFile());
return SodiumExtraGameOptions.load(PlatformRuntimeInformation.getInstance().getConfigDirectory().resolve("sodium-extra-options.json").toFile());
}

public static void onTick(Minecraft client) {
Expand Down

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import com.mojang.blaze3d.vertex.*;
import me.flashyreese.mods.sodiumextra.client.render.vertex.formats.TextureColorVertex;
import me.flashyreese.mods.sodiumextra.client.render.vertex.formats.TextureVertex;
import me.flashyreese.mods.sodiumextra.common.util.ColorRGBA;
import net.caffeinemc.mods.sodium.api.util.ColorABGR;
import net.caffeinemc.mods.sodium.api.util.ColorARGB;
import net.caffeinemc.mods.sodium.api.vertex.buffer.VertexBufferWriter;
import net.caffeinemc.mods.sodium.api.vertex.format.common.ColorVertex;
import net.minecraft.client.gui.GuiGraphics;
Expand Down Expand Up @@ -45,8 +45,8 @@ public abstract class MixinGuiGraphics {
private void fillGradient(VertexConsumer vertexConsumer, int startX, int startY, int endX, int endY, int z, int colorStart, int colorEnd, CallbackInfo ci) {
VertexBufferWriter writer = VertexBufferWriter.of(vertexConsumer);
Matrix4f matrix4f = this.pose.last().pose();
colorStart = ColorRGBA.fromOrToABGR(ColorRGBA.fromARGB(colorStart));
colorEnd = ColorRGBA.fromOrToABGR(ColorRGBA.fromARGB(colorEnd));
colorStart = ColorARGB.toABGR(colorStart);
colorEnd = ColorARGB.toABGR(colorEnd);
try (MemoryStack stack = MemoryStack.stackPush()) {
final long buffer = stack.nmalloc(4 * ColorVertex.STRIDE);
long ptr = buffer;
Expand Down Expand Up @@ -88,7 +88,7 @@ public void fill(RenderType type, int x1, int y1, int x2, int y2, int z, int col
}
VertexConsumer vertexConsumer = this.bufferSource.getBuffer(type);
VertexBufferWriter writer = VertexBufferWriter.of(vertexConsumer);
color = ColorRGBA.fromOrToABGR(ColorRGBA.fromARGB(color));
color = ColorARGB.toABGR(color);
try (MemoryStack stack = MemoryStack.stackPush()) {
final long buffer = stack.nmalloc(4 * ColorVertex.STRIDE);
long ptr = buffer;
Expand Down
2 changes: 1 addition & 1 deletion fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies {

implementation("com.google.code.findbugs:jsr305:3.0.1")
compileOnly(project(":common"))
modImplementation(files(rootDir.resolve("sodium-fabric.jar")))
modImplementation(/*files(rootDir.resolve("sodium-fabric.jar"))*/ "maven.modrinth:sodium:mc1.21-0.6.0-beta.1-fabric")

}

Expand Down
2 changes: 1 addition & 1 deletion fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
],
"depends": {
"fabricloader": ">=0.15",
"sodium": ">=0.5.9",
"sodium": ">=0.6.0-beta.1",
"minecraft": ">=1.21"
},
"breaks": {
Expand Down
2 changes: 1 addition & 1 deletion neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ tasks.named("compileTestJava").configure {

dependencies {
compileOnly(project(":common"))
implementation(files(rootDir.resolve("sodium-neo.jar")))
implementation(/*files(rootDir.resolve("sodium-neo.jar"))*/ "maven.modrinth:sodium:mc1.21-0.6.0-beta.1-neoforge")
}

// NeoGradle compiles the game, but we don't want to add our common code to the game's code
Expand Down
7 changes: 7 additions & 0 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,12 @@ versionRange = "[1.20.4,1.21.1)"
ordering = "NONE"
side = "CLIENT"

[[dependencies.sodium_extra]]
modId = "sodium"
type = "required"
versionRange = "[0.6.0-beta.1,0.6.0)"
ordering = "NONE"
side = "CLIENT"

[[mixins]]
config = "sodium-extra.mixins.json"

0 comments on commit 635f139

Please sign in to comment.