diff options
author | Roman / Linnea Gräf <romangraef@gmail.com> | 2022-09-22 22:30:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 22:30:50 +0200 |
commit | 6f5d20ea51e7c8603930b72991e417d8c4d0d9bc (patch) | |
tree | 66aed446a6c419a6f391a5a7571017ca6f772f01 | |
parent | 9a9f946665aed7e60e7e58aefc4129fddba57659 (diff) | |
download | skyhanni-6f5d20ea51e7c8603930b72991e417d8c4d0d9bc.tar.gz skyhanni-6f5d20ea51e7c8603930b72991e417d8c4d0d9bc.tar.bz2 skyhanni-6f5d20ea51e7c8603930b72991e417d8c4d0d9bc.zip |
Merge pull request #4
* Import NEU in dev env
-rw-r--r-- | build.gradle.kts | 61 | ||||
-rw-r--r-- | gradle/wrapper/gradle-wrapper.properties | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt | 2 |
3 files changed, 41 insertions, 24 deletions
diff --git a/build.gradle.kts b/build.gradle.kts index c2602e260..1e6e63aa1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,30 +17,9 @@ java { toolchain.languageVersion.set(JavaLanguageVersion.of(8)) } -// Minecraft configuration: -loom { - launchConfigs { - "client" { - // If you don't want mixins, remove these lines - property("mixin.debug", "true") - property("asmhelper.verbose", "true") - arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker") - arg("--mixin", "mixins.skyhanni.json") - } - } - forge { - pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter()) - // If you don't want mixins, remove this lines - mixinConfig("mixins.skyhanni.json") - } - // If you don't want mixins, remove these lines - mixin { - defaultRefmapName.set("mixins.skyhanni.refmap.json") - } -} sourceSets.main { - output.setResourcesDir(file("$buildDir/classes/kotlin/main")) + output.setResourcesDir(file("$buildDir/classes/java/main")) } // Dependencies: @@ -50,12 +29,22 @@ repositories { maven("https://repo.spongepowered.org/maven/") // If you don't want to log in with your real minecraft account, remove this line maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1") + maven("https://jitpack.io") { + content { + includeGroupByRegex("com\\.github\\..*") + } + } } val shadowImpl by configurations.creating { configurations.implementation.get().extendsFrom(this) } +val devenvMod by configurations.creating { + isTransitive = false + isVisible = false +} + dependencies { minecraft("com.mojang:minecraft:1.8.9") mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9") @@ -71,6 +60,33 @@ dependencies { modRuntimeOnly("me.djtheredstoner:DevAuth-forge-legacy:1.1.0") implementation(kotlin("stdlib-jdk8")) + devenvMod("com.github.romangraef:notenoughupdates:b3e3583:all") + +} + +// Minecraft configuration: +loom { + launchConfigs { + "client" { + // If you don't want mixins, remove these lines + property("mixin.debug", "true") + property("asmhelper.verbose", "true") + arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker") + arg("--mixin", "mixins.skyhanni.json") + val modFiles = devenvMod + .incoming.artifacts.resolvedArtifacts.get() + arg("--mods", modFiles.joinToString(",") { it.file.relativeTo(file("run")).path }) + } + } + forge { + pack200Provider.set(dev.architectury.pack200.java.Pack200Adapter()) + // If you don't want mixins, remove this lines + mixinConfig("mixins.skyhanni.json") + } + // If you don't want mixins, remove these lines + mixin { + defaultRefmapName.set("mixins.skyhanni.refmap.json") + } } // Tasks: @@ -81,6 +97,7 @@ tasks.withType(JavaCompile::class) { tasks.withType(Jar::class) { archiveBaseName.set("SkyHanni") + duplicatesStrategy = DuplicatesStrategy.EXCLUDE manifest.attributes.run { this["FMLCorePluginContainsFMLMod"] = "true" this["ForceLoadAsMod"] = "true" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a254..8049c684f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt index 847a3ab15..794766cee 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/EndermanSlayerBeacon.kt @@ -78,7 +78,7 @@ class EndermanSlayerBeacon { } @SubscribeEvent(priority = EventPriority.LOW, receiveCanceled = true) - fun onChatPacket(event: PacketEvent.ReceiveEvent) { + fun onPacketReceive(event: PacketEvent.ReceiveEvent) { if (!isEnabled()) return val packet = event.packet |