-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix keybind not being reset sometimes
misc: add onecore
- Loading branch information
Showing
11 changed files
with
136 additions
and
350 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,119 +1,101 @@ | ||
plugins { | ||
// Languages | ||
id "java" | ||
id "org.jetbrains.kotlin.jvm" version "1.6.10" | ||
|
||
// Minecraft Tools | ||
id "net.minecraftforge.gradle.forge" version "8708bf3e0" | ||
//file:noinspection UnnecessaryQualifiedReference | ||
//file:noinspection GroovyAssignabilityCheck | ||
|
||
// Build Tools | ||
id "com.github.johnrengelman.shadow" version "6.1.0" | ||
plugins { | ||
id "dev.architectury.architectury-pack200" version "0.1.3" | ||
id 'org.jetbrains.kotlin.jvm' version '1.6.10' | ||
id "cc.woverflow.loom" version "0.10.1" | ||
id "net.kyori.blossom" version "1.3.0" | ||
id "java" | ||
} | ||
|
||
version = mod_version | ||
group = "dev.isxander" | ||
archivesBaseName = mod_name | ||
|
||
blossom { | ||
String className = "src/main/kotlin/dev/isxander/behindyou/BehindYou.kt" | ||
replaceToken("@VER@", mod_version, className) | ||
replaceToken("@VER@", project.version, className) | ||
replaceToken("@NAME@", mod_name, className) | ||
replaceToken("@ID@", mod_id, className) | ||
} | ||
|
||
group "dev.isxander" | ||
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 | ||
compileJava.options.encoding = 'UTF-8' | ||
|
||
targetCompatibility = sourceCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
minecraft { | ||
version = "1.8.9-11.15.1.2318-1.8.9" | ||
mappings = "stable_22" | ||
runDir = "run" | ||
makeObfSourceJar = false | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url "https://repo.spongepowered.org/maven" } | ||
maven { url "https://jitpack.io" } | ||
maven { url "https://repo.sk1er.club/repository/maven-public" } | ||
loom { | ||
launchConfigs { | ||
client { | ||
arg("--tweakClass", "cc.woverflow.onecore.tweaker.OneCoreTweaker") | ||
} | ||
} | ||
runConfigs { | ||
client { | ||
ideConfigGenerated = true | ||
} | ||
} | ||
forge { | ||
pack200Provider = new dev.architectury.pack200.java.Pack200Adapter() | ||
} | ||
} | ||
|
||
configurations { | ||
include | ||
implementation.extendsFrom include | ||
} | ||
|
||
dependencies { | ||
include "gg.essential:loader-launchwrapper:1.1.3" | ||
compileOnly "gg.essential:essential-1.8.9-forge:1788" | ||
} | ||
|
||
jar { | ||
manifest.attributes( | ||
'ModSide': 'CLIENT', | ||
'ForceLoadAsMod': true, | ||
'TweakClass': 'gg.essential.loader.stage0.EssentialSetupTweaker', | ||
'TweakOrder': '0' | ||
) | ||
enabled = false | ||
implementation.extendsFrom(include) | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = "UTF-8" | ||
repositories { | ||
maven { url 'https://repo.woverflow.cc/' } | ||
} | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" | ||
dependencies { | ||
minecraft("com.mojang:minecraft:1.8.9") | ||
mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9") | ||
forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9") | ||
compileOnly 'gg.essential:essential-1.8.9-forge:1933' | ||
compileOnly 'cc.woverflow:onecore:1.3.3' | ||
include ('cc.woverflow:onecore-tweaker:1.3.0') { | ||
transitive = false | ||
} | ||
} | ||
|
||
processResources { | ||
inputs.property 'mod_version', mod_version | ||
inputs.property 'mod_id', mod_id | ||
inputs.property 'mod_name', mod_name | ||
inputs.property 'mod_description', mod_description | ||
// this will ensure that this task is redone when the versions change. | ||
inputs.property "version", version | ||
inputs.property "name", mod_name | ||
inputs.property "id", mod_id | ||
|
||
filesMatching("mcmod.info") { | ||
expand ( | ||
"mod_version": mod_version, | ||
"mod_id": mod_id, | ||
"mod_name": mod_name, | ||
"mod_description": mod_description | ||
expand( | ||
"id": mod_id, | ||
"name": mod_name, | ||
"version": version | ||
) | ||
} | ||
filesMatching("bundle.project.json") { | ||
expand ( | ||
"mod_version": mod_version, | ||
"mod_id": mod_id | ||
) | ||
} | ||
} | ||
|
||
task moveResources { | ||
doLast { | ||
ant.move ( | ||
file: "${buildDir}/resources/main", | ||
todir: "${buildDir}/classes/kotlin" | ||
) | ||
} | ||
rename '(.+_at.cfg)', 'META-INF/$1' | ||
} | ||
|
||
tasks.moveResources.dependsOn processResources | ||
tasks.classes.dependsOn moveResources | ||
|
||
shadowJar { | ||
archiveClassifier.set("") | ||
|
||
configurations = [project.configurations.include] | ||
duplicatesStrategy DuplicatesStrategy.EXCLUDE | ||
sourceSets { | ||
main { | ||
output.resourcesDir = java.classesDirectory | ||
} | ||
} | ||
|
||
reobf { | ||
shadowJar { | ||
mappingType = "SEARGE" | ||
jar { | ||
dependsOn configurations.include | ||
from(configurations.include.collect { it.isDirectory() ? it : zipTree(it) }) { | ||
def i = 0 | ||
filesMatching("META-INF/NOTICE*") { name = "$name.${i++}" } | ||
filesMatching("META-INF/LICENSE*") { name = "$name.${i++}" } | ||
filesMatching("META-INF/mods.toml") { name = "$name.${i++}" } | ||
filesMatching("LICENSE*") { name = "$name.${i++}" } | ||
} | ||
} | ||
|
||
reobfJar.dependsOn tasks.shadowJar | ||
manifest.attributes( | ||
'ModSide': 'CLIENT', | ||
'ForceLoadAsMod': true, | ||
'TweakClass': 'cc.woverflow.onecore.tweaker.OneCoreTweaker', | ||
"TweakOrder": "0" | ||
) | ||
} |
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 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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 |
---|---|---|
@@ -1,25 +1,8 @@ | ||
pluginManagement { | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
|
||
maven { url 'https://maven.minecraftforge.net' } | ||
maven { url 'https://jitpack.io' } | ||
} | ||
|
||
resolutionStrategy { | ||
eachPlugin { | ||
switch (requested.id.id) { | ||
case 'net.minecraftforge.gradle.forge': | ||
useModule "com.github.asbyth:ForgeGradle:${requested.version}" | ||
break | ||
case 'org.spongepowered.mixin': | ||
useModule "com.github.xcfrg:MixinGradle:${requested.version}" | ||
break | ||
} | ||
} | ||
maven { url = "https://repo.woverflow.cc" } | ||
} | ||
} | ||
|
||
rootProject.name = 'BehindYouV3' | ||
|
||
rootProject.name = mod_name |
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
25 changes: 0 additions & 25 deletions
25
src/main/kotlin/dev/isxander/behindyou/commands/BehindYouCommand.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.