Reduce duplicate code (#18)
* Reduce duplicate code * Fix gradle task name * Revert name changes * Revert action name * Cleanup * Revert to java 17 * Fix generation * Cleanup * Simplify code of DGU * Remove unnecessary annotations * Remove unused var * Halt with error on error * Remove unused mixins * Update fabric loader * Ignore success result * Update gradle and use merged jar * Implement new client and server merged environment for running fabric * Set server run dir as asset dir * More cleanup * More cleanup 2 * More improvements * Remove more duplicate code * Use newer java methods * More cleanup * Remove SoundAccessors * More cleanup * Use java 21 for build * Initial work on 1.20.5 * Cleanup a lot of stuff * Do not generate mod jars to speed up builds * Override merger on now open classes directly * Use recommended approach * Readd custom merger * Working materials data generator * Fix inconsistencies * Fix collision order to be random * Use LinkedHashMap for more reproducibility * Fix imports
This commit is contained in:
+26
-42
@@ -1,47 +1,33 @@
|
||||
import xyz.wagyourtail.unimined.api.minecraft.task.RemapJarTask
|
||||
import xyz.wagyourtail.unimined.internal.minecraft.MinecraftProvider
|
||||
|
||||
plugins {
|
||||
id 'fabric-loom'
|
||||
id 'xyz.wagyourtail.unimined'
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "legacy-fabric"
|
||||
url = "https://maven.legacyfabric.net"
|
||||
unimined.minecraft {
|
||||
version "1.8.9"
|
||||
|
||||
mappings {
|
||||
legacyIntermediary()
|
||||
legacyYarn(541)
|
||||
|
||||
devFallbackNamespace "intermediary"
|
||||
}
|
||||
}
|
||||
|
||||
loom {
|
||||
setIntermediaryUrl('https://maven.legacyfabric.net/net/fabricmc/intermediary/%1$s/intermediary-%1$s-v2.jar');
|
||||
customMinecraftManifest.set("https://meta.legacyfabric.net/v2/manifest/${minecraft_version}")
|
||||
runs.config("server") {
|
||||
javaVersion = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
customPatcher(new CustomLegacyFabricMinecraftTransformer(project, delegate as MinecraftProvider)) {
|
||||
it.loader libs.versions.fabric.loader.get()
|
||||
}
|
||||
|
||||
defaultRemapJar = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
// Fabric API provides hooks for events, item registration, and more. As most mods will need this, it's included by default.
|
||||
// If you know for a fact you don't, it's not required and can be safely removed.
|
||||
// modImplementation ("net.legacyfabric.legacy-fabric-api:legacy-fabric-api:${fabric_version}") {
|
||||
// exclude module: "legacy-fabric-entity-events-v1"
|
||||
// }
|
||||
|
||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
|
||||
implementation 'org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209'
|
||||
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209'
|
||||
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209'
|
||||
}
|
||||
}
|
||||
|
||||
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
|
||||
configurations.configureEach {
|
||||
resolutionStrategy {
|
||||
dependencySubstitution {
|
||||
substitute module('org.lwjgl.lwjgl:lwjgl_util:2.9.2-nightly-201408222') with module('org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209')
|
||||
substitute module('org.lwjgl.lwjgl:lwjgl:2.9.2-nightly-201408222') with module('org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209')
|
||||
}
|
||||
force 'org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209'
|
||||
}
|
||||
}
|
||||
implementation project(":common")
|
||||
}
|
||||
|
||||
processResources {
|
||||
@@ -52,12 +38,10 @@ processResources {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(RemapJarTask).configureEach {
|
||||
onlyIf { false}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(17))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user