Skip to content

Commit

Permalink
forge 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
deirn committed May 1, 2024
1 parent 395eddb commit 86b9052
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 65 deletions.
8 changes: 5 additions & 3 deletions buildSrc/src/main/kotlin/PlatformConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import org.gradle.api.Project
import org.gradle.api.tasks.SourceSetContainer
import org.gradle.api.tasks.bundling.Jar
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.named
Expand All @@ -25,7 +23,7 @@ fun Project.setupPlatform() {
testmod.apply {
val root = rootSourceSets["testmod"]
compileClasspath += main.compileClasspath + main.output + root.output
runtimeClasspath += main.runtimeClasspath + main.output + root.output
runtimeClasspath += main.runtimeClasspath + main.output
}
}

Expand All @@ -37,6 +35,10 @@ fun Project.setupPlatform() {
source(rootSourceSets["main"].allJava)
}

tasks.named<JavaCompile>("compileTestmodJava") {
source(rootSourceSets["testmod"].allJava)
}

tasks.named<Jar>("sourcesJar") {
from(rootSourceSets["main"].allSource)
}
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
org.gradle.jvmargs = -Xmx3G

minecraft = 1.20.5
minecraft = 1.20.6

archiveBaseName = badpackets
group = lol.bai
majorVersion = 0

fabricLoader = 0.15.10
fabricApi = 0.97.6+1.20.5
forge = 49.0.19
neo = 20.5.0-beta
fabricApi = 0.97.8+1.20.6
forge = 50.0.0
neo = 20.6.11-beta

cf.projectId = 615134
mr.projectId = ftdbN0KK
4 changes: 2 additions & 2 deletions platform/fabric/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ cf.endpoint = minecraft.curseforge.com
cf.prefix = [Fabric/Quilt]
cf.releaseType = stable
cf.loader = Fabric, Quilt
cf.gameVersion = 1.20.5
cf.gameVersion = 1.20.5, 1.20.6

# Modrinth
mr.releaseType = stable
mr.loader = fabric, quilt
mr.gameVersion = 1.20.5
mr.gameVersion = 1.20.5, 1.20.6
23 changes: 17 additions & 6 deletions platform/forge/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
import net.minecraftforge.gradle.common.util.RunConfig

plugins {
id("net.minecraftforge.gradle") version "[6.0, 6.2)"
id("org.spongepowered.mixin") version "0.7.+"
id("net.minecraftforge.gradle") version "6.0.24"
id("org.spongepowered.mixin") version "0.7.38"
}

setupPlatform()

repositories {
maven("https://maven.minecraftforge.net")
maven("https://maven.fabricmc.net/")
mavenCentral()
}

jarJar.enable()

dependencies {
minecraft("net.minecraftforge:forge:${rootProp["minecraft"]}-${rootProp["forge"]}")

implementation("org.jetbrains:annotations:19.0.0")
annotationProcessor("org.spongepowered:mixin:0.8.5:processor")
annotationProcessor("net.fabricmc:sponge-mixin:0.13.4+mixin.0.8.5")

compileOnly("io.github.llamalad7:mixinextras-common:0.3.5")
annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5")
implementation(jarJar("io.github.llamalad7:mixinextras-forge:0.3.5")) {
jarJar.ranged(this, "[0.3.5,)")
}

// https://github.com/MinecraftForge/MinecraftForge/blob/7b782e5b05d0059836b39fa072d49f63679d1782/mdk/build.gradle#L143C5-L143C92
implementation("net.sf.jopt-simple:jopt-simple:5.0.4") { version { strictly("5.0.4") } }
}

minecraft {
Expand All @@ -29,12 +42,10 @@ minecraft {
mods {
create("badpackets") {
source(sourceSets["main"])
source(rootProject.sourceSets["main"])
}

create("badpackets_test") {
create("badpackets_testmod") {
source(sourceSets["testmod"])
source(rootProject.sourceSets["testmod"])
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions platform/forge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ cf.endpoint = minecraft.curseforge.com
cf.prefix = [Forge]
cf.releaseType = beta
cf.loader = Forge
cf.gameVersion = 1.20.4
cf.gameVersion = 1.20.6

# Modrinth
mr.releaseType = release
mr.releaseType = stable
mr.loader = forge
mr.gameVersion = 1.20.4
mr.gameVersion = 1.20.6

This file was deleted.

2 changes: 1 addition & 1 deletion platform/forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ logoFile = "badpackets.png"
[[dependencies.badpackets]]
modId = "minecraft"
mandatory = true
versionRange = "[1.20.4,)"
versionRange = "[1.20.6,)"
ordering = "NONE"
side = "BOTH"

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class ForgeBadPacketTest {

@SubscribeEvent
static void setup(FMLCommonSetupEvent event) {
BadPacketTest.server();
BadPacketTest.common();
}

}
4 changes: 0 additions & 4 deletions platform/neo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ tasks.processResources {
}
}

tasks.named<JavaCompile>("compileTestmodJava") {
source(rootProject.sourceSets["testmod"].allSource)
}

afterEvaluate {
val jar = tasks.jar.get()
val sourcesJar = tasks.sourcesJar.get()
Expand Down
4 changes: 2 additions & 2 deletions platform/neo/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ cf.endpoint = minecraft.curseforge.com
cf.prefix = [NeoForge]
cf.releaseType = beta
cf.loader = NeoForge
cf.gameVersion = 1.20.5
cf.gameVersion = 1.20.5, 1.20.6

# Modrinth
mr.releaseType = stable
mr.loader = neoforge
mr.gameVersion = 1.20.5
mr.gameVersion = 1.20.5, 1.20.6
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ fun platform(name: String) {
platform("mojmap")

platform("fabric")
//platform("forge")
platform("forge")
platform("neo")

0 comments on commit 86b9052

Please sign in to comment.