Start revamping the build script
This commit is contained in:
+6
-29
@@ -1,31 +1,3 @@
|
||||
# eclipse
|
||||
bin
|
||||
*.launch
|
||||
.settings
|
||||
.metadata
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# idea
|
||||
out
|
||||
*.ipr
|
||||
*.iws
|
||||
*.iml
|
||||
.idea
|
||||
|
||||
# gradle
|
||||
build
|
||||
.gradle
|
||||
|
||||
# other
|
||||
eclipse
|
||||
run
|
||||
|
||||
# Files from Forge MDK
|
||||
logs
|
||||
forge*changelog.txt
|
||||
|
||||
.architectury-transformer/
|
||||
build/
|
||||
*.ipr
|
||||
run/
|
||||
@@ -36,6 +8,7 @@ out/
|
||||
output/
|
||||
bin/
|
||||
libs/
|
||||
.architectury-transformer/
|
||||
|
||||
.classpath
|
||||
.project
|
||||
@@ -45,6 +18,7 @@ classes/
|
||||
.vscode
|
||||
.settings
|
||||
*.launch
|
||||
hs_err_pid*
|
||||
|
||||
**/src/generated/
|
||||
Merged/
|
||||
@@ -53,4 +27,7 @@ Merged/
|
||||
*.bak
|
||||
|
||||
# file genearated via MC version switching using preprocessor
|
||||
build.properties
|
||||
build.properties
|
||||
|
||||
# This accesswidener is generated at runtime ant not needed
|
||||
common/src/main/resources/lod.accesswidener
|
||||
|
||||
@@ -100,15 +100,14 @@ If running in an IDE, to ensure the IDE noticed the version change, run a gradle
|
||||
1. Download and extract the zip of the project
|
||||
2. Download the core from https://gitlab.com/jeseibel/distant-horizons-core and extract into a folder called `core`
|
||||
3. Open a command line in the project folder
|
||||
4. Run the commands: `./gradlew assemble` and `./gradlew mergeJars`
|
||||
4. Run the commands: `./gradlew assemble`
|
||||
6. The compiled jar file will be in the folder `Merged`
|
||||
|
||||
**If in terminal:**
|
||||
1. `git clone --recurse-submodules https://gitlab.com/jeseibel/minecraft-lod-mod.git`
|
||||
2. `cd minecraft-lod-mod`
|
||||
3. `./gradlew assemble`
|
||||
4. `./gradlew mergeJars`
|
||||
5. The compiled jar file will be in the folder `Merged`
|
||||
4. The compiled jar file will be in the folder `Merged`
|
||||
|
||||
>Note: You can add the arg: `-PmcVer=1.?` to tell gradle to build a selected MC version instead of having to manually modify the `gradle.properties` file.
|
||||
|
||||
@@ -151,8 +150,8 @@ To build all versions: `./buildAll` (all builds will end up in the `Merged` fold
|
||||
XZ for Java (data compression)\
|
||||
https://tukaani.org/xz/java.html
|
||||
|
||||
DHJarMerger (To merge multiple mod versions into one jar)\
|
||||
https://github.com/Ran-helo/DHJarMerger
|
||||
Forgix (To merge multiple mod versions into one jar) [_Used to be_ [_DHJarMerger_](https://github.com/Ran-helo/DHJarMerger)]\
|
||||
https://github.com/PacifistMC/Forgix
|
||||
|
||||
Toml for Java (config handling)\
|
||||
https://github.com/TheElectronWill/night-config
|
||||
|
||||
+125
-149
@@ -1,23 +1,16 @@
|
||||
import io.github.ran.jarmerger.JarMergerPlugin
|
||||
|
||||
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath files('plugins/DHJarMerger-1.0.jar')
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
// Plugin to help in developing multi-loader mods
|
||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||
id "dev.architectury.loom" version "0.12.0-SNAPSHOT" apply false
|
||||
|
||||
// Plugin to handle dependencies
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0' apply false
|
||||
|
||||
// Plugin to create merged jars
|
||||
id "io.github.pacifistmc.forgix" version "1.2.2"
|
||||
|
||||
// Provides mc libraries to core
|
||||
id 'org.spongepowered.gradle.vanilla' version '0.2.1-SNAPSHOT' apply false
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,116 +93,128 @@ def loadProperties() {
|
||||
"1.19": "1_19"
|
||||
]
|
||||
// Use this as sometimes multiple versions use the same access wideners
|
||||
rootProject.ext.set("acsessWidenerVersion", mcVersionToAcsessWidenerVersion.get(mcVersion))
|
||||
rootProject.ext.set("accessWidenerVersion", mcVersionToAcsessWidenerVersion.get(mcVersion))
|
||||
}
|
||||
loadProperties()
|
||||
|
||||
apply plugin: JarMergerPlugin
|
||||
// Sets up the accesswideners
|
||||
def makeAccessWidener() {
|
||||
def accessWidenerFile = project(":common").file("src/main/resources/lod.accesswidener")
|
||||
if (accessWidenerFile.exists()) {
|
||||
delete accessWidenerFile
|
||||
}
|
||||
|
||||
copy {
|
||||
from project(":common").file("src/main/resources/${rootProject.accessWidenerVersion}.lod.accesswidener")
|
||||
into project(":common").file("src/main/resources/")
|
||||
rename "${rootProject.accessWidenerVersion}.lod.accesswidener", "lod.accesswidener"
|
||||
}
|
||||
}
|
||||
makeAccessWidener()
|
||||
|
||||
|
||||
|
||||
|
||||
// Sets up the version string
|
||||
rootProject.versionStr = rootProject.mod_version + "-" + rootProject.minecraft_version + "-" + new Date().format("yyyy_MM_dd_HH_mm")
|
||||
|
||||
// Merged jar settings
|
||||
forgix {
|
||||
group = "com.seibel.lod"
|
||||
mergedJarName = "DistantHorizons-${rootProject.versionStr}.jar"
|
||||
|
||||
forge {
|
||||
jarLocation = "build/libs/DistantHorizons-${rootProject.versionStr}.jar"
|
||||
}
|
||||
|
||||
fabric {
|
||||
jarLocation = "build/libs/DistantHorizons-${rootProject.versionStr}.jar"
|
||||
}
|
||||
}
|
||||
|
||||
architectury {
|
||||
minecraft = rootProject.minecraft_version
|
||||
}
|
||||
|
||||
|
||||
subprojects { p ->
|
||||
apply plugin: "com.github.johnrengelman.shadow"
|
||||
apply plugin: "dev.architectury.loom"
|
||||
if (p == project(":core"))
|
||||
if (p == project(":core")) {
|
||||
apply plugin: "application"
|
||||
apply plugin: "org.spongepowered.gradle.vanilla" // Provides minecraft libraries
|
||||
apply plugin: "com.github.johnrengelman.shadow"
|
||||
} else {
|
||||
apply plugin: "dev.architectury.loom"
|
||||
apply plugin: "com.github.johnrengelman.shadow"
|
||||
|
||||
loom {
|
||||
silentMojangMappingsLicense()
|
||||
|
||||
if (p != project(":core")) {
|
||||
accessWidenerPath.set(project(":common").file("src/main/resources/${acsessWidenerVersion}.lod.accesswidener"))
|
||||
loom {
|
||||
silentMojangMappingsLicense()
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
common
|
||||
shadowMe
|
||||
implementation.extendsFrom shadowMe
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
|
||||
// The following line declares the mojmap mappings & parchment mappings
|
||||
mappings loom.layered() {
|
||||
// Mojmap mappings
|
||||
officialMojangMappings()
|
||||
// Parchment mappings (it adds parameter mappings & javadoc)
|
||||
if (rootProject.minecraft_version != "1.19")
|
||||
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
|
||||
else // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping
|
||||
parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip")
|
||||
if (p == project(":core")) {
|
||||
// Sets up minecraft for core
|
||||
minecraft {
|
||||
version("${rootProject.minecraft_version}")
|
||||
}
|
||||
|
||||
// Manifold
|
||||
annotationProcessor "systems.manifold:manifold-preprocessor:${rootProject.manifold_version}"
|
||||
// Sets the main standalone jar entrypoint
|
||||
application {
|
||||
mainClass.set('com.seibel.lod.core.JarMain')
|
||||
}
|
||||
}
|
||||
|
||||
// Toml & Json for config
|
||||
implementation("com.electronwill.night-config:toml:${rootProject.toml_version}")
|
||||
implementation("com.googlecode.json-simple:json-simple:${rootProject.json_version}")
|
||||
dependencies {
|
||||
// Sets up minecraft for projects other than core
|
||||
if (p != project(":core")) {
|
||||
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}"
|
||||
// The following line declares the mojmap mappings & parchment mappings
|
||||
mappings loom.layered() {
|
||||
// Mojmap mappings
|
||||
officialMojangMappings()
|
||||
// Parchment mappings (it adds parameter mappings & javadoc)
|
||||
if (rootProject.minecraft_version != "1.19")
|
||||
parchment("org.parchmentmc.data:parchment-${rootProject.minecraft_version}:${rootProject.parchment_version}@zip")
|
||||
else // As 1.19 dosnt have parchment mappings yet, we use 1.18.2 mapping
|
||||
parchment("org.parchmentmc.data:parchment-1.18.2:${rootProject.parchment_version}@zip")
|
||||
}
|
||||
}
|
||||
|
||||
// Theming
|
||||
implementation("com.formdev:flatlaf:${rootProject.flatlaf_version}")
|
||||
// svg
|
||||
implementation("com.formdev:flatlaf-extras:${rootProject.flatlaf_version}")
|
||||
implementation("com.formdev:svgSalamander:${rootProject.svgSalamander_version}")
|
||||
// Manifold
|
||||
annotationProcessor "systems.manifold:manifold-preprocessor:${rootProject.manifold_version}"
|
||||
|
||||
// JUnit tests
|
||||
implementation("org.junit.jupiter:junit-jupiter:5.8.2")
|
||||
implementation("org.junit.jupiter:junit-jupiter-engine:5.8.2")
|
||||
|
||||
// Compression
|
||||
shadowMe 'org.tukaani:xz:1.9'
|
||||
shadowMe 'org.apache.commons:commons-compress:1.21'
|
||||
|
||||
if (p == project(":core") || p == project(":fabric") || p == project(":forge")) {
|
||||
// Compression
|
||||
common 'org.tukaani:xz:1.9'
|
||||
common 'org.apache.commons:commons-compress:1.21'
|
||||
shadowMe 'org.tukaani:xz:1.9'
|
||||
shadowMe 'org.apache.commons:commons-compress:1.21'
|
||||
// Toml & Json for config
|
||||
shadowMe("com.electronwill.night-config:toml:${rootProject.toml_version}") {}
|
||||
shadowMe("com.googlecode.json-simple:json-simple:${rootProject.json_version}") {}
|
||||
// Theming
|
||||
shadowMe("com.formdev:flatlaf:${rootProject.flatlaf_version}")
|
||||
// svg
|
||||
shadowMe("com.formdev:flatlaf-extras:${rootProject.flatlaf_version}")
|
||||
shadowMe("com.formdev:svgSalamander:${rootProject.svgSalamander_version}")
|
||||
// Toml & Json for config
|
||||
shadowMe "com.electronwill.night-config:toml:${rootProject.toml_version}"
|
||||
shadowMe("com.googlecode.json-simple:json-simple:${rootProject.json_version}") {
|
||||
// Remove Junit test libraries
|
||||
exclude group: "junit", module: "junit"
|
||||
}
|
||||
|
||||
if (p != project(":forge")) {
|
||||
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
|
||||
// Do NOT use other classes from fabric loader unless working with fabric
|
||||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||
}
|
||||
// Theming
|
||||
shadowMe "com.formdev:flatlaf:${rootProject.flatlaf_version}"
|
||||
|
||||
// SVG
|
||||
shadowMe "com.formdev:flatlaf-extras:${rootProject.flatlaf_version}"
|
||||
shadowMe "com.formdev:svgSalamander:${rootProject.svgSalamander_version}"
|
||||
|
||||
if (p != project(":core"))
|
||||
common(project(":core")) { transitive false }
|
||||
if (p == project(":common"))
|
||||
shadowMe(project(":core")) { transitive false }
|
||||
}
|
||||
|
||||
if (p == project(":core") || p == project(":fabric") || p == project(":forge")) {
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowMe]
|
||||
|
||||
// Compression
|
||||
relocate 'org.tukaani', 'shaded.tukaani'
|
||||
relocate 'org.apache.commons.compress', 'shaded.apache.commons.compress'
|
||||
// Toml & Json for config
|
||||
relocate 'com.electronwill.nightconfig', 'shaded.electronwill.nightconfig'
|
||||
relocate 'com.googlecode.json-simple', 'shaded.googlecode.json-simple' // FIXME: This is a massive library that is located in lots of different spots
|
||||
// Theming
|
||||
relocate 'com.formdev.flatlaf', 'shaded.formdev.flatlaf'
|
||||
// svg
|
||||
relocate 'com.kitfox.svg', 'shared.kitfox.svg'
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
// Add the core project as a dependency
|
||||
if (p != project(":core")) {
|
||||
shadowMe(project(":core")) {
|
||||
// Remove Junit test libraries
|
||||
exclude group: "org.junit.jupiter", module: "junit-jupiter"
|
||||
exclude group: "org.junit.jupiter", module: "junit-jupiter-engine"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,11 +226,10 @@ subprojects { p ->
|
||||
'Main-Class': 'com.seibel.lod.core.JarMain' // When changing the main of the jar change this line
|
||||
}
|
||||
}
|
||||
if (p == project(":core")) {
|
||||
application {
|
||||
mainClass.set('com.seibel.lod.core.JarMain')
|
||||
}
|
||||
}
|
||||
|
||||
// Run mergeJars when running build
|
||||
build.finalizedBy(mergeJars)
|
||||
assemble.finalizedBy(mergeJars)
|
||||
}
|
||||
|
||||
allprojects { p ->
|
||||
@@ -237,7 +241,6 @@ allprojects { p ->
|
||||
version = rootProject.mod_version
|
||||
group = rootProject.maven_group
|
||||
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
@@ -270,6 +273,12 @@ allprojects { p ->
|
||||
}
|
||||
}
|
||||
|
||||
// Required for ModMenu
|
||||
maven { url "https://maven.terraformersmc.com/" }
|
||||
|
||||
// Required for Mixins & VanillaGradle
|
||||
maven { url "https://repo.spongepowered.org/maven/" }
|
||||
|
||||
// These 2 are for importing mods that arnt on CursedForge, Modrinth, GitHub, GitLab or anywhere opensource
|
||||
flatDir {
|
||||
dirs "${rootDir}/mods/fabric"
|
||||
@@ -285,7 +294,6 @@ allprojects { p ->
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Put stuff from gradle.properties into the mod info
|
||||
processResources {
|
||||
def resourceTargets = ["fabric.mod.json", "META-INF/mods.toml"] // Location of where to put
|
||||
@@ -324,71 +332,39 @@ allprojects { p ->
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Copies the correct accesswidener and renames it
|
||||
task copyAccessWidener(type: Copy) {
|
||||
from project(":common").file("src/main/resources/${rootProject.acsessWidenerVersion}.lod.accesswidener")
|
||||
into(file(p.file("build/resources/main")))
|
||||
rename "${rootProject.acsessWidenerVersion}.lod.accesswidener", "lod.accesswidener"
|
||||
}
|
||||
|
||||
task copyCoreResources(type: Copy) {
|
||||
from fileTree(project(":core").file("src/main/resources"))
|
||||
into p.file("build/resources/main")
|
||||
}
|
||||
|
||||
task copyCommonResources(type: Copy) {
|
||||
from fileTree(project(":common").file("src/main/resources"))
|
||||
into p.file("build/resources/main")
|
||||
}
|
||||
|
||||
|
||||
// Is this necessary for running the fabric build
|
||||
if (p == project(":common")) {
|
||||
println "Copying [common/src/main/resources/${acsessWidenerVersion}.lod.accesswidner] to [fabric/build/resources/main]."
|
||||
|
||||
copy {
|
||||
from project(":common").file("src/main/resources/${acsessWidenerVersion}.lod.accesswidener")
|
||||
into project(":fabric").file("build/resources/main")
|
||||
rename "${acsessWidenerVersion}.lod.accesswidener", "lod.accesswidener"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
// Add Manifold Preprocessor
|
||||
// def excapedMCVersion = rootProject.minecraft_version.replace(".", "_")
|
||||
// options.compilerArgs += ['-Xplugin:Manifold', "-AMC_VERSION_${excapedMCVersion}"]
|
||||
//
|
||||
//options.compilerArgs += ['-deprecation']
|
||||
//options.compilerArgs += ['-verbose']
|
||||
//options.compilerArgs += ['-Xlint:unchecked']
|
||||
//options.compilerArgs += ['-Xdiags:verbose']
|
||||
//options.compilerArgs += ['-Xprint']
|
||||
//options.compilerArgs += ['-XprintProcessorInfo']
|
||||
//options.compilerArgs += ['-XprintRounds']
|
||||
|
||||
// println options.compilerArgs
|
||||
|
||||
// Set the java version
|
||||
if (p != project(":core")) {
|
||||
options.release = rootProject.java_version as Integer
|
||||
options.compilerArgs += ['-Xplugin:Manifold']
|
||||
} else {
|
||||
options.release = 8; // Core should use Java 8 no matter what
|
||||
// options.release = 8; // Core should use Java 8 no matter what
|
||||
// No it shouldn't cause it fails to find minecraft if it uses Java 8
|
||||
options.release = rootProject.java_version as Integer
|
||||
}
|
||||
options.encoding = "UTF-8" // Not requred but better to have
|
||||
|
||||
// TODO: make everything use java 8
|
||||
// options.release = 8 // Use Java 8 for everything so back porting is easier
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
java {
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
// Disable running the core and common
|
||||
if (p == project(":core") || p == project(":common")) {
|
||||
// Disable running common
|
||||
if (p == project(":common")) {
|
||||
runClient.enabled = false
|
||||
runServer.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the merged folder when running clean
|
||||
task cleanMergedJars() {
|
||||
def mergedFolder = file("Merged")
|
||||
if (mergedFolder.exists()) {
|
||||
delete mergedFolder
|
||||
}
|
||||
}
|
||||
tasks.getByName("clean").finalizedBy(cleanMergedJars)
|
||||
@@ -4,7 +4,6 @@ buildVersion()
|
||||
{
|
||||
./gradlew clean -PmcVer=$1 --no-daemon
|
||||
./gradlew build -PmcVer=$1 --no-daemon
|
||||
./gradlew mergeJars -PmcVer=$1 --no-daemon
|
||||
}
|
||||
|
||||
buildVersion 1.19
|
||||
|
||||
@@ -12,6 +12,5 @@ EXIT /B %ERRORLEVEL%
|
||||
@echo on
|
||||
call ./gradlew.bat clean -PmcVer="%~1" --no-daemon
|
||||
call ./gradlew.bat build -PmcVer="%~1" --no-daemon
|
||||
call ./gradlew.bat mergeJars -PmcVer="%~1" --no-daemon
|
||||
@echo off
|
||||
EXIT /B 0
|
||||
|
||||
+9
-1
@@ -2,7 +2,15 @@ architectury {
|
||||
common(rootProject.enabled_platforms.split(","))
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/lod.accesswidener")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies
|
||||
// Do NOT use other classes from fabric loader
|
||||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
|
||||
|
||||
if (minecraft_version == "1.16.5") {
|
||||
modApi("me.shedaniel:architectury:${rootProject.architectury_version}")
|
||||
} else {
|
||||
@@ -22,4 +30,4 @@ publishing {
|
||||
repositories {
|
||||
// Add repositories to publish to here.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"accessWidener": "lod.accesswidener"
|
||||
}
|
||||
+41
-37
@@ -1,28 +1,27 @@
|
||||
version = rootProject.mod_version+"-"+rootProject.minecraft_version+"-"+new Date().format("yyyy_MM_dd_HH_mm")
|
||||
version = rootProject.versionStr
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
fabric()
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||
}
|
||||
|
||||
configurations {
|
||||
// TODO: Add the commented things once we update architectury to 11 or higher
|
||||
// common
|
||||
// shadowCommon
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentFabric.extendsFrom common
|
||||
|
||||
// The addModJar basically embeds the mod to the built jar
|
||||
addModJar
|
||||
include.extendsFrom addModJar
|
||||
modImplementation.extendsFrom addModJar
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Required for ModMenu
|
||||
maven { url "https://maven.terraformersmc.com/" }
|
||||
}
|
||||
|
||||
def addMod(path, enabled) {
|
||||
if (enabled == "2")
|
||||
dependencies { modImplementation(path) }
|
||||
@@ -90,13 +89,41 @@ dependencies {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
shadowMe(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }
|
||||
}
|
||||
|
||||
// Ran's scuffed 1.19 stuff
|
||||
shadowMe files(project(":core").file("build/libs/DistantHorizons-${rootProject.mod_version}.jar"))
|
||||
shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon, project.configurations.shadowMe]
|
||||
|
||||
// Compression
|
||||
relocate 'org.tukaani', 'distanthorizons.libraries.tukaani'
|
||||
relocate 'org.apache.commons.compress', 'distanthorizons.libraries.apache.commons.compress'
|
||||
|
||||
// Toml & Json for config
|
||||
relocate 'com.electronwill.nightconfig', 'distanthorizons.libraries.electronwill.nightconfig'
|
||||
|
||||
// FIXME: This is a massive library that is located in lots of different spots
|
||||
relocate 'com.googlecode.json-simple', 'distanthorizons.libraries.googlecode.json-simple'
|
||||
relocate 'org.json.simple', 'distanthorizons.libraries.json.simple'
|
||||
|
||||
// Theming
|
||||
relocate 'com.formdev.flatlaf', 'distanthorizons.libraries.formdev.flatlaf'
|
||||
|
||||
// SVG
|
||||
relocate 'com.kitfox.svg', 'distanthorizons.libraries.kitfox.svg'
|
||||
|
||||
classifier "dev-shadow"
|
||||
mergeServiceFiles()
|
||||
}
|
||||
|
||||
remapJar {
|
||||
injectAccessWidener = true
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
}
|
||||
|
||||
task deleteResources(type: Delete) {
|
||||
@@ -104,38 +131,15 @@ task deleteResources(type: Delete) {
|
||||
}
|
||||
|
||||
processResources {
|
||||
dependsOn(copyAccessWidener)
|
||||
dependsOn(copyCoreResources)
|
||||
dependsOn(copyCommonResources)
|
||||
}
|
||||
|
||||
// Ran's scuffed 1.19 stuff
|
||||
jar.dependsOn(project(":core").remapJar)
|
||||
remapSourcesJar.dependsOn(project(":core").remapJar)
|
||||
|
||||
runClient {
|
||||
dependsOn(copyAccessWidener)
|
||||
dependsOn(copyCoreResources)
|
||||
dependsOn(copyCommonResources)
|
||||
jvmArgs "-XX:-OmitStackTraceInFastThrow"
|
||||
finalizedBy(deleteResources)
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowMe]
|
||||
|
||||
// Our own code
|
||||
relocate 'com.seibel.lod.common', 'fabric.com.seibel.lod.common'
|
||||
|
||||
classifier "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
}
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.fabric;
|
||||
package com.seibel.lod;
|
||||
|
||||
import com.seibel.lod.common.wrappers.DependencySetup;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric;
|
||||
package com.seibel.lod;
|
||||
|
||||
import com.seibel.lod.common.wrappers.McObjectConverter;
|
||||
import com.seibel.lod.common.wrappers.world.LevelWrapper;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.fabric;
|
||||
package com.seibel.lod;
|
||||
|
||||
import com.seibel.lod.common.wrappers.DependencySetup;
|
||||
import com.seibel.lod.common.wrappers.minecraft.MinecraftDedicatedServerWrapper;
|
||||
+5
-5
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric;
|
||||
package com.seibel.lod;
|
||||
|
||||
import com.seibel.lod.common.LodCommonMain;
|
||||
import com.seibel.lod.core.ModInfo;
|
||||
@@ -28,10 +28,10 @@ import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IOptifineAccessor;
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.ISodiumAccessor;
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IStarlightAccessor;
|
||||
import com.seibel.lod.fabric.wrappers.modAccessor.OptifineAccessor;
|
||||
import com.seibel.lod.fabric.wrappers.modAccessor.SodiumAccessor;
|
||||
import com.seibel.lod.fabric.wrappers.modAccessor.StarlightAccessor;
|
||||
import com.seibel.lod.fabric.wrappers.FabricDependencySetup;
|
||||
import com.seibel.lod.wrappers.modAccessor.OptifineAccessor;
|
||||
import com.seibel.lod.wrappers.modAccessor.SodiumAccessor;
|
||||
import com.seibel.lod.wrappers.modAccessor.StarlightAccessor;
|
||||
import com.seibel.lod.wrappers.FabricDependencySetup;
|
||||
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.fabric;
|
||||
package com.seibel.lod;
|
||||
|
||||
import com.seibel.lod.common.networking.Networking;
|
||||
import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
|
||||
import com.seibel.lod.common.wrappers.world.LevelWrapper;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.fabric.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.common.wrappers.world.LevelWrapper;
|
||||
import com.seibel.lod.core.api.internal.a7.ClientApi;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.forge.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.core.logging.f3.F3Screen;
|
||||
import net.minecraft.client.gui.components.DebugScreenOverlay;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.core.config.Config;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.fabric.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.core.api.internal.a7.ClientApi;
|
||||
import com.seibel.lod.core.api.internal.a7.SharedApi;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Matrix4f;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.forge.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
|
||||
import com.mojang.blaze3d.platform.NativeImage;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.common.wrappers.config.GetConfigScreen;
|
||||
import com.seibel.lod.common.wrappers.config.TexturedButtonWidget;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.events;
|
||||
package com.seibel.lod.mixins.events;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.events;
|
||||
package com.seibel.lod.mixins.events;
|
||||
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.server;
|
||||
package com.seibel.lod.mixins.server;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.fabric.mixins.server;
|
||||
package com.seibel.lod.mixins.server;
|
||||
|
||||
import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
|
||||
import com.seibel.lod.common.wrappers.world.LevelWrapper;
|
||||
+2
-2
@@ -17,12 +17,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.server;
|
||||
package com.seibel.lod.mixins.server;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import com.seibel.lod.fabric.FabricServerProxy;
|
||||
import com.seibel.lod.FabricServerProxy;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.mixins.server.unsafe;
|
||||
package com.seibel.lod.mixins.server.unsafe;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
+2
-2
@@ -17,11 +17,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.wrappers;
|
||||
package com.seibel.lod.wrappers;
|
||||
|
||||
import com.seibel.lod.core.handlers.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
|
||||
import com.seibel.lod.fabric.wrappers.modAccessor.ModChecker;
|
||||
import com.seibel.lod.wrappers.modAccessor.ModChecker;
|
||||
|
||||
/**
|
||||
* Binds all necessary dependencies, so we
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.wrappers.config;
|
||||
package com.seibel.lod.wrappers.config;
|
||||
|
||||
import com.seibel.lod.common.wrappers.config.ConfigScreenMC;
|
||||
import com.seibel.lod.common.wrappers.config.GetConfigScreen;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.wrappers.modAccessor;
|
||||
package com.seibel.lod.wrappers.modAccessor;
|
||||
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.wrappers.modAccessor;
|
||||
package com.seibel.lod.wrappers.modAccessor;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.wrappers.modAccessor;
|
||||
package com.seibel.lod.wrappers.modAccessor;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.stream.Collectors;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.fabric.wrappers.modAccessor;
|
||||
package com.seibel.lod.wrappers.modAccessor;
|
||||
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IStarlightAccessor;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "com.seibel.lod.fabric.mixins",
|
||||
"package": "com.seibel.lod.mixins",
|
||||
"mixins": [
|
||||
"server.unsafe.MixinThreadingDetector",
|
||||
"server.MixinChunkGenerator",
|
||||
@@ -19,22 +19,21 @@
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"client": [
|
||||
"com.seibel.lod.fabric.FabricClientMain"
|
||||
"com.seibel.lod.FabricClientMain"
|
||||
],
|
||||
"server": [
|
||||
"com.seibel.lod.fabric.FabricDedicatedServerMain"
|
||||
"com.seibel.lod.FabricDedicatedServerMain"
|
||||
],
|
||||
|
||||
"modmenu": [
|
||||
"com.seibel.lod.fabric.wrappers.config.ModMenuIntegration"
|
||||
"com.seibel.lod.wrappers.config.ModMenuIntegration"
|
||||
]
|
||||
},
|
||||
|
||||
"mixins": [
|
||||
"fabric.lod.mixins.json"
|
||||
"DistantHorizons.mixins.json"
|
||||
],
|
||||
|
||||
"accessWidener" : "lod.accesswidener",
|
||||
"depends": {
|
||||
"fabricloader": "*",
|
||||
"fabric-api-base": "*",
|
||||
|
||||
+35
-23
@@ -1,22 +1,31 @@
|
||||
version = rootProject.mod_version+"-"+rootProject.minecraft_version+"-"+new Date().format("yyyy_MM_dd_HH_mm")
|
||||
version = rootProject.versionStr
|
||||
|
||||
loom {
|
||||
forge {
|
||||
convertAccessWideners.set(true)
|
||||
extraAccessWideners.add("lod.accesswidener")
|
||||
mixinConfigs("lod.mixins.json")
|
||||
mixinConfigs("DistantHorizons.mixins.json")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
architectury {
|
||||
platformSetupLoomIde()
|
||||
forge()
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = project(":common").loom.accessWidenerPath
|
||||
|
||||
forge {
|
||||
convertAccessWideners = true
|
||||
extraAccessWideners.add loom.accessWidenerPath.get().asFile.name
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
// TODO: Add the commented things once we update architectury to 11 or higher
|
||||
// common
|
||||
// shadowCommon
|
||||
common
|
||||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
||||
compileClasspath.extendsFrom common
|
||||
runtimeClasspath.extendsFrom common
|
||||
developmentForge.extendsFrom common
|
||||
@@ -47,34 +56,37 @@ dependencies {
|
||||
addMod("curse.maven:TerraForged-363820:${rootProject.terraforged_version}", rootProject.enable_terraforged)
|
||||
|
||||
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
||||
shadowMe(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
|
||||
|
||||
// Ran's scuffed 1.19 stuff
|
||||
shadowMe files(project(":core").file("build/libs/DistantHorizons-${rootProject.mod_version}.jar"))
|
||||
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive false }
|
||||
}
|
||||
|
||||
processResources {
|
||||
dependsOn(copyAccessWidener)
|
||||
dependsOn(copyCoreResources)
|
||||
dependsOn(copyCommonResources)
|
||||
}
|
||||
|
||||
// Ran's scuffed 1.19 stuff
|
||||
jar.dependsOn(project(":core").remapJar)
|
||||
remapSourcesJar.dependsOn(project(":core").remapJar)
|
||||
|
||||
shadowJar {
|
||||
// Remove the fabric stuff from forge
|
||||
dependencies {
|
||||
exclude(dependency("net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"))
|
||||
}
|
||||
exclude "fabric.mod.json"
|
||||
configurations = [project.configurations.shadowMe]
|
||||
exclude "architectury.common.json"
|
||||
|
||||
// Our own code
|
||||
relocate 'com.seibel.lod.common', 'forge.com.seibel.lod.common'
|
||||
configurations = [project.configurations.shadowCommon, project.configurations.shadowMe]
|
||||
|
||||
// Compression
|
||||
relocate 'org.tukaani', 'distanthorizons.libraries.tukaani'
|
||||
relocate 'org.apache.commons.compress', 'distanthorizons.libraries.apache.commons.compress'
|
||||
|
||||
// Toml & Json for config
|
||||
relocate 'com.electronwill.nightconfig', 'distanthorizons.libraries.electronwill.nightconfig'
|
||||
|
||||
// FIXME: This is a massive library that is located in lots of different spots
|
||||
relocate 'com.googlecode.json-simple', 'distanthorizons.libraries.googlecode.json-simple'
|
||||
relocate 'org.json.simple', 'distanthorizons.libraries.json.simple'
|
||||
|
||||
// Theming
|
||||
relocate 'com.formdev.flatlaf', 'distanthorizons.libraries.formdev.flatlaf'
|
||||
|
||||
// svg
|
||||
relocate 'com.kitfox.svg', 'distanthorizons.libraries.kitfox.svg'
|
||||
|
||||
classifier "dev-shadow"
|
||||
mergeServiceFiles()
|
||||
}
|
||||
|
||||
remapJar {
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge;
|
||||
package com.seibel.lod;
|
||||
|
||||
import com.seibel.lod.common.wrappers.world.LevelWrapper;
|
||||
import com.seibel.lod.core.api.internal.a7.ClientApi;
|
||||
+3
-3
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge;
|
||||
package com.seibel.lod;
|
||||
|
||||
import com.seibel.lod.common.LodCommonMain;
|
||||
import com.seibel.lod.common.forge.LodForgeMethodCaller;
|
||||
@@ -30,9 +30,9 @@ import com.seibel.lod.core.handlers.dependencyInjection.ModAccessorInjector;
|
||||
import com.seibel.lod.core.handlers.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.lod.core.logging.DhLoggerBuilder;
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IOptifineAccessor;
|
||||
import com.seibel.lod.forge.wrappers.ForgeDependencySetup;
|
||||
import com.seibel.lod.wrappers.ForgeDependencySetup;
|
||||
|
||||
import com.seibel.lod.forge.wrappers.modAccessor.OptifineAccessor;
|
||||
import com.seibel.lod.wrappers.modAccessor.OptifineAccessor;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.core.Direction;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.forge;
|
||||
package com.seibel.lod;
|
||||
|
||||
import com.seibel.lod.common.networking.Networking;
|
||||
import com.seibel.lod.common.wrappers.chunk.ChunkWrapper;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.fabric.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.core.logging.f3.F3Screen;
|
||||
import net.minecraft.client.gui.components.DebugScreenOverlay;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.core.config.Config;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.forge.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.core.api.internal.a7.ClientApi;
|
||||
import com.seibel.lod.core.api.internal.a7.SharedApi;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.math.Matrix4f;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.fabric.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
|
||||
import com.mojang.blaze3d.platform.NativeImage;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.mixins.client;
|
||||
package com.seibel.lod.mixins.client;
|
||||
|
||||
import com.seibel.lod.common.wrappers.config.GetConfigScreen;
|
||||
import com.seibel.lod.common.wrappers.config.TexturedButtonWidget;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.mixins.server;
|
||||
package com.seibel.lod.mixins.server;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.seibel.lod.forge.mixins.server;
|
||||
package com.seibel.lod.mixins.server;
|
||||
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.mixins.server;
|
||||
package com.seibel.lod.mixins.server;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.function.Supplier;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.mixins.server.unsafe;
|
||||
package com.seibel.lod.mixins.server.unsafe;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
#if POST_MC_1_18_1
|
||||
|
||||
+2
-2
@@ -17,11 +17,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.wrappers;
|
||||
package com.seibel.lod.wrappers;
|
||||
|
||||
import com.seibel.lod.core.handlers.dependencyInjection.SingletonInjector;
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
|
||||
import com.seibel.lod.forge.wrappers.modAccessor.ModChecker;
|
||||
import com.seibel.lod.wrappers.modAccessor.ModChecker;
|
||||
|
||||
/**
|
||||
* Binds all necessary dependencies so we
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.wrappers.modAccessor;
|
||||
package com.seibel.lod.wrappers.modAccessor;
|
||||
|
||||
import com.seibel.lod.core.wrapperInterfaces.modAccessor.IModChecker;
|
||||
import net.minecraftforge.fml.ModList;
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.forge.wrappers.modAccessor;
|
||||
package com.seibel.lod.wrappers.modAccessor;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0.8",
|
||||
"package": "com.seibel.lod.forge.mixins",
|
||||
"package": "com.seibel.lod.mixins",
|
||||
"mixins": [
|
||||
"server.unsafe.MixinThreadingDetector",
|
||||
"server.MixinUtilBackgroundThread",
|
||||
+10
-6
@@ -1,11 +1,9 @@
|
||||
org.gradle.jvmargs=-Xmx4096M
|
||||
org.gradle.daemon=false
|
||||
|
||||
maven_group=com.seibel.lod
|
||||
# Mod Info
|
||||
archives_base_name=DistantHorizons
|
||||
|
||||
# Mod info
|
||||
mod_version=1.7.0a-dev
|
||||
maven_group=com.seibel.lod
|
||||
mod_name=Distant Horizons
|
||||
mod_description=This mod generates and renders simplified terrain beyond the normal view distance at a low performance cost. Allowing you to see much farther without turning your game into a slideshow.
|
||||
mod_authors=["James Seibel", "Leonardo Amato", "Cola", "coolGi", "Ran", "Leetom"]
|
||||
@@ -13,14 +11,20 @@ mod_homepage=https://www.curseforge.com/minecraft/mc-mods/distant-horizons
|
||||
mod_source=https://gitlab.com/jeseibel/minecraft-lod-mod/
|
||||
mod_issues=https://gitlab.com/jeseibel/minecraft-lod-mod/-/issues
|
||||
|
||||
# Global Plugin versions
|
||||
# Architectury Version & Info
|
||||
architectury_version=5.7.28
|
||||
enabled_platforms=fabric,forge
|
||||
|
||||
# Global Plugin Versions
|
||||
toml_version=3.6.5
|
||||
json_version=1.1.1
|
||||
flatlaf_version=2.3
|
||||
svgSalamander_version=1.1.3
|
||||
manifold_version=2022.1.18
|
||||
enabled_platforms=fabric,forge
|
||||
mcVersions=1.16.5,1.17.1,1.18.1,1.18.2,1.19
|
||||
|
||||
# Internal Properties (These are set at runtime)
|
||||
versionStr=
|
||||
|
||||
##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS:
|
||||
mcVer=1.18.2
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -17,67 +17,101 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MSYS* | MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
@@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
@@ -106,80 +140,95 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
||||
Binary file not shown.
+2
-1
@@ -3,6 +3,7 @@ pluginManagement {
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url "https://maven.architectury.dev/" }
|
||||
maven { url "https://maven.minecraftforge.net/" }
|
||||
maven { url "https://repo.spongepowered.org/repository/maven-public/"}
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
@@ -10,6 +11,6 @@ pluginManagement {
|
||||
include("common")
|
||||
include("fabric")
|
||||
include("forge")
|
||||
include("core") // FIXME: There is a problem with the core module that stops us from upgrading architectury
|
||||
include("core")
|
||||
|
||||
rootProject.name = "DistantHorizons"
|
||||
|
||||
Reference in New Issue
Block a user