Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-add forge and update to 1.20.6 #7

Merged
merged 4 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
id 'java'
id 'eclipse'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '6.0.+'
id 'net.minecraftforge.gradle' version '6.0.23+'
id 'net.darkhax.curseforgegradle' version '1.+'
}
apply plugin: "com.modrinth.minotaur"
Expand All @@ -41,6 +41,8 @@ tasks.withType(GenerateModuleMetadata) {
enabled = false
}

minecraft.reobf = false

minecraft {
mappings channel: 'official', version: minecraft_version
runs {
Expand Down Expand Up @@ -132,8 +134,6 @@ task processDocs(type: Copy) {
into "$project.buildDir/doc"
}

jar.finalizedBy('reobfJar')

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down Expand Up @@ -179,7 +179,7 @@ task publishCurseForge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge)
mainFile.displayName = "${archivesBaseName}-${version}"
mainFile.releaseType = release_type
mainFile.addModLoader("Forge")
mainFile.addJavaVersion("Java 17")
mainFile.addJavaVersion("Java 21")
mainFile.addGameVersion("${project.minecraft_version}")
mainFile.changelogType = "html"
mainFile.changelog = file("$project.buildDir/doc/changelog.html")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ public ForgeNetworkHandler(Side side)

protected <T> void registerPacket(PacketContainer<T> container)
{
if (CHANNELS.get(container.packetClass()) == null)
if (CHANNELS.get(container.classType()) == null)
{
var channel = ChannelBuilder.named(container.packetIdentifier()).optional().eventNetworkChannel()
var channel =
ChannelBuilder.named(container.getType().id()).optional().eventNetworkChannel()
.addListener(event -> {
T message = container.decoder().apply(event.getPayload());
buildHandler(container.handler()).accept(message, event.getSource());
});
CHANNELS.put(container.packetClass(), new Message<>(channel, container.encoder()));
CHANNELS.put(container.classType(), new Message<>(channel, container.encoder()));
}
}

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Project
version=1.0.8-beta.2
version=1.0.8-beta.3
group_id=mysticdrew

curseforge_project_id=806044
modrinth_project_id=HIuqnQpi

# Common
minecraft_version=1.20.5
minecraft_version=1.20.6

# Forge
forge_version=49.0.39
forge_version=50.0.0

#neoforge
neoforge_version=20.5.5-beta
neoforge_version=20.6.10-beta

# Fabric
fabric_version=0.97.6+1.20.5
fabric_version=0.97.7+1.20.6
fabric_loader_version=0.15.10

# Mod options
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ plugins {
rootProject.name = 'common-networking'
include("common")
include("fabric")
//include("forge")
include("forge")
include("neoforge")

Loading