-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4a8883
commit f8e6703
Showing
21 changed files
with
197 additions
and
201 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
plugins { | ||
java | ||
} | ||
|
||
val modVersion: String by extra | ||
val minecraftVersion: String by extra | ||
|
||
subprojects { | ||
apply(plugin = "java") | ||
|
||
version = "$modVersion-$minecraftVersion" | ||
group = "net.tonimatasdev" | ||
|
||
base.archivesName.set("PacketFixer-" + project.name) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
@file:Suppress("UnstableApiUsage") | ||
|
||
plugins { | ||
id("fabric-loom") version "1.3-SNAPSHOT" | ||
} | ||
|
||
val loaderVersion: String by extra | ||
val yarnMappings: String by extra | ||
val modVersion: String by extra | ||
val minecraftVersion: String by extra | ||
|
||
dependencies { | ||
minecraft("com.mojang:minecraft:$minecraftVersion") | ||
mappings("net.fabricmc:yarn:$yarnMappings:v2") | ||
modImplementation("net.fabricmc:fabric-loader:$loaderVersion") | ||
|
||
} | ||
|
||
tasks.withType<ProcessResources> { | ||
val replaceProperties = mapOf("version" to modVersion, "minecraftVersion" to minecraftVersion) | ||
|
||
inputs.properties(replaceProperties) | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand(replaceProperties) | ||
} | ||
} | ||
|
||
tasks.withType<JavaCompile> { | ||
options.release.set(17) | ||
} | ||
|
||
java { | ||
withSourcesJar() | ||
|
||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
tasks.jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.base.archivesName.get()}"} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
plugins { | ||
id("net.minecraftforge.gradle") version "[6.0,6.2)" | ||
id("org.spongepowered.mixin") version "0.7-SNAPSHOT" | ||
id("idea") | ||
id("eclipse") | ||
} | ||
|
||
val modVersion: String by extra | ||
val minecraftVersion: String by extra | ||
val forgeVersion: String by extra | ||
val forgeVersionRange: String by extra | ||
|
||
group = "net.tonimatasdev" | ||
version = "$modVersion-$minecraftVersion" | ||
|
||
java { | ||
toolchain.languageVersion.set(JavaLanguageVersion.of(17)) | ||
withSourcesJar() | ||
} | ||
|
||
minecraft { | ||
mappings("official", minecraftVersion) | ||
|
||
copyIdeResources.set(true) | ||
|
||
runs { | ||
configureEach { | ||
workingDirectory(project.file("run")) | ||
property("forge.logging.markers", "REGISTRIES") | ||
property("forge.logging.console.level", "debug") | ||
|
||
mods { | ||
create("packetfixer") { | ||
source(sourceSets.main.get()) | ||
} | ||
} | ||
} | ||
|
||
create("client") { | ||
property("forge.enabledGameTestNamespaces", "packetfixer") | ||
} | ||
|
||
create("server") { | ||
property("forge.enabledGameTestNamespaces", "packetfixer") | ||
args("--nogui") | ||
} | ||
|
||
create("gameTestServer") { | ||
property("forge.enabledGameTestNamespaces", "packetfixer") | ||
} | ||
|
||
create("data") { | ||
workingDirectory(project.file("run-data")) | ||
args("--mod", "packetfixer", "--all", "--output", file("src/generated/resources/"), "--existing", file("src/main/resources/")) | ||
} | ||
} | ||
} | ||
|
||
mixin { | ||
add(sourceSets.main.get(), "packetfixer.refmap.json") | ||
config("packetfixer.mixins.json") | ||
} | ||
|
||
sourceSets.main.get().resources { srcDir("src/generated/resources") } | ||
|
||
repositories { | ||
|
||
} | ||
|
||
dependencies { | ||
minecraft("net.minecraftforge:forge:$minecraftVersion-$forgeVersion") | ||
annotationProcessor("org.spongepowered:mixin:0.8.5:processor") | ||
} | ||
|
||
|
||
|
||
tasks.withType<ProcessResources> { | ||
val replaceProperties = mapOf("forgeVersionRange" to forgeVersionRange, "version" to modVersion, "minecraftVersion" to minecraftVersion) | ||
|
||
inputs.properties(replaceProperties) | ||
|
||
filesMatching(listOf("META-INF/mods.toml", "pack.mcmeta")) { | ||
expand(replaceProperties) | ||
} | ||
} | ||
|
||
|
||
tasks.jar { | ||
manifest { | ||
attributes( | ||
"Specification-Title" to "PacketFixerForge", | ||
"Specification-Vendor" to "TonimatasDEV", | ||
"Specification-Version" to modVersion, | ||
"Implementation-Title" to "PacketFixerForge", | ||
"Implementation-Version" to modVersion, | ||
"Implementation-Vendor" to "TonimatasDEV" | ||
) | ||
} | ||
|
||
finalizedBy("reobfJar") | ||
} | ||
|
||
tasks.withType<JavaCompile> { | ||
options.encoding = "UTF-8" | ||
} |
2 changes: 1 addition & 1 deletion
2
...v/packetsizedoubler/PacketFixerForge.java → ...ev/packetfixerforge/PacketFixerForge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../ClientboundCustomPayloadPacketMixin.java → .../ClientboundCustomPayloadPacketMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/ClientboundCustomQueryPacketMixin.java → ...in/ClientboundCustomQueryPacketMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...oubler/mixin/CompressionDecoderMixin.java → ...rforge/mixin/CompressionDecoderMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...oubler/mixin/CompressionEncoderMixin.java → ...rforge/mixin/CompressionEncoderMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tsizedoubler/mixin/NbtAccounterMixin.java → ...etfixerforge/mixin/NbtAccounterMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...sizedoubler/mixin/PacketEncoderMixin.java → ...tfixerforge/mixin/PacketEncoderMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../ServerboundCustomPayloadPacketMixin.java → .../ServerboundCustomPayloadPacketMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/ServerboundCustomQueryPacketMixin.java → ...in/ServerboundCustomQueryPacketMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.