From 7d2e27445cd64d32cbab35c48be42fe7e4d2dea1 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Fri, 5 Aug 2022 16:01:15 +0900 Subject: - Sorry, but I haven't got any good name for this commit - This commit has been on my computer for like 6 months untouched --- mod/.gitignore | 41 ++++++++ mod/build.gradle | 103 +++++++++++++-------- .../syeyoung/dungeonsguide/chat/PartyManager.java | 1 + .../dungeonsguide/cosmetics/CosmeticsManager.java | 1 + .../dungeon/roomfinder/DungeonRoom.java | 1 + .../eventlistener/DungeonListener.java | 1 + .../eventlistener/FeatureListener.java | 3 + .../eventlistener/PacketListener.java | 4 + 8 files changed, 115 insertions(+), 40 deletions(-) create mode 100755 mod/.gitignore (limited to 'mod') diff --git a/mod/.gitignore b/mod/.gitignore new file mode 100755 index 00000000..d2944636 --- /dev/null +++ b/mod/.gitignore @@ -0,0 +1,41 @@ +.gradle +.idea + +eclipse/* + +build/* +jars/* +runtime/logs/* +runtime/config/* +runtime/crash-reports/* +run/* +runtime/screenshots/* +DEBUG/* +sdk/* +essential/* +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +runtime/modsss/* +/modcore/config.toml +/modcore/Sk1er Modcore-0.1.47 (1.8.9).jar +/.mixin.out/audit/mixin_implementation_report.csv +/.mixin.out/audit/mixin_implementation_report.txt +/modcore/metadata.json +/runtime/.ReAuth.cfg +/libdiscord-rpc.so + +runtime/options.txt +runtime/servers.dat +/runtime/saves/* +/runtime/usernamecache.json +/runtime/usercache.json diff --git a/mod/build.gradle b/mod/build.gradle index bae9614d..bbbc033a 100644 --- a/mod/build.gradle +++ b/mod/build.gradle @@ -1,63 +1,90 @@ -buildscript { - repositories { - gradlePluginPortal() - mavenCentral() - maven { - name = "forge" - url = "https://maven.minecraftforge.net/" - } - maven { url "https://jitpack.io" } - } - dependencies { - classpath "com.github.Skytils:ForgeGradle:6f5327" - classpath "com.github.jengelman.gradle.plugins:shadow:6.1.0" - } - +plugins { + id "idea" + id "java" + id "com.github.johnrengelman.shadow" version "7.1.2" + id "dev.architectury.architectury-pack200" version "0.1.3" + id "gg.essential.loom" version "0.10.0.+" } -apply plugin: "net.minecraftforge.gradle.forge" -apply plugin: "com.github.johnrengelman.shadow" -apply plugin: "java" -version = "3.0" +version = "4.0.0" group = "kr.syeyoung.dungeonsguide" archivesBaseName = "dungeonsguide" -sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 +java { + toolchain.languageVersion.set(JavaLanguageVersion.of(8)) +} -tasks.withType(JavaCompile) { - options.encoding = "UTF-8" +loom { + launchConfigs { + "client" { + // probably will have to my own mixin tweaker, due to dungeonsguide's weird dynamic loading stuff +// property("mixin.debug", "true") +// property("asmhelper.verbose", "true") +// arg("--tweakClass", "org.spongepowered.asm.launch.MixinTweaker") +// arg("--mixin", "mixins.examplemod.json") + } + } + forge { + pack200Provider.set(new dev.architectury.pack200.java.Pack200Adapter()) + } } -minecraft { - version = "1.8.9-11.15.1.2318-1.8.9" - runDir = "run" - mappings = "stable_22" - makeObfSourceJar = false +sourceSets.main { + output.setResourcesDir(file("$buildDir/classes/java/main")) } + repositories { mavenCentral() maven { url "https://jitpack.io" } } + +configurations { + implementation.extendsFrom shadowImpl +} + + 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") + + implementation "org.jetbrains:annotations-java5:19.0.0" implementation "org.java-websocket:Java-WebSocket:1.5.1" implementation "org.json:json:20171018" implementation "com.twelvemonkeys.imageio:imageio-bmp:3.7.0" - compileOnly project(':wrapper') + compileOnly project(':loader') compileOnly "org.projectlombok:lombok:1.18.20" - compileOnly files("mods/Hychat-1.12.1-BETA.jar") + compileOnly files("../jars/Hychat-1.12.1-BETA.jar") annotationProcessor "org.projectlombok:lombok:1.18.16" testCompileOnly "org.projectlombok:lombok:1.18.20" testAnnotationProcessor "org.projectlombok:lombok:1.18.20" } -shadowJar { +tasks.withType(JavaCompile) { + options.encoding = "UTF-8" +} + +tasks.withType(Jar) { + archiveBaseName = "examplemod" + manifest { + attributes["FMLCorePluginContainsFMLMod"] = "true" + attributes["ForceLoadAsMod"] = "true" + + // If you don't want mixins, remove these lines +// this["TweakClass"] = "org.spongepowered.asm.launch.MixinTweaker" +// this["MixinConfigs"] = "mixins.examplemod.json" + } +} + + +tasks.shadowJar { archiveFileName = jar.archiveFileName @@ -71,15 +98,11 @@ shadowJar { } } -reobf { - shadowJar { - mappingType = "SEARGE" - } +tasks.named("remapJar") { + archiveClassifier = "all" + from(tasks.shadowJar) + input = tasks.shadowJar.archiveFile } -processResources { - // copy everything else, thats not the mcmod.info - from(sourceSets.main.resources.srcDirs) { - exclude "mcmod.info" - } -} \ No newline at end of file + +tasks.assemble.dependsOn tasks.remapJar diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java index f1a40098..3053c74c 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/chat/PartyManager.java @@ -21,6 +21,7 @@ package kr.syeyoung.dungeonsguide.chat; import kr.syeyoung.dungeonsguide.DungeonsGuide; import kr.syeyoung.dungeonsguide.events.HypixelJoinedEvent; import kr.syeyoung.dungeonsguide.events.StompConnectedEvent; +import kr.syeyoung.dungeonsguide.stomp.*; import kr.syeyoung.dungeonsguide.utils.TextUtils; import lombok.Getter; import lombok.Setter; diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/CosmeticsManager.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/CosmeticsManager.java index c91a0895..790a3bee 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/CosmeticsManager.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/cosmetics/CosmeticsManager.java @@ -23,6 +23,7 @@ import kr.syeyoung.dungeonsguide.DungeonsGuide; import kr.syeyoung.dungeonsguide.cosmetics.chatreplacers.*; import kr.syeyoung.dungeonsguide.events.PlayerListItemPacketEvent; import kr.syeyoung.dungeonsguide.events.StompConnectedEvent; +import kr.syeyoung.dungeonsguide.stomp.*; import lombok.Getter; import lombok.Setter; import net.minecraft.client.Minecraft; diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java index 83dbb889..dfdd59cb 100755 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/dungeon/roomfinder/DungeonRoom.java @@ -29,6 +29,7 @@ import kr.syeyoung.dungeonsguide.dungeon.DungeonContext; import kr.syeyoung.dungeonsguide.dungeon.MapProcessor; import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonDoor; import kr.syeyoung.dungeonsguide.features.FeatureRegistry; +import kr.syeyoung.dungeonsguide.pathfinding.*; import kr.syeyoung.dungeonsguide.roomedit.EditingContext; import kr.syeyoung.dungeonsguide.roomprocessor.ProcessorFactory; import kr.syeyoung.dungeonsguide.roomprocessor.RoomProcessor; diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java index 21ea0bb4..ba126ac7 100755 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java @@ -25,6 +25,7 @@ import kr.syeyoung.dungeonsguide.dungeon.DungeonContext; import kr.syeyoung.dungeonsguide.dungeon.DungeonActionManager; import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonDoor; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; +import kr.syeyoung.dungeonsguide.events.*; import kr.syeyoung.dungeonsguide.features.FeatureRegistry; import kr.syeyoung.dungeonsguide.roomedit.EditingContext; import kr.syeyoung.dungeonsguide.roomedit.gui.GuiDungeonAddSet; diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java index cc9fe5b6..9df4498a 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/FeatureListener.java @@ -21,6 +21,9 @@ package kr.syeyoung.dungeonsguide.eventlistener; import kr.syeyoung.dungeonsguide.DungeonsGuide; import kr.syeyoung.dungeonsguide.SkyblockStatus; import kr.syeyoung.dungeonsguide.config.guiconfig.location.GuiGuiLocationConfig; +import kr.syeyoung.dungeonsguide.events.*; +import kr.syeyoung.dungeonsguide.features.FeatureRegistry; +import kr.syeyoung.dungeonsguide.features.GuiFeature; import kr.syeyoung.dungeonsguide.features.listener.*; import kr.syeyoung.dungeonsguide.features.AbstractFeature; import kr.syeyoung.dungeonsguide.features.listener.*; diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/PacketListener.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/PacketListener.java index 3ae0b7f5..183f7f6c 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/PacketListener.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/PacketListener.java @@ -25,6 +25,10 @@ import io.netty.channel.ChannelPromise; import kr.syeyoung.dungeonsguide.SkyblockStatus; import kr.syeyoung.dungeonsguide.DungeonsGuide; import kr.syeyoung.dungeonsguide.cosmetics.CustomPacketPlayerListItem; +import kr.syeyoung.dungeonsguide.events.BlockUpdateEvent; +import kr.syeyoung.dungeonsguide.events.PlayerInteractEntityEvent; +import kr.syeyoung.dungeonsguide.events.TitleEvent; +import kr.syeyoung.dungeonsguide.events.WindowUpdateEvent; import kr.syeyoung.dungeonsguide.features.FeatureRegistry; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; -- cgit