From bda183823f86b72179601fc07bc53a9623d2de82 Mon Sep 17 00:00:00 2001 From: Color_yr <402067010@qq.com> Date: Thu, 2 Mar 2023 16:58:01 +0800 Subject: [PATCH] fabric ok --- fabric_1_18_2/.gitignore | 40 ++ fabric_1_18_2/LICENSE | 121 ++++ fabric_1_18_2/build.gradle | 88 +++ fabric_1_18_2/gradle.properties | 18 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 61574 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + fabric_1_18_2/gradlew | 244 +++++++ fabric_1_18_2/gradlew.bat | 92 +++ fabric_1_18_2/settings.gradle | 12 + .../java/coloryr/allmusic/AllMusicFabric.java | 54 ++ .../main/java/coloryr/allmusic/TaskItem.java | 6 + .../src/main/java/coloryr/allmusic/Tasks.java | 24 + .../java/coloryr/allmusic/core/AllMusic.java | 481 ++++++++++++++ .../coloryr/allmusic/core/AllMusicAPI.java | 68 ++ .../allmusic/core/command/CommandEX.java | 510 +++++++++++++++ .../allmusic/core/command/TabCommand.java | 101 +++ .../allmusic/core/decoder/Bitstream.java | 536 +++++++++++++++ .../core/decoder/BitstreamErrors.java | 55 ++ .../core/decoder/BitstreamException.java | 65 ++ .../coloryr/allmusic/core/decoder/Crc16.java | 64 ++ .../coloryr/allmusic/core/decoder/Header.java | 618 ++++++++++++++++++ .../core/decoder/JavaLayerErrors.java | 39 ++ .../core/decoder/JavaLayerException.java | 61 ++ .../allmusic/core/enums/EncryptType.java | 5 + .../coloryr/allmusic/core/enums/HudPos.java | 5 + .../coloryr/allmusic/core/hud/DataSql.java | 255 ++++++++ .../coloryr/allmusic/core/hud/HudUtils.java | 348 ++++++++++ .../allmusic/core/music/api/APIMain.java | 342 ++++++++++ .../allmusic/core/music/api/CryptoUtil.java | 137 ++++ .../core/music/api/HttpClientUtil.java | 171 +++++ .../allmusic/core/music/api/MyCookieJar.java | 38 ++ .../allmusic/core/music/play/LyricDo.java | 171 +++++ .../allmusic/core/music/play/LyricSave.java | 110 ++++ .../allmusic/core/music/play/MusicSearch.java | 51 ++ .../allmusic/core/music/play/PlayGo.java | 230 +++++++ .../allmusic/core/music/play/PlayMusic.java | 263 ++++++++ .../core/music/play/TopLyricSave.java | 28 + .../coloryr/allmusic/core/objs/ConfigObj.java | 248 +++++++ .../coloryr/allmusic/core/objs/CookieObj.java | 10 + .../allmusic/core/objs/HttpResObj.java | 11 + .../allmusic/core/objs/MessageObj.java | 108 +++ .../allmusic/core/objs/SearchMusicObj.java | 15 + .../allmusic/core/objs/api/EncResObj.java | 11 + .../core/objs/api/music/info/InfoObj.java | 127 ++++ .../core/objs/api/music/info/PlayObj.java | 30 + .../core/objs/api/music/list/DataObj.java | 41 ++ .../core/objs/api/music/lyric/WLyricObj.java | 86 +++ .../objs/api/music/search/SearchDataObj.java | 40 ++ .../core/objs/api/music/search/songs.java | 30 + .../api/music/trialinfo/TrialInfoObj.java | 46 ++ .../api/music/trialinfo/freeTrialInfo.java | 18 + .../core/objs/api/program/info/PrInfoObj.java | 99 +++ .../allmusic/core/objs/config/EconomyObj.java | 18 + .../core/objs/config/FunConfigObj.java | 11 + .../allmusic/core/objs/hud/PosObj.java | 19 + .../allmusic/core/objs/hud/SaveObj.java | 45 ++ .../core/objs/message/AddMusicObj.java | 41 ++ .../allmusic/core/objs/message/ClickObj.java | 17 + .../core/objs/message/CommandObj.java | 17 + .../allmusic/core/objs/message/CostObj.java | 25 + .../allmusic/core/objs/message/CustomObj.java | 13 + .../allmusic/core/objs/message/FunObj.java | 20 + .../core/objs/message/HelpAdminObj.java | 41 ++ .../core/objs/message/HelpNormalObj.java | 61 ++ .../allmusic/core/objs/message/HelpObj.java | 24 + .../core/objs/message/HudListObj.java | 50 ++ .../allmusic/core/objs/message/HudObj.java | 61 ++ .../core/objs/message/ListMusicObj.java | 23 + .../allmusic/core/objs/message/LyricObj.java | 17 + .../core/objs/message/MusicPlayObj.java | 63 ++ .../allmusic/core/objs/message/PAPIObj.java | 13 + .../allmusic/core/objs/message/PageObj.java | 23 + .../allmusic/core/objs/message/SearchObj.java | 45 ++ .../allmusic/core/objs/message/VoteObj.java | 41 ++ .../core/objs/music/LyricItemObj.java | 27 + .../allmusic/core/objs/music/MusicObj.java | 32 + .../core/objs/music/SearchPageObj.java | 55 ++ .../allmusic/core/objs/music/SongInfoObj.java | 151 +++++ .../core/objs/music/TopSongInfoObj.java | 61 ++ .../coloryr/allmusic/core/side/ComType.java | 12 + .../coloryr/allmusic/core/side/IMyLogger.java | 7 + .../coloryr/allmusic/core/side/ISide.java | 246 +++++++ .../coloryr/allmusic/core/sql/IEconomy.java | 7 + .../coloryr/allmusic/core/sql/MysqlConn.java | 68 ++ .../coloryr/allmusic/core/utils/Function.java | 30 + .../coloryr/allmusic/core/utils/Logs.java | 42 ++ .../allmusic/mixin/IGetCommandOutput.java | 17 + .../allmusic/mixin/ServerPlayerMixin.java | 25 + .../allmusic/side/fabric/CommandFabric.java | 67 ++ .../allmusic/side/fabric/FabricApi.java | 33 + .../allmusic/side/fabric/LogFabric.java | 16 + .../allmusic/side/fabric/SideFabric.java | 381 +++++++++++ .../side/fabric/event/MusicAddEvent.java | 24 + .../side/fabric/event/MusicPlayEvent.java | 25 + .../src/main/resources/allmusic.mixins.json | 16 + .../main/resources/assets/allmusic/icon.png | Bin 0 -> 453 bytes fabric_1_18_2/src/main/resources/config.json | 62 ++ .../src/main/resources/fabric.mod.json | 37 ++ fabric_1_18_2/src/main/resources/message.json | 136 ++++ .../assets/{modid => allmusic}/icon.png | Bin .../src/main/resources/fabric.mod.json | 2 +- link.cmd | 5 +- 102 files changed, 8647 insertions(+), 2 deletions(-) create mode 100644 fabric_1_18_2/.gitignore create mode 100644 fabric_1_18_2/LICENSE create mode 100644 fabric_1_18_2/build.gradle create mode 100644 fabric_1_18_2/gradle.properties create mode 100644 fabric_1_18_2/gradle/wrapper/gradle-wrapper.jar create mode 100644 fabric_1_18_2/gradle/wrapper/gradle-wrapper.properties create mode 100644 fabric_1_18_2/gradlew create mode 100644 fabric_1_18_2/gradlew.bat create mode 100644 fabric_1_18_2/settings.gradle create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/AllMusicFabric.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/TaskItem.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/Tasks.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/AllMusic.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/AllMusicAPI.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/command/CommandEX.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/command/TabCommand.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Bitstream.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamErrors.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamException.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Crc16.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Header.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerErrors.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerException.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/enums/EncryptType.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/enums/HudPos.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/hud/DataSql.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/hud/HudUtils.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/api/APIMain.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/api/CryptoUtil.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/api/HttpClientUtil.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/api/MyCookieJar.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricDo.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricSave.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/play/MusicSearch.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayGo.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayMusic.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/music/play/TopLyricSave.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/ConfigObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/CookieObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/HttpResObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/MessageObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/SearchMusicObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/EncResObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/InfoObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/PlayObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/list/DataObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/lyric/WLyricObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/SearchDataObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/songs.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/TrialInfoObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/freeTrialInfo.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/program/info/PrInfoObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/EconomyObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/FunConfigObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/PosObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/SaveObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/AddMusicObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ClickObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CommandObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CostObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CustomObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/FunObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpAdminObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpNormalObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudListObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ListMusicObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/LyricObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/MusicPlayObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PAPIObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PageObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/SearchObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/VoteObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/LyricItemObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/MusicObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SearchPageObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SongInfoObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/TopSongInfoObj.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/side/ComType.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/side/IMyLogger.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/side/ISide.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/sql/IEconomy.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/sql/MysqlConn.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/utils/Function.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/core/utils/Logs.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/mixin/IGetCommandOutput.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/mixin/ServerPlayerMixin.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/side/fabric/CommandFabric.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/side/fabric/FabricApi.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/side/fabric/LogFabric.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/side/fabric/SideFabric.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/side/fabric/event/MusicAddEvent.java create mode 100644 fabric_1_18_2/src/main/java/coloryr/allmusic/side/fabric/event/MusicPlayEvent.java create mode 100644 fabric_1_18_2/src/main/resources/allmusic.mixins.json create mode 100644 fabric_1_18_2/src/main/resources/assets/allmusic/icon.png create mode 100644 fabric_1_18_2/src/main/resources/config.json create mode 100644 fabric_1_18_2/src/main/resources/fabric.mod.json create mode 100644 fabric_1_18_2/src/main/resources/message.json rename fabric_1_19_3/src/main/resources/assets/{modid => allmusic}/icon.png (100%) diff --git a/fabric_1_18_2/.gitignore b/fabric_1_18_2/.gitignore new file mode 100644 index 00000000..c476faf2 --- /dev/null +++ b/fabric_1_18_2/.gitignore @@ -0,0 +1,40 @@ +# gradle + +.gradle/ +build/ +out/ +classes/ + +# eclipse + +*.launch + +# idea + +.idea/ +*.iml +*.ipr +*.iws + +# vscode + +.settings/ +.vscode/ +bin/ +.classpath +.project + +# macos + +*.DS_Store + +# fabric + +run/ + +# java + +hs_err_*.log +replay_*.log +*.hprof +*.jfr diff --git a/fabric_1_18_2/LICENSE b/fabric_1_18_2/LICENSE new file mode 100644 index 00000000..1625c179 --- /dev/null +++ b/fabric_1_18_2/LICENSE @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. \ No newline at end of file diff --git a/fabric_1_18_2/build.gradle b/fabric_1_18_2/build.gradle new file mode 100644 index 00000000..29e80683 --- /dev/null +++ b/fabric_1_18_2/build.gradle @@ -0,0 +1,88 @@ +plugins { + id 'fabric-loom' version '1.1-SNAPSHOT' + id 'maven-publish' + id "org.jetbrains.kotlin.jvm" version "1.8.10" +} + +sourceCompatibility = JavaVersion.VERSION_17 +targetCompatibility = JavaVersion.VERSION_17 + +archivesBaseName = project.archives_base_name +version = project.mod_version +group = project.maven_group + +repositories { + // Add repositories to retrieve artifacts from in here. + // You should only use this when depending on other mods because + // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. + // See https://docs.gradle.org/current/userguide/declaring_repositories.html + // for more information about repositories. +} + +dependencies { + // To change the versions see the gradle.properties file + 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. This is technically optional, but you probably want it anyway. + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}" + + include modImplementation('com.squareup.okio:okio-jvm:3.0.0') + include modImplementation('com.squareup.okhttp3:okhttp:4.10.0') + include modImplementation('org.xerial:sqlite-jdbc:3.39.3.0') + + // Uncomment the following line to enable the deprecated Fabric API modules. + // These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time. + + // modImplementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}" +} + +processResources { + inputs.property "version", project.version + + filesMatching("fabric.mod.json") { + expand "version": project.version + } +} + +tasks.withType(JavaCompile).configureEach { + it.options.release = 17 +} + +tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { + kotlinOptions { + jvmTarget = 17 + } +} + +java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() +} + +jar { + from("LICENSE") { + rename { "${it}_${project.archivesBaseName}"} + } +} + +// configure the maven publication +publishing { + publications { + mavenJava(MavenPublication) { + from components.java + } + } + + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. + repositories { + // Add repositories to publish to here. + // Notice: This block does NOT have the same function as the block in the top level. + // The repositories here will be used for publishing your artifact, not for + // retrieving dependencies. + } +} \ No newline at end of file diff --git a/fabric_1_18_2/gradle.properties b/fabric_1_18_2/gradle.properties new file mode 100644 index 00000000..c9f8a19f --- /dev/null +++ b/fabric_1_18_2/gradle.properties @@ -0,0 +1,18 @@ +# Done to increase the memory available to gradle. +org.gradle.jvmargs=-Xmx1G +org.gradle.parallel=true + +# Fabric Properties +# check these on https://fabricmc.net/develop +minecraft_version=1.18.2 +yarn_mappings=1.18.2+build.4 +loader_version=0.14.14 +fabric_kotlin_version=1.9.1+kotlin.1.8.10 + +# Mod Properties +mod_version=2.18.5 +maven_group=coloryr.allmusic +archives_base_name=[Fabric1.18.2]AllMusic_Server + +# Dependencies +fabric_version=0.75.1+1.18.2 \ No newline at end of file diff --git a/fabric_1_18_2/gradle/wrapper/gradle-wrapper.jar b/fabric_1_18_2/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..943f0cbfa754578e88a3dae77fce6e3dea56edbf GIT binary patch literal 61574 zcmb6AV{~QRwml9f72CFLyJFk6ZKq;e729@pY}>YNR8p1vbMJH7ubt