Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dc2b265
Revert "revert gl renderer thing"
nextdayy Nov 30, 2025
7ed6a9d
Reapply "it works!"
nextdayy Nov 30, 2025
c3d4efa
polyui state v2 + GLRenderer fixes
nextdayy Nov 30, 2025
7ef695f
getting there!
nextdayy Dec 1, 2025
80316fc
fixed GLRenderer yay
nextdayy Dec 1, 2025
0bebd02
port fixes
nextdayy Dec 2, 2025
8c9339f
Merge branch 'v1' into state-v2-and-actually-use-glrenderer
Wyvest Dec 4, 2025
3482454
Fix 1.8 errors
Wyvest Dec 4, 2025
a1865d9
Disable blur everywhere
Wyvest Dec 4, 2025
4c4c052
bump textile and apiDump
Wyvest Dec 4, 2025
70e3917
add more disclaimers in TinyFD usage
Wyvest Dec 4, 2025
89304bd
cleanup and improve font rendering
nextdayy Dec 4, 2025
ca97ebb
drop shadow, improve font rendering when scale is used
nextdayy Dec 7, 2025
58a5fea
fix keying issues (fixes #591)
nextdayy Dec 7, 2025
c0f952a
fix crashes and radii issue
nextdayy Dec 8, 2025
fc1dd0f
fix scissoring on GLRenderer
nextdayy Dec 8, 2025
d72f971
dump
nextdayy Dec 8, 2025
03e0b25
Merge branch 'v1' into state-v2-and-actually-use-glrenderer
Wyvest Dec 9, 2025
62b7959
implement MC text with MC renderer, move Platform.screen().glViewport…
nextdayy Dec 9, 2025
1093ed5
Merge remote-tracking branch 'main/state-v2-and-actually-use-glrender…
nextdayy Dec 9, 2025
cc412aa
bump to 181
Wyvest Dec 10, 2025
8201602
updates and fixes
nextdayy Dec 10, 2025
2969f70
Merge remote-tracking branch 'main/state-v2-and-actually-use-glrender…
nextdayy Dec 10, 2025
954d814
fix transformation matrix
nextdayy Dec 10, 2025
91aedf6
Add 1.21.11 support and bump DGT
Deftu Dec 18, 2025
21dccd0
Bump to DGT revision 4
Deftu Dec 18, 2025
78cdb6f
macos moment
nextdayy Jan 16, 2026
82c79bf
Merge remote-tracking branch 'main/state-v2-and-actually-use-glrender…
nextdayy Jan 16, 2026
8020eec
do the stuff for the stuff
Deftu Jan 20, 2026
903c0f9
Shenanigans have been thoroughly accounted for :3
Deftu Jan 20, 2026
9cb1963
We need toString not patchless
Deftu Jan 20, 2026
bc4491e
Minecraft 26.1 is mostly functional now
Deftu Jan 21, 2026
50a2587
stuff
Deftu Jan 22, 2026
cdafb2b
Merge pull request #605 from Polyfrost/DGT-2.71-and-MC-26.1
Deftu Jan 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions buildSrc/src/main/kotlin/org/polyfrost/gradle/addDependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ private val legacyFabricApiModules = listOf(
private val fabricApiModules = listOf( // command-api-v2 introduced in 1.19, transitive-access-wideners-v1 introduced in 1.18
"api-base",
"lifecycle-events-v1",
"key-binding-api-v1",
"rendering-v1",
"screen-api-v1"
)
Expand Down Expand Up @@ -42,6 +41,8 @@ private val fabricApiModuleVersions = mapOf(
"api-base-12108" to "0.4.64+9ec45cd8f3", // 1.21.8
"api-base-12109" to "0.5.2+2fa446b294", // 1.21.9
"api-base-12110" to "1.0.0+14b92d8968", // 1.21.10
"api-base-12111" to "1.0.5+4ebb5c0853", // 1.21.11
"api-base-260100" to "2.0.0+574290ba7d", // 26.1
"lifecycle-events-v1-common" to "1.1.0+2c3f108c81e6", // Common (Legacy Fabric API)
"lifecycle-events-v1-10809" to "1.1.0+1.8.9+2c3f108c81e6", // 1.8.9
"lifecycle-events-v1-11202" to "1.1.0+1.12.2+2c3f108c81e6", // 1.12.2
Expand All @@ -63,6 +64,8 @@ private val fabricApiModuleVersions = mapOf(
"lifecycle-events-v1-12108" to "2.6.3+db4dfd85f3", // 1.21.8
"lifecycle-events-v1-12109" to "2.6.8+33df5e6e94", // 1.21.9
"lifecycle-events-v1-12110" to "2.6.9+33df5e6e68", // 1.21.10
"lifecycle-events-v1-12111" to "2.6.15+4ebb5c0853", // 1.21.11
"lifecycle-events-v1-260100" to "4.0.2+a208210e7d", // 26.1
"keybindings-api-v1-common" to "1.1.1+281301ea81e6", // Common (Legacy Fabric API)
"keybindings-api-v1-10809" to "1.1.1+1.8.9+2c3f108c81e6", // 1.8.9
"keybindings-api-v1-11202" to "1.1.1+1.12.2+2c3f108c81e6", // 1.12.2
Expand All @@ -84,6 +87,8 @@ private val fabricApiModuleVersions = mapOf(
"key-binding-api-v1-12108" to "1.0.65+946bf4c3f3", // 1.21.8
"key-binding-api-v1-12109" to "1.1.0+4ec8267494", // 1.21.9
"key-binding-api-v1-12110" to "1.1.1+b3ba9c4868", // 1.21.10
"key-binding-api-v1-12111" to "1.1.7+4fc5413f53", // 1.21.11
"key-mapping-api-v1-260100" to "2.0.0+574290ba7d", // 26.1
"rendering-api-v1-common" to "1.0.0+7c545fdb81e6", // Common (Legacy Fabric API)
"rendering-api-v1-10809" to "1.0.0+1.8.9+2c3f108c81e6", // 1.8.9
"rendering-api-v1-11202" to "1.0.0+1.8.9+2c3f108c81e6", // 1.12.2
Expand All @@ -105,6 +110,8 @@ private val fabricApiModuleVersions = mapOf(
"rendering-v1-12108" to "12.4.0+e8d43c76f3", // 1.21.8
"rendering-v1-12109" to "15.0.2+9bce411b94", // 1.21.9
"rendering-v1-12110" to "16.0.1+328a75ba68", // 1.21.10
"rendering-v1-12111" to "16.2.5+1fb1cde953", // 1.21.11
"rendering-v1-260100" to "18.0.0+a9f246707d", // 26.1
"screen-api-v1-11605" to "1.0.1+3cc0f0907d", // 1.16.5
"screen-api-v1-11701" to "1.0.5+cf39a74318", // 1.17.1
"screen-api-v1-11802" to "1.0.11+d882b91560", // 1.18.2
Expand All @@ -123,6 +130,8 @@ private val fabricApiModuleVersions = mapOf(
"screen-api-v1-12108" to "2.1.0+277ecf7df3", // 1.21.8
"screen-api-v1-12109" to "3.0.2+86b3ae5794", // 1.21.9
"screen-api-v1-12110" to "3.1.0+9c82a79868", // 1.21.10
"screen-api-v1-12111" to "3.1.7+4ebb5c0853", // 1.21.11
"screen-api-v1-260100" to "4.0.0+574290ba7d", // 26.1
"command-api-v1-11605" to "1.1.3+3cc0f0907d", // 1.16.5
"command-api-v1-11701" to "1.1.4+cf39a74318", // 1.17.1
"command-api-v1-11802" to "1.1.10+d7c144a860", // 1.18.2
Expand All @@ -141,6 +150,8 @@ private val fabricApiModuleVersions = mapOf(
"command-api-v2-12108" to "2.2.53+946bf4c3f3", // 1.21.8
"command-api-v2-12109" to "2.3.5+33df5e6e94", // 1.21.9
"command-api-v2-12110" to "2.3.7+328a75ba68", // 1.21.10
"command-api-v2-12111" to "2.4.6+4ebb5c0853", // 1.21.11
"command-api-v2-260100" to "3.0.0+574290ba7d", // 26.1
"transitive-access-wideners-v1-11802" to "1.1.0+e747827960", // 1.18.2
"transitive-access-wideners-v1-11902" to "1.3.3+08b73de490", // 1.19.2
"transitive-access-wideners-v1-11904" to "3.3.0+1b5f819af4", // 1.19.4
Expand All @@ -157,6 +168,8 @@ private val fabricApiModuleVersions = mapOf(
"transitive-access-wideners-v1-12108" to "6.4.1+ac3e15d1f3", // 1.21.8
"transitive-access-wideners-v1-12109" to "6.5.2+5d9dbead94", // 1.21.9
"transitive-access-wideners-v1-12110" to "6.5.3+41eb434368", // 1.21.10
"transitive-access-wideners-v1-12111" to "7.0.7+1fb1cde953", // 1.21.11
"transitive-access-wideners-v1-260100" to "8.0.1+a208210e7d", // 26.1
)

/**
Expand All @@ -165,7 +178,7 @@ private val fabricApiModuleVersions = mapOf(
* @param version The version of Minecraft. If null, the method is running inside the `:dependencies:legacy` module.
* @param loader The mod loader being used.
*/
fun Project.provideIncludedDependencies(version: Triple<Int, Int, Int>?, loader: String?): List<OCDependency> { // Either a String or ExternalModuleDependency
fun Project.provideIncludedDependencies(version: Triple<Int, Int, Int>?, loader: String?, shenanigans: String? = version?.toMCVer()): List<OCDependency> { // Either a String or ExternalModuleDependency
project.logger.lifecycle("===> Adding dependencies for Minecraft ${version?.toMCVer()} & $loader")

val libs = rootProject
Expand Down Expand Up @@ -194,17 +207,21 @@ fun Project.provideIncludedDependencies(version: Triple<Int, Int, Int>?, loader:

deps.add(libs.findLibrary("copycat-image-awt").get().get())

if (version != null && version.second >= 16) {
if (version != null && (version.second >= 16 || version.first >= 2)) {
logger.lifecycle("===> Adding LWJGL dependencies for Minecraft ${version.toMCVer()} & $loader")

// Modern (1.16+)
val lwjglBase = "org.lwjgl:lwjgl"
val lwjglVersion = when (version.second) {
in 16..18 -> "3.2.2"
19 -> "3.3.1"
20 -> "3.3.2"
21 -> "3.3.3"
else -> error("Unsupported Minecraft version: ${version.toMCVer()}")
val lwjglVersion = if (version.first >= 2) {
"3.3.3"
} else {
when (version.second) {
in 16..18 -> "3.2.2"
19 -> "3.3.1"
20 -> "3.3.2"
21 -> "3.3.3"
else -> error("Unsupported Minecraft version: ${version.toMCVer()}")
}
}

deps.add("$lwjglBase-tinyfd:$lwjglVersion")
Expand Down Expand Up @@ -236,8 +253,8 @@ fun Project.provideIncludedDependencies(version: Triple<Int, Int, Int>?, loader:
actualDeps.add(OCDependency(dep))
}
if (version != null) {
actualDeps.add(OCDependency("dev.deftu:textile-${version.toMCVer()}-$loader:${libs.findVersion("textile").get().displayName}", true))
actualDeps.add(OCDependency("dev.deftu:omnicore-${version.toMCVer()}-$loader:${libs.findVersion("omnicore").get().displayName}", true))
actualDeps.add(OCDependency("dev.deftu:textile-${shenanigans}-$loader:${libs.findVersion("textile").get().displayName}", true))
actualDeps.add(OCDependency("dev.deftu:omnicore-${shenanigans}-$loader:${libs.findVersion("omnicore").get().displayName}", true))
}

return actualDeps
Expand All @@ -246,7 +263,7 @@ fun Project.provideIncludedDependencies(version: Triple<Int, Int, Int>?, loader:
fun Project.provideFabricApiDependency(version: Triple<Int, Int, Int>): List<OCDependency> {
val deps = mutableListOf<OCDependency>()

if (version.second <= 12) {
if (version.first == 1 && version.second <= 12) {
// Legacy Fabric
for (module in legacyFabricApiModules) {
val commonVersionValue = fabricApiModuleVersions["$module-common"] ?: error("No version found for $module-common")
Expand All @@ -258,14 +275,19 @@ fun Project.provideFabricApiDependency(version: Triple<Int, Int, Int>): List<OCD
// Modern Fabric
val finalList = mutableListOf<String>()
finalList.addAll(fabricApiModules)
if (version.second >= 18) {
if (version.first >= 2 || version.second >= 18) {
finalList.add("transitive-access-wideners-v1")
}
if (version.second >= 19) {
if (version.first >= 2 || version.second >= 19) {
finalList.add("command-api-v2")
} else {
finalList.add("command-api-v1")
}
if (version.first >= 2) {
finalList.add("key-mapping-api-v1")
} else {
finalList.add("key-binding-api-v1")
}
for (module in finalList) {
val mcVersionValue = fabricApiModuleVersions["$module-${version.toPreprocessorNumber()}"] ?: error("No version found for $module-${version.toMCVer()}")
deps.add(OCDependency("net.fabricmc.fabric-api:fabric-$module:$mcVersionValue", true))
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ ksp.incremental=false

dgt.java.version=8
dgt.loom.mappings=official-like
dgt.minecraft.revision=3
dgt.minecraft.revision=5

# Project Configuration
project.group=org.polyfrost.oneconfig
project.name=OneConfig
project.version=1.0.0-alpha.180
project.version=1.0.0-alpha.181
12 changes: 6 additions & 6 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

# Libraries
# All
kotlin = "2.2.10"
kotlin = "2.3.0"
kotlinx-coroutines = "1.10.2"
kotlinx-atomicfu = "0.29.0"
fabric-language-kotlin = "1.13.5+kotlin.2.2.10"
fabric-language-kotlin = "1.13.8+kotlin.2.3.0"
google-ksp = "2.2.10-2.0.2"
polyui = "1.15.2"
polyui = "2.0.7"
annotations = "24.1.0"
hypixel-modapi = "1.0.1"
hypixel-data = "0.2.0" # Dep of hypixel-modapi
Expand All @@ -21,8 +21,8 @@ copycat = "0.1.3"
copycat-image-awt = "0.1.1"

# Per version
textile = "1.0.0-beta.8"
omnicore = "1.0.0-beta.38"
textile = "1.0.0-beta.17"
omnicore = "1.0.0-beta.41"
lwjgl = "3.3.3" # All downloaded by the isolated-lwjgl3-loader

# Legacy only
Expand All @@ -35,7 +35,7 @@ brigadier = "1.0.18"
oneconfig-loader = "1.1.0-alpha.48"

# Gradle
dgt = "2.62.0"
dgt = "2.73.0"
kotlinx-abi = "0.18.1"
licenser = "2.1.1"
jetbrains-idea-ext = "1.3"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
80 changes: 50 additions & 30 deletions minecraft/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.replaymod.gradle.preprocess.PreprocessTask
import com.replaymod.gradle.preprocess.ProjectGraphNode
import com.replaymod.gradle.preprocess.RootPreprocessExtension
import dev.deftu.gradle.utils.GameSide
import dev.deftu.gradle.utils.version.MinecraftDropVersion
import dev.deftu.gradle.utils.version.MinecraftReleaseVersion
import dev.deftu.gradle.utils.version.MinecraftVersions
import gg.essential.gradle.util.RelocationTransform.Companion.registerRelocationAttribute
Expand Down Expand Up @@ -39,7 +40,9 @@ if (mcData.isForge) {
toolkitLoomHelper {
disableRunConfigs(GameSide.SERVER)

useDevAuth("+")
if (mcData.version < MinecraftVersions.VERSION_1_21_11) {
useDevAuth("+")
}

useProperty("mixin.debug.export", "true", GameSide.CLIENT)
useProperty("debugBytecode", "true", GameSide.CLIENT)
Expand Down Expand Up @@ -127,7 +130,7 @@ fun DependencyHandlerScope.handleApiDep(dependency: String, isMod: Boolean = fal

fun DependencyHandlerScope.handleApiDep(dependency: ExternalModuleDependency, isMod: Boolean = false) {
val dep = "${dependency.group}:${dependency.name}:${dependency.version}"
if (isMod) "oneConfigModulesCompileOnlyApi"(modApi(dep) {
if (isMod) "oneConfigModulesCompileOnlyApi"(maybeModApi(dep) {
isTransitive = false
attributes {
attribute(includeInLoader, JBoolean.TRUE)
Expand Down Expand Up @@ -165,7 +168,7 @@ dependencies {
)

fun DependencyHandlerScope.compileOnlyCompat(notation: String?) =
notation?.let { modCompileOnly(it) { isTransitive = false } }
notation?.let { maybeModCompileOnly(it) { isTransitive = false } }

fun DependencyHandlerScope.compileOnlyCompat(notation: CompatDependency?) {
when {
Expand All @@ -175,9 +178,14 @@ dependencies {
}
}

val mcVersion = mcData.version as MinecraftReleaseVersion
val tripleVersion = Triple(mcVersion.major, mcVersion.minor, mcVersion.patch)
val mcVersionString = listOf(mcVersion.major, mcVersion.minor, mcVersion.patch).joinToString(".")
val mcVersion = mcData.version
val tripleVersion = when (mcVersion) {
is MinecraftDropVersion -> Triple(mcVersion.year, mcVersion.drop, mcVersion.patch)
is MinecraftReleaseVersion -> Triple(mcVersion.major, mcVersion.minor, mcVersion.patch)
else -> error("no")
}

val mcVersionString = mcData.version.toString()

compileOnlyCompat("gg.essential:vigilance-1.8.9-forge:299")
compileOnlyCompat("org.notenoughupdates.moulconfig:common:3.11.0")
Expand Down Expand Up @@ -207,7 +215,8 @@ dependencies {
rconfig("1.21.7", "3.7.2"),
rconfig("1.21.8", "3.7.2", "1.21.7"),
rconfig("1.21.9", "3.9.1"),
rconfig("1.21.10", "3.9.1", "1.21.9")
rconfig("1.21.10", "3.9.1", "1.21.9"),
rconfig("1.21.11", "3.9.1", "1.21.9"),
)

compileOnlyCompat(rconfig[mcVersionString])
Expand Down Expand Up @@ -249,7 +258,8 @@ dependencies {
yacl("1.21.7", "3.7.1", "1.21.6"),
yacl("1.21.8", "3.7.1", "1.21.6"),
yacl("1.21.9", "3.8.0", "1.21.6"),
yacl("1.21.10", "3.8.0", "1.21.9")
yacl("1.21.10", "3.8.0", "1.21.9"),
yacl("1.21.11", "3.8.0", "1.21.9"),
)
compileOnlyCompat(yacl[mcVersionString])

Expand All @@ -274,13 +284,15 @@ dependencies {
modMenu("1.21.7", "15.0.0-beta.3"),
modMenu("1.21.8", "15.0.0-beta.3"),
modMenu("1.21.10", "16.0.0-rc.1"),
modMenu("1.21.11", "17.0.0-alpha.1"),
)
compileOnlyCompat(modMenu[mcVersionString])


provideIncludedDependencies(
Triple(mcVersion.major, mcVersion.minor, mcVersion.patch),
mcData.loader.friendlyString
tripleVersion,
mcData.loader.friendlyString,
mcVersion.toString()
).forEach {
if (it.dep is String) {
@Suppress("USELESS_CAST")
Expand All @@ -293,7 +305,7 @@ dependencies {
if (mcData.isFabric) {
provideFabricApiDependency(tripleVersion).forEach {
@Suppress("USELESS_CAST")
modApi(if (it.dep is String) it.dep as String else "${(it.dep as ExternalModuleDependency).group}:${(it.dep as ExternalModuleDependency).name}:${(it.dep as ExternalModuleDependency).version}") {
maybeModApi(if (it.dep is String) it.dep as String else "${(it.dep as ExternalModuleDependency).group}:${(it.dep as ExternalModuleDependency).name}:${(it.dep as ExternalModuleDependency).version}") {
isTransitive = false
}
}
Expand Down Expand Up @@ -346,35 +358,43 @@ dependencies {
}
}

if ((mcData.version as MinecraftReleaseVersion).isNewerThan(MinecraftVersions.VERSION_1_21_4)) {
if (mcData.version > MinecraftVersions.VERSION_1_21_4) {
compileOnly("net.azureaaron:dandelion:1.0.0-alpha.3") { isTransitive = false }
}
api("dev.deftu:enhancedeventbus:2.0.0") // TODO
}

tasks {
val manifestFunc = { manifest: Manifest ->
val attributesMap = buildMap<String, Any> {
putAll(
mapOf(
"Specification-Title" to modData.id,
"Specification-Vendor" to "Polyfrost",
"Specification-Version" to "1", // We are version 1 of ourselves, whatever the hell that means
"Implementation-Title" to rootProject.name,
"Implementation-Version" to project.version,
"Implementation-Vendor" to "Polyfrost",
"Implementation-Timestamp" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(Date()),
"OneConfig-Main-Class" to "org.polyfrost.oneconfig.internal.bootstrap.Bootstrap",
"MixinConfigs" to "mixins.oneconfigv1.init.json,mixins.oneconfigv1.json",)
)
}
manifest.attributes(attributesMap)
Unit
}

withType(Jar::class) {
exclude("**/**_Test.**")
exclude("**/**_Test$**.**")
}
remapJar {
manifest {
val attributesMap = buildMap<String, Any> {
putAll(
mapOf(
"Specification-Title" to modData.id,
"Specification-Vendor" to "Polyfrost",
"Specification-Version" to "1", // We are version 1 of ourselves, whatever the hell that means
"Implementation-Title" to rootProject.name,
"Implementation-Version" to project.version,
"Implementation-Vendor" to "Polyfrost",
"Implementation-Timestamp" to SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").format(Date()),
"OneConfig-Main-Class" to "org.polyfrost.oneconfig.internal.bootstrap.Bootstrap",
"MixinConfigs" to "mixins.oneconfigv1.init.json,mixins.oneconfigv1.json",
)
)
}
attributes(attributesMap)
if (mcData.version.isDrop) {
jar {
manifest(manifestFunc)
}
} else {
named<org.gradle.jvm.tasks.Jar>("remapJar") {
manifest(manifestFunc)
}
}
processResources {
Expand Down
Loading
Loading