From 630d44c733bf214d42d09de6fbe8cd29458d7c3e Mon Sep 17 00:00:00 2001 From: Color_yr <402067010@qq.com> Date: Thu, 2 Mar 2023 18:43:30 +0800 Subject: [PATCH] up --- forge_1_18_2/.gitattributes | 5 + forge_1_18_2/.gitignore | 25 + forge_1_18_2/CREDITS.txt | 65 ++ forge_1_18_2/LICENSE.txt | 520 +++++++++++++++ forge_1_18_2/README.txt | 46 ++ forge_1_18_2/build.gradle | 228 +++++++ forge_1_18_2/changelog.txt | 440 +++++++++++++ forge_1_18_2/gradle.properties | 4 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + forge_1_18_2/gradlew | 234 +++++++ forge_1_18_2/gradlew.bat | 89 +++ .../java/coloryr/allmusic/AllMusicForge.java | 127 ++++ .../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/side/forge/CommandForge.java | 70 ++ .../coloryr/allmusic/side/forge/ForgeApi.java | 31 + .../coloryr/allmusic/side/forge/LogForge.java | 16 + .../allmusic/side/forge/SideForge.java | 385 +++++++++++ .../side/forge/event/MusicAddEvent.java | 31 + .../side/forge/event/MusicPlayEvent.java | 18 + .../src/main/resources/META-INF/mods.toml | 58 ++ forge_1_18_2/src/main/resources/config.json | 62 ++ forge_1_18_2/src/main/resources/icon.png | Bin 0 -> 32781 bytes forge_1_18_2/src/main/resources/message.json | 136 ++++ forge_1_18_2/src/main/resources/pack.mcmeta | 8 + link.cmd | 3 + 101 files changed, 9734 insertions(+) create mode 100644 forge_1_18_2/.gitattributes create mode 100644 forge_1_18_2/.gitignore create mode 100644 forge_1_18_2/CREDITS.txt create mode 100644 forge_1_18_2/LICENSE.txt create mode 100644 forge_1_18_2/README.txt create mode 100644 forge_1_18_2/build.gradle create mode 100644 forge_1_18_2/changelog.txt create mode 100644 forge_1_18_2/gradle.properties create mode 100644 forge_1_18_2/gradle/wrapper/gradle-wrapper.jar create mode 100644 forge_1_18_2/gradle/wrapper/gradle-wrapper.properties create mode 100644 forge_1_18_2/gradlew create mode 100644 forge_1_18_2/gradlew.bat create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/AllMusicForge.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/TaskItem.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/Tasks.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/AllMusic.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/AllMusicAPI.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/command/CommandEX.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/command/TabCommand.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Bitstream.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamErrors.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamException.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Crc16.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Header.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerErrors.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerException.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/enums/EncryptType.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/enums/HudPos.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/hud/DataSql.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/hud/HudUtils.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/APIMain.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/CryptoUtil.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/HttpClientUtil.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/MyCookieJar.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricDo.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricSave.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/MusicSearch.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayGo.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayMusic.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/TopLyricSave.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/ConfigObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/CookieObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/HttpResObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/MessageObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/SearchMusicObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/EncResObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/InfoObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/PlayObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/list/DataObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/lyric/WLyricObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/SearchDataObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/songs.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/TrialInfoObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/freeTrialInfo.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/program/info/PrInfoObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/EconomyObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/FunConfigObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/PosObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/SaveObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/AddMusicObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ClickObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CommandObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CostObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CustomObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/FunObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpAdminObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpNormalObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudListObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ListMusicObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/LyricObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/MusicPlayObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PAPIObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PageObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/SearchObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/VoteObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/LyricItemObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/MusicObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SearchPageObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SongInfoObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/TopSongInfoObj.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/side/ComType.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/side/IMyLogger.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/side/ISide.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/sql/IEconomy.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/sql/MysqlConn.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/utils/Function.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/core/utils/Logs.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/CommandForge.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/ForgeApi.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/LogForge.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/SideForge.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/event/MusicAddEvent.java create mode 100644 forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/event/MusicPlayEvent.java create mode 100644 forge_1_18_2/src/main/resources/META-INF/mods.toml create mode 100644 forge_1_18_2/src/main/resources/config.json create mode 100644 forge_1_18_2/src/main/resources/icon.png create mode 100644 forge_1_18_2/src/main/resources/message.json create mode 100644 forge_1_18_2/src/main/resources/pack.mcmeta diff --git a/forge_1_18_2/.gitattributes b/forge_1_18_2/.gitattributes new file mode 100644 index 00000000..f811f6ae --- /dev/null +++ b/forge_1_18_2/.gitattributes @@ -0,0 +1,5 @@ +# Disable autocrlf on generated files, they always generate with LF +# Add any extra files or paths here to make git stop saying they +# are changed when only line endings change. +src/generated/**/.cache/cache text eol=lf +src/generated/**/*.json text eol=lf diff --git a/forge_1_18_2/.gitignore b/forge_1_18_2/.gitignore new file mode 100644 index 00000000..12f86447 --- /dev/null +++ b/forge_1_18_2/.gitignore @@ -0,0 +1,25 @@ +# eclipse +bin +*.launch +.settings +.metadata +.classpath +.project + +# idea +out +*.ipr +*.iws +*.iml +.idea + +# gradle +build +.gradle + +# other +eclipse +run + +# Files from Forge MDK +forge*changelog.txt diff --git a/forge_1_18_2/CREDITS.txt b/forge_1_18_2/CREDITS.txt new file mode 100644 index 00000000..a70c53d5 --- /dev/null +++ b/forge_1_18_2/CREDITS.txt @@ -0,0 +1,65 @@ +Minecraft Forge: Credits/Thank You + +Forge is a set of tools and modifications to the Minecraft base game code to assist +mod developers in creating new and exciting content. It has been in development for +several years now, but I would like to take this time thank a few people who have +helped it along it's way. + +First, the people who originally created the Forge projects way back in Minecraft +alpha. Eloraam of RedPower, and SpaceToad of Buildcraft, without their acceptiance +of me taking over the project, who knows what Minecraft modding would be today. + +Secondly, someone who has worked with me, and developed some of the core features +that allow modding to be as functional, and as simple as it is, cpw. For developing +FML, which stabelized the client and server modding ecosystem. As well as the base +loading system that allows us to modify Minecraft's code as elegently as possible. + +Mezz, who has stepped up as the issue and pull request manager. Helping to keep me +sane as well as guiding the community into creating better additions to Forge. + +Searge, Bspks, Fesh0r, ProfMobious, and all the rest over on the MCP team {of which +I am a part}. For creating some of the core tools needed to make Minecraft modding +both possible, and as stable as can be. + On that note, here is some specific information of the MCP data we use: + * Minecraft Coder Pack (MCP) * + Forge Mod Loader and Minecraft Forge have permission to distribute and automatically + download components of MCP and distribute MCP data files. This permission is not + transitive and others wishing to redistribute the Minecraft Forge source independently + should seek permission of MCP or remove the MCP data files and request their users + to download MCP separately. + +And lastly, the countless community members who have spent time submitting bug reports, +pull requests, and just helping out the community in general. Thank you. + +--LexManos + +========================================================================= + +This is Forge Mod Loader. + +You can find the source code at all times at https://github.com/MinecraftForge/MinecraftForge/tree/1.12.x/src/main/java/net/minecraftforge/fml + +This minecraft mod is a clean open source implementation of a mod loader for minecraft servers +and minecraft clients. + +The code is authored by cpw. + +It began by partially implementing an API defined by the client side ModLoader, authored by Risugami. +http://www.minecraftforum.net/topic/75440- +This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader. + +It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge. +http://www.minecraftforge.net/ + +Additionally, it contains an implementation of topological sort based on that +published at http://keithschwarz.com/interesting/code/?dir=topological-sort + +It also contains code from the Maven project for performing versioned dependency +resolution. http://maven.apache.org/ + +It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/ +with credit to it's authors. + +Forge Mod Loader downloads components from the Minecraft Coder Pack +(http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team. + diff --git a/forge_1_18_2/LICENSE.txt b/forge_1_18_2/LICENSE.txt new file mode 100644 index 00000000..b0cbe2b3 --- /dev/null +++ b/forge_1_18_2/LICENSE.txt @@ -0,0 +1,520 @@ +Unless noted below, Minecraft Forge, Forge Mod Loader, and all +parts herein are licensed under the terms of the LGPL 2.1 found +here http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and +copied below. + +Homepage: http://minecraftforge.net/ + https://github.com/MinecraftForge/MinecraftForge + + +A note on authorship: +All source artifacts are property of their original author, with +the exclusion of the contents of the patches directory and others +copied from it from time to time. Authorship of the contents of +the patches directory is retained by the Minecraft Forge project. +This is because the patches are partially machine generated +artifacts, and are changed heavily due to the way forge works. +Individual attribution within them is impossible. + +Consent: +All contributions to Forge must consent to the release of any +patch content to the Forge project. + +A note on infectivity: +The LGPL is chosen specifically so that projects may depend on Forge +features without being infected with its license. That is the +purpose of the LGPL. Mods and others using this code via ordinary +Java mechanics for referencing libraries are specifically not bound +by Forge's license for the Mod code. + + +=== MCP Data === +This software includes data from the Minecraft Coder Pack (MCP), with kind permission +from them. The license to MCP data is not transitive - distribution of this data by +third parties requires independent licensing from the MCP team. This data is not +redistributable without permission from the MCP team. + +=== Sharing === +I grant permission for some parts of FML to be redistributed outside the terms of the LGPL, for the benefit of +the minecraft modding community. All contributions to these parts should be licensed under the same additional grant. + +-- Runtime patcher -- +License is granted to redistribute the runtime patcher code (src/main/java/net/minecraftforge/fml/common/patcher +and subdirectories) under any alternative open source license as classified by the OSI (http://opensource.org/licenses) + +-- ASM transformers -- +License is granted to redistribute the ASM transformer code (src/main/java/net/minecraftforge/common/asm/ and subdirectories) +under any alternative open source license as classified by the OSI (http://opensource.org/licenses) + +========================================================================= +This software includes portions from the Apache Maven project at +http://maven.apache.org/ specifically the ComparableVersion.java code. It is +included based on guidelines at +http://www.softwarefreedom.org/resources/2007/gpl-non-gpl-collaboration.html +with notices intact. The only change is a non-functional change of package name. + +This software contains a partial repackaging of javaxdelta, a BSD licensed program for generating +binary differences and applying them, sourced from the subversion at http://sourceforge.net/projects/javaxdelta/ +authored by genman, heikok, pivot. +The only changes are to replace some Trove collection types with standard Java collections, and repackaged. +========================================================================= + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/forge_1_18_2/README.txt b/forge_1_18_2/README.txt new file mode 100644 index 00000000..344bca75 --- /dev/null +++ b/forge_1_18_2/README.txt @@ -0,0 +1,46 @@ + +Source installation information for modders +------------------------------------------- +This code follows the Minecraft Forge installation methodology. It will apply +some small patches to the vanilla MCP source code, giving you and it access +to some of the data and functions you need to build a successful mod. + +Note also that the patches are built against "un-renamed" MCP source code (aka +SRG Names) - this means that you will not be able to read them directly against +normal code. + +Setup Process: +============================== + +Step 1: Open your command-line and browse to the folder where you extracted the zip file. + +Step 2: You're left with a choice. +If you prefer to use Eclipse: +1. Run the following command: `gradlew genEclipseRuns` (`./gradlew genEclipseRuns` if you are on Mac/Linux) +2. Open Eclipse, Import > Existing Gradle Project > Select Folder + or run `gradlew eclipse` to generate the project. + +If you prefer to use IntelliJ: +1. Open IDEA, and import project. +2. Select your build.gradle file and have it import. +3. Run the following command: `gradlew genIntellijRuns` (`./gradlew genIntellijRuns` if you are on Mac/Linux) +4. Refresh the Gradle Project in IDEA if required. + +If at any point you are missing libraries in your IDE, or you've run into problems you can +run `gradlew --refresh-dependencies` to refresh the local cache. `gradlew clean` to reset everything +{this does not affect your code} and then start the process again. + +Mapping Names: +============================= +By default, the MDK is configured to use the official mapping names from Mojang for methods and fields +in the Minecraft codebase. These names are covered by a specific license. All modders should be aware of this +license, if you do not agree with it you can change your mapping names to other crowdsourced names in your +build.gradle. For the latest license text, refer to the mapping file itself, or the reference copy here: +https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md + +Additional Resources: +========================= +Community Documentation: http://mcforge.readthedocs.io/en/latest/gettingstarted/ +LexManos' Install Video: https://www.youtube.com/watch?v=8VEdtQLuLO0 +Forge Forum: https://forums.minecraftforge.net/ +Forge Discord: https://discord.gg/UvedJ9m \ No newline at end of file diff --git a/forge_1_18_2/build.gradle b/forge_1_18_2/build.gradle new file mode 100644 index 00000000..cd087fdb --- /dev/null +++ b/forge_1_18_2/build.gradle @@ -0,0 +1,228 @@ +buildscript { + repositories { + // These repositories are only for Gradle plugins, put any other repositories in the repository block further below + maven { url = 'https://maven.minecraftforge.net' } + mavenCentral() + } + dependencies { + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true + } +} +// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. +plugins { + id 'eclipse' + id 'maven-publish' + id 'com.github.johnrengelman.shadow' version '7.1.2' +} +apply plugin: 'net.minecraftforge.gradle' + + +version = '2.18.5' +group = 'coloryr.allmusic' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = '[Forge1.18.2]AllMusic_Server' + +// Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. +java.toolchain.languageVersion = JavaLanguageVersion.of(17) + +println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" +minecraft { + // The mappings can be changed at any time and must be in the following format. + // Channel: Version: + // official MCVersion Official field/method names from Mojang mapping files + // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official + // + // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. + // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md + // + // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge + // Additional setup is needed to use their mappings: https://github.com/ParchmentMC/Parchment/wiki/Getting-Started + // + // Use non-default mappings at your own risk. They may not always work. + // Simply re-run your setup task after changing the mappings to update your workspace. + mappings channel: 'official', version: '1.18.2' + + // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. + + // Default run configurations. + // These can be tweaked, removed, or duplicated as needed. + runs { + client { + workingDirectory project.file('run') + + // Recommended logging data for a userdev environment + // The markers can be added/remove as needed separated by commas. + // "SCAN": For mods scan. + // "REGISTRIES": For firing of registry events. + // "REGISTRYDUMP": For getting the contents of all registries. + property 'forge.logging.markers', 'REGISTRIES' + + // Recommended logging level for the console + // You can set various levels here. + // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels + property 'forge.logging.console.level', 'debug' + + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', 'allmusic' + + mods { + allmusic { + source sourceSets.main + } + } + } + + server { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', 'allmusic' + + mods { + allmusic { + source sourceSets.main + } + } + } + + // This run config launches GameTestServer and runs all registered gametests, then exits. + // By default, the server will crash when no gametests are provided. + // The gametest system is also enabled by default for other run configs under the /test command. + gameTestServer { + workingDirectory project.file('run') + + // Recommended logging data for a userdev environment + // The markers can be added/remove as needed separated by commas. + // "SCAN": For mods scan. + // "REGISTRIES": For firing of registry events. + // "REGISTRYDUMP": For getting the contents of all registries. + property 'forge.logging.markers', 'REGISTRIES' + + // Recommended logging level for the console + // You can set various levels here. + // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels + property 'forge.logging.console.level', 'debug' + + // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. + property 'forge.enabledGameTestNamespaces', 'allmusic' + + mods { + allmusic { + source sourceSets.main + } + } + } + + data { + workingDirectory project.file('run') + + property 'forge.logging.markers', 'REGISTRIES' + + property 'forge.logging.console.level', 'debug' + + // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. + args '--mod', 'allmusic', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + + mods { + allmusic { + source sourceSets.main + } + } + } + } +} + +// Include resources generated by data generators. +sourceSets.main.resources { srcDir 'src/generated/resources' } + +repositories { + // Put repositories for dependencies here + // ForgeGradle automatically adds the Forge maven and Maven Central for you + + // If you have mod jar dependencies in ./libs, you can declare them as a repository like so: + // flatDir { + // dir 'libs' + // } +} + +dependencies { + // Specify the version of Minecraft to use. If this is any group other than 'net.minecraft', it is assumed + // that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied. + // The userdev artifact is a special name and will get all sorts of transformations applied to it. + minecraft 'net.minecraftforge:forge:1.18.2-40.2.1' + + shadow 'com.squareup.okhttp3:okhttp:4.10.0' + shadow 'org.xerial:sqlite-jdbc:3.39.3.0' + + // Real mod deobf dependency examples - these get remapped to your current mappings + // compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency + // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency + // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency + + // Examples using mod jars from ./libs + // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}") + + // For more info... + // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html + // http://www.gradle.org/docs/current/userguide/dependency_management.html +} + +shadowJar { +// relocate 'okhttp3', 'coloryr.allmusic.lib.okhttp3' +// relocate 'okio', 'coloryr.allmusic.lib.okio' +// relocate 'kotlin', 'coloryr.allmusic.lib.kotlin' +// relocate 'org.intellij', 'coloryr.allmusic.lib.org.intellij' +// relocate 'org.jetbrains', 'coloryr.allmusic.lib.org.jetbrains' + configurations = [project.configurations.shadow] + archiveClassifier.set('') +// dependencies { +// include(dependency('com.squareup.okhttp3:okhttp:4.10.0')) +// include(dependency('org.xerial:sqlite-jdbc:3.39.3.0')) +// } +} + +// Example for how to get properties into the manifest for reading at runtime. +jar { + manifest { + attributes([ + "Specification-Title" : "allmusic", + "Specification-Vendor" : "allmusic", + "Specification-Version" : "1", // We are version 1 of ourselves + "Implementation-Title" : project.name, + "Implementation-Version" : project.jar.archiveVersion, + "Implementation-Vendor" : "allmusic", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + ]) + } +} + +// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing +// publish.dependsOn('reobfJar') + +publishing { + publications { + mavenJava(MavenPublication) { + artifact jar + } + } + repositories { + maven { + url "file://${project.projectDir}/mcmodsrepo" + } + } +} + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation +} + +reobf { + shadowJar {} +} + +//tasks.build.dependsOn shadowJar +//tasks.build.dependsOn reobfShadowJar +jar.finalizedBy('reobfJar') \ No newline at end of file diff --git a/forge_1_18_2/changelog.txt b/forge_1_18_2/changelog.txt new file mode 100644 index 00000000..707cfcdd --- /dev/null +++ b/forge_1_18_2/changelog.txt @@ -0,0 +1,440 @@ +1.18.x Changelog +40.2 +==== + - 40.2.1 Fire TickEvent.WorldTickEvent on ClientLevel tick (#9304) + - 40.2.0 Mark 1.18.2 Recommended Build 2 + +40.1 +==== + - 40.1.93 Fix mob block breaking AI when chunk 0,0 is unloaded Fixes #9241 (#9250) + - 40.1.92 [1.18.x] Make check tasks fail and report errors (#9228) + * Make check tasks fail and report errors + * License header and sas + - 40.1.91 [1.18.x] Make Util.memoize thread-safe (#9166) + * Make Util.memoize thread-safe + * Add the forge marker present in the PR + - 40.1.90 [1.18] Improve extensibility of DetectorRailBlock and PoweredRailBlock (#9156) + * Improve extensibility of DetectorRailBlock and PoweredRailBlock + * Add missing license header to BlockGrowFeatureTest + - 40.1.89 [1.18.x] Add supplier to FlowerBlock so it works with custom MobEffects (#9140) + * add supplier to FlowerBlock so it works with custom MobEffects + * address comments by @Matyrobbrt + * address comments by @ChampionAsh5357 + * fix missing exc entry + * remove null check and rename constructor parameter + - 40.1.88 [1.18.x] Backport grindstone event from 1.19 (#9090) + * Backport grindstone event from 1.19 + * Fix several bugs in the original PR related to canceling the event + Fix canceling the event not clearing the result item, causing it to dupe whatever the result with the previous item was + Fix canceling the event running vanilla behavior if vanilla behavior ran at all since the menu was opened and no other listener changed the XP + * Add comments to the test mod explaining the expected behavior + * Clarify docs on behavior of the XP + Makes it clear XP is ignored in on place if the output is empty or the event is canceled + * Fix broadcast changes not being called if the event overrides grindstone behavior + Not sure its strictly needed, but every vanilla branch in the function calls it and its a trivial change. + * Add enabled flag to the test mod + * Improve javadocs + (cherry picked from commit e12c849cc0f4e1a031c06be9cb6489d21e4b1685) + * Formatting fixes + * Apply javadoc suggestions from review + Co-authored-by: matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> + * Correct capitalization in event name + * Javadoc improvements + Remove some redundancy in certain javadoc comments + Add @see to the header + Inline single line javadocs + * Add some funny curly brackets next to returns + Seems the kids these days have invented a new way to write return statements in javadocs + * Remove extra dots and capital letters + The return tag apparently puts more dots at the end, and having two dots on each sentence is not in the budget. Have also reached the capital letter quota + * Apply suggestions from code review + Co-authored-by: matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> + Co-authored-by: ferriarnus <61201275+ferriarnus@users.noreply.github.com> + Co-authored-by: matyrobbrt <65940752+Matyrobbrt@users.noreply.github.com> + - 40.1.87 [1.18.2] Fix compatibility checker task configuration (#9229) + - 40.1.86 Enable additional build types to handle pull request validation. (#9160) + - 40.1.85 [1.18.x] Improve logging of missing or unsupported dependencies (#9108) + - 40.1.84 [1.18.x] Make LivingSetAttackTargetEvent compatible with the Brain/Behavior system. (#8918) + - 40.1.83 [1.18.x] Backport recipe grouping feature to 1.18. (#8984) + - 40.1.82 [1.18.x] Invalidate lazy optionals properly (#9082) + - 40.1.81 [1.18.x] Fix NPE when feeding cats and wolves (#9075) + - 40.1.80 Revert "[1.18.x] Backport: Cache resource listing calls in resource packs (#8868)" (#9026) + This reverts commit 4df024ef43524d8ec48928c70f561903f7a8e184. + - 40.1.79 [1.18.x] Backport #8981 ("Add event to growing fungus") to 1.18 (#8998) + - 40.1.78 LTS Backport of ModMismachEvent (#8989) (#9010) + - 40.1.77 LTS Backport of #8927 (#9012) + - 40.1.76 Backport Reach Distance fix (#9008) + - 40.1.75 Backport version-checker user-agent changes to 1.18 (#8975) + - 40.1.74 Fix circular dependency in static init of RecipeBookRegistry (#8996) + - 40.1.73 Backport: Load custom ITransformationServices from the classpath in dev (#8350) + - 40.1.72 [1.18.x] Backport: Cache resource listing calls in resource packs (#8868) + - 40.1.71 Backport: Re-add PotentialSpawns event (#8944) + - 40.1.70 [1.18.2][Backport] Let isRemotePresent check minecraft:register for packet ids from other mod loaders (#8943) + - 40.1.69 Fix crossbows not firing ArrowLooseEvent (#8888) + - 40.1.68 [1.18] Allow blocks to provide a dynamic MaterialColor for display on maps (#8855) + - 40.1.67 [1.18.x] Add RenderLevelStageEvent to expand on and replace RenderLevelLastEvent (#8603) + - 40.1.66 [1.18] Fix EnumArgument to use enum names for suggestions (#8746) + Previously, the suggestions used the string representation of the enum + through Enum#toString, which can differ from the name of the enum as + required by Enum#valueOf, causing invalid suggestions (both in gui and + through the error message). + Using Enum#name fixes this discrepancy, so now the suggestions are + always valid inputs regardless of the return of Enum#toString. + Fixes #8618 + - 40.1.65 [1.18] Add MC-105317 fix into patch to rotate entities in structures properly (#8793) + - 40.1.64 [1.18] Update to the latest JarJar (#8848) + - 40.1.63 [1.18.x] Fix a weird interaction between shulker boxes and hoppers. (#8824) + - 40.1.62 [1.18.x] Implement full support for IPv6 (#8376) + - 40.1.61 [1.16] Make tryEmptyContainer respect doDrain (#8318) + - 40.1.60 Jar-In-Jar (#8657) + * Jar-In-Jar + * Change to use the custom 4.x SPI. + * Bump JarJar to fix some version range selectors. + * Address requested changes. + * Mark the JiJ locator as a locator. + * Remove the unused imports. + - 40.1.59 Fix static member ordering crash in UnitSprite (#8839) + The previous ordering caused LOCATION to be null during the construction + of the UnitSprite INSTANCE, leading to errors as the atlas location for + the sprite would be null. + Fixes #8795 + - 40.1.58 Backport: ForgeChunkManager ticking ticket fixes. (#8784) + - 40.1.57 Delete LootItemRandomChanceCondition.java.patch (#8734) + - 40.1.56 Use stack sensitive translation key by default (#8674) + - 40.1.55 Add callback after a BlockState was changed and the neighbors were updated (#8617) + - 40.1.54 [1.18.x] Allow safely registering RenderType predicates at any time (#8671) + * Allow safely registering RenderType predicates at any time + * Requested changes + - 40.1.53 Add Filtered Message to ServerChatEvent + - 40.1.52 [1.18] Make ConfigValue implement Supplier. (#8777) + - 40.1.51 Make IVertexConsumers such as the lighting pipeline, be aware of which format they are dealing with (#8665) + Also fix Lighting pipeline ignoring the overlay coords from the block renderer. + - 40.1.50 Revert "TeamCity change in 'MinecraftForge / MinecraftForge' project: build features of 'Build' build configuration were updated" + This reverts commit 0cc85bc314c8c90f1bdb24d77c7035bb09150489. + - 40.1.49 TeamCity change in 'MinecraftForge / MinecraftForge' project: build features of 'Build' build configuration were updated + - 40.1.48 [1.18.x] Fix #8530 (Banner Pattern) NPE (#8666) + - 40.1.47 Revert "[1.18.x] Enable the Forge light pipeline by default (#8629)" (#8663) + - 40.1.46 Fix eager loading of model loaders during datagen causing NPE (#8659) + - 40.1.45 [1.18.x] Fix 2 crossbow animations not applying to custom variants (#8625) + - 40.1.44 [1.18.x] Added new Disconnection screen to display better channel/registry mismatch information (#8402) + Co-authored-by: Curle <42079760+TheCurle@users.noreply.github.com> + - 40.1.43 [1.18] Avoid exclusive synchronisation in block render type lookups (#8476) + - 40.1.42 [1.18] Fix command redirects by replacing Commands#fillUsableCommands (#8616) + Commands#fillUsableCommands does not handle redirect nodes properly. It + blindly pulls from the cached node map for a redirect node, which may + have no result because the target node of the redirect has not been + visited yet. + CommandHelper#mergeCommandNode is better in this regard, because it + visits the target node of the redirect instead of blindly pulling from + the node map. + Fixes #7551 + - 40.1.41 [1.18] Fix tags command suggestion to include dynamic registries (#8638) + Manually entering the names of dynamic registries work as expected. The + suggestions for registries didn't include dynamic registries because + they queried the static registries rather than querying all registries + from the server's `RegistryAccess` (which includes both static + registries and dynamic registries). + - 40.1.40 Low code language provider (#8633) + Co-authored-by: Curle <42079760+TheCurle@users.noreply.github.com> + - 40.1.39 [1.18.x] Add checkJarCompatibility task (#8644) + - 40.1.38 [1.18.x] Fix Banner Patterns not being extensible (#8530) + Co-authored-by: Curle <42079760+TheCurle@users.noreply.github.com> + - 40.1.37 1.18.x Port BiomeDictionary over to biome tags (#8564) + - 40.1.36 [1.18.x] Enable the Forge light pipeline by default (#8629) + - 40.1.35 [1.18.x] Allow Modders to add custom data-pack registries through RegistryBuilder (#8630) + Co-authored-by: Silverminer007 <66484505+Silverminer007@users.noreply.github.com> + Co-authored-by: Curle <42079760+TheCurle@users.noreply.github.com> + - 40.1.34 [1.18] Allow custom rarities to directly modify the style (#8648) + - 40.1.33 [1.18] Fix reload listener registration in ModelLoaderRegistry (#8650) + - 40.1.32 Fix wrong position in Level#hasChunk() call in IForgeBlockGetter (#8654) + - 40.1.31 Add ItemStack context to Enchantment#getDamageBonus (#8635) + - 40.1.30 Fix attack cooldown bar showing when out of reach of target. Closes #8639 (#8640) + - 40.1.29 Improve TagsUpdatedEvent by adding update case information. (#8636) + - 40.1.28 Deprecate patched-in Style methods for removal, vanilla variants exist. (#8615) + - 40.1.27 Add pack-type-specific format versions in pack metadata. Fixes #8563 (#8612) + - 40.1.26 Catch and aggregate exceptions during NewRegistryEvent (#8601) + - 40.1.25 Added removeErroringEntities config option (#8627) + Counterpart to removeErroringBlockEntities + - 40.1.24 Add missing patches for not lowering mipmap level for small textures (#8622) + - 40.1.23 Make TransformType enum extensible, includes the possibility to specify a fallback type for cases where models don't specify the transform explicitly. (#8566) + Makes it possible to add new perspectives. + - 40.1.22 Fix CheckSAS to actually validate that the SAS line will do something. + This removes all method level lines as they are not necessary now. + - 40.1.21 Add Attack Range attribute and Update Reach Distance (#8478) + - 40.1.20 Implement PlayerNegotiationEvent (#8599) + - 40.1.19 Fire EntityTravelToDimensionEvent in all expected cases (#8614) + Fixes #8520 + - 40.1.18 Fix isEdible crash (#8613) + Fixes #8602 + - 40.1.17 Fix typo in Snow Golem patch causing them to destroy blocks they shouldn't. Closes #8611 + - 40.1.16 Re-introduce an attribute for entity step height in a non-breaking way (#8607) + - 40.1.15 Revert step height attribute (#8604) + - 40.1.14 [1.18.x] Fix ContextNbtProvider serializing the wrong name (#8575) + - 40.1.13 Let BaseRailBlock decide if the calculated RailShape for placement or connection to neighbors is valid (#8562) + - 40.1.12 Fix shears not playing a breakage sound (#8600) + - 40.1.11 Update IExtensionPoint javadoc to be correct (#8568) + - 40.1.10 Fix IDs of Multi-part entities being desynced across client and server. (#8576) + - 40.1.9 Expose ICondition$IContext to modded reload listeners. (#8596) + - 40.1.8 Fix undead causing chunkloading leading to extensive lag (#8583) + - 40.1.7 Accomodate Bukkit-like Servers not sending Command Args (#8582) + Note to modded server devs: + Please, please, please implement full compatibility with [Brigadier](https://github.com/Mojang/Brigadier) instead of hacking around it. + - 40.1.6 Restore translation key comments to ForgeConfigSpec (#8584) + - 40.1.5 Fix entity parts being ignored when collecting entities in an AABB (#8588) + Previously entity parts are only taken into consideration when the parent entity is in a chunk that intersects with the AABB + - 40.1.4 Fix EntityInteraction event running twice on client side (#8598) + - 40.1.3 Introduce an attribute for step height additions (#8389) + - 40.1.2 Fix shears passing on a client when interacting with a shearable entity (#8597) + Caused the offhand item to also interact with the entity, possibly sending a packet to the server causing both hands to interact + - 40.1.1 Allow Exception passed through CommandEvent to propagate (#8590) + - 40.1.0 Mark 1.18.2 Recommended Build. + Co-authored-by: sciwhiz12 + Co-authored-by: Marc Hermans + Co-authored-by: Curle + Co-authored-by: SizableShrimp + Co-authored-by: David Quintana + +40.0 +==== + - 40.0.54 Add event for hooking into StructuresBecomeConfiguredFix Fixes #8505 + Pass-through unknown structure IDs with "unknown." prefix + This avoids the fixer throwing an exception due to the unknown + structure, which causes the chunk data to be dropped (and freshly + regenerated later). The deserializer logs and ignores the unknown + structure ID, avoiding full chunk data loss. + - 40.0.53 Fix missed patch for loading modded dimensions on Dedicated Server start (#8555) + - 40.0.52 Fix potential concurrency issues with BiomeDictionary. Closes #8266 + - 40.0.51 Fix debug text being rendered slightly wrong. + - 40.0.50 Fix intrusive handlers on dummy objects. + - 40.0.49 Amend license header to include contributors and apply to FML subprojects (#8525) + After internal discussion, it was decided that we need to include + "contributors" to the license header. This avoids claiming that the + Java source files are under the exclusive copyright ownership of Forge + LLC, which excludes contributors that still hold copyright ownership + over their contributions (but is licensed under the LGPLv2.1 as stated + in the Forge CLA). + - 40.0.48 Add modern implementation of the Slider widget and deprecate the old one (#8496) + - 40.0.47 Implement ItemStack and LivingEntity sensitive method to get the FoodProperties for an Item (#8477) + - 40.0.46 Add use context and simulate flag to getToolModifiedState, enabled HOE_TILL action. (#8557) + - 40.0.45 Remove bad patch for AbstractFurnaceBlockEntity (#8561) + The patch prevented the entity from being marked as changed when an + item finished smelting. + - 40.0.44 Fix issues with custom forge ingredients causing sub ingredients to be prematurely and invalidly cached (#8550) + Add config option and skip checking for empty ingredients in shapeless recipe deserialization + - 40.0.43 Add EnderManAngerEvent to make it possible to prevent endermen getting angry at a player based on more then their helmet. (#8406) + - 40.0.42 Fix misaligned patch in BlockEntity.save. + - 40.0.41 Expose `getHolder()` method on RegistryObject, as helper for when absolutely necessary to pass into Vanilla code. (#8548) + It is recommended you avoid if you can. + - 40.0.40 Fix return value of Recipe#isIncomplete being inaccurate for empty tags (#8549) + - 40.0.39 Simplfy default behavior of isSimple (#8543) + isSimple should only return true if the ingredient is any more sensitive then JUST itemA == itemB + It used to take metadata and damage into account, but that was removed in the flattening. + Also prevents fetching tag values too early, as tags are not ready during the ingredient constructor + - 40.0.38 Implement IPlantable in BambooBlock (#8508) + - 40.0.37 Fix compiler error in eclipse, bump MCPConfig for FF/Record fix. + - 40.0.36 Fix TagEmptyCondition by passing tag context into conditional and recipe deserializers. (#8546) + - 40.0.35 Allow using DeferredRegisters for vanilla registries (#8527) + Catch and aggregate exceptions when applying object holders + - 40.0.34 Remove cut copper from copper storage blocks tag. Closes #8403 (#8539) + - 40.0.33 Fix brewing stand input placement not auto-splitting stackable potions. (#8534) + - 40.0.32 Fix lost validation of registry data on singleplayer world load (#8533) + Fix some leftover 1.18.2 TODOs + - 40.0.31 1.18 Allow mod menus to have their own recipebook (#8028) + - 40.0.30 [1.18.x] Add 3 new ingredient types, and make existing ingredients compatible with datagen (#8517) + - 40.0.29 [1.18.x] Add the projectile search event. (#8322) + Co-authored-by: noeppi_noeppi + - 40.0.28 Allow confirm-and-save of the Experimental Settings warning. (#7275) + - 40.0.27 Add hook for powdered-snow shoes (#8514) + - 40.0.26 Add some helper Access Transformers (#8490) + - 40.0.25 Fix incorrect method used in getStream (#8532) + The original correct method is getPath, but the patch uses getLocation. + The former is the actual resource path to the sound OGG file, while the + latter is the sound's location. + Fixes #8531 + - 40.0.24 [1.18] Make it easier to register custom skull blocks models (#8351) + - 40.0.23 Rework fog events (#8492) + - 40.0.22 Update Forge Auto Renaming Tool to the latest version (#8515) + - 40.0.21 Add patches to enable MobEffects with IDs > 255 (#8380) + - 40.0.20 Allow sound instances to play custom audio streams (#8295) + - 40.0.19 Fix NPE caused by canceling onServerChatEvent (#8516) + - 40.0.18 [1.18.2] Fix tags for custom forge registries. (#8495) + Tag-enabled registries must now be registered to vanilla's root registry. See RegistryBuilder#hasTags. + Modded tag-enabled registries have to use the format `data//tags///.json` + This format is to prevent conflicts for registries with the same path but different namespaces + EX: Registry name `examplemod:shoe`, tag name `blue_shoes` would be `data//tags/examplemod/shoe/blue_shoes.json` + RegistryEvent.NewRegistry has been moved and renamed to NewRegistryEvent. + RegistryBuilder#create has been made private. See NewRegistryEvent#create + Created new ITagManager system for looking up Forge tags. See IForgeRegistry#tags. + Add lookup methods for Holders from forge registries. See IForgeRegistry#getHolder. + - 40.0.17 Lower custom item entity replacement from highest to high so mods can cancel it during a specific tick (#8417) + - 40.0.16 Fix MC-176559 related to the Mending enchantment (#7606) + - 40.0.15 [1.18.x] Allow blocks to hide faces on a neighboring block (#8300) + * Allow blocks to hide faces on a neighboring block + * Allow blocks to opt-out of external face hiding + - 40.0.14 [1.18.x] Fix FMLOnly in forgedev and userdev (#8512) + - 40.0.13 Clear local variable table on RuntimeEnumExtender transformation (#8502) + - 40.0.12 Pass server resources to reload listener event (#8493) + - 40.0.11 Use UTF-8 charset for Java compilation (#8486) + - 40.0.10 Use wither as griefing entity when it indirectly hurts an entity (#8431) + - 40.0.9 Provide access to the haveTime supplier in WorldTickEvent and ServerTickEvent (#8470) + - 40.0.8 Fix durability bar not respecting an item's custom max damage (#8482) + - 40.0.7 Add event for controlling potion indicators size (#8483) + This event allows forcing the rendering of the potion indicators in the + inventory screen to either compact mode (icons only) or classic mode + (full width with potion effect name). + - 40.0.6 Introduce system mods to mod loading (#8238) + Core game mods are mods which are required to exist in the environment + during mod loading. These may be specially provided mods (for example, + the `minecraft` mod), or mods which are vital to the framework which + FML is connected to (for example, Forge and the `forge` mod). + These core game mods are used as the only existing mods in the mod list + if mod sorting or dependency verification fails. This allows later + steps in the which use resources from these mod files to work correctly + (up to when the error screen is shown and the game exits). + - 40.0.5 Add missing module exports arg to server arguments list (#8500) + - 40.0.4 Fixed swim speed attribute (#8499) + - 40.0.3 Fix incorrect movement distance calculation (#8497) + - 40.0.2 Add support to Forge registry wrappers for new Holder system. Closes #8491 + Fix TagBasedToolTypesTest not generating needed data correctly. + - 40.0.1 Fix JNA not working at runtime and causing issues with natives. + - 40.0.0 Update to 1.18.2 + Co-authored-by: sciwhiz12 + Co-authored-by: Marc Hermans + Co-authored-by: LexManos + Co-authored-by: Curle + +39.1 +==== + - 39.1.2 1.18.x Omnibus (#8239) + - 39.1.1 Bump modlauncher and securejarhandler version (#8489) + - 39.1.0 Update license headers to compact SPDX format. + License has not changed, this is just more compact and doesn't include years. + Bump version for RB. + +39.0 +==== + - 39.0.91 Remove - from allowed characters in mod ids. + The Java Module System does not allow them in module ids. + Closes #8488 + - 39.0.90 Fix static initializer crash when loading BakedRenderable. + - 39.0.89 Fix regressions for onAddedTo/RemovedFromWorld and related events (#8434) + - 39.0.88 [1.18] Integrate the gametest framework with Forge (#8225) + - 39.0.87 Re-add missing Shulker patch for EntityTeleportEvent (#8481) + - 39.0.86 Fix entity type in conversion event to Drowned (#8479) + - 39.0.85 Add VanillaGameEvent to allow for globally listening to vanilla's GameEvents (#8472) + - 39.0.84 Provide damage source context to Item#onDestroyed(ItemEntity) (#8473) + - 39.0.83 Add missing shear and elytra game events (#8471) + - 39.0.82 Fix comment for permission handler config setting (#8466) + - 39.0.81 Apply nullable annotations to LootingLevelEvent (#8422) + - 39.0.80 Fix Mob Spawner logic with CustomSpawnRules. Closes #8398 + - 39.0.79 Fix LivingDropsEvent not having all drops for foxes (#8387) + - 39.0.78 Add missing Locale parameter to String.format calls, Fixes getArmorResource functionality on some locaales. (#8463) + - 39.0.77 Allow items to hide parts of their tooltips by default (#8358) + - 39.0.76 Prevent 1.x Branches being treated as Pull Requests. (#8443) + - 39.0.75 Fix RegistryObject not working if created after registry events (#8383) + - 39.0.74 Add support for tagging StructureFeatures (#8408) + - 39.0.73 Re-added the patch for LivingExperienceDropEvent and enable it for dragons (#8388) + - 39.0.72 Implement getPickupSound on ForgeFlowingFluid (#8374) + - 39.0.71 Add getCodec method in ForgeRegistry (#8333) + - 39.0.70 Fix #8298 (MobBucketItem) and add test mod (#8313) + - 39.0.69 Deprecate IForgeAbstractMinecart::getCartItem (#8283) + - 39.0.68 Fix HoeItem patch incorrectly applied during migration. (#8384) + - 39.0.67 Fix issues with client only commands in combination with server only commands not using MC's command system. (#8452) + - 39.0.66 Fix FoliagePlacerType and TreeDecoratorType registry (#8394) + - 39.0.65 Fix PlayerChangeGameModeEvent (#8441) + - 39.0.64 Fix comparison of custom ParticleRenderTypes leading to broken particle effects. (#8385) + - 39.0.63 Fix cases where null is potentially sent to Screen events. Closes #8432 + - 39.0.62 Ensure ScreenEvent doesn't accept null screens (#8296) + - 39.0.61 Update cobblestone tags (#8292) + - 39.0.60 Prevent release of custom payload packet buffer on the server side. (#8181) + - 39.0.59 Make `MinecraftLocator` respect non-`MOD` FML Mod Types Fixes #8344 (#8346) + - 39.0.58 Fix vanilla worlds being marked experimental (#8415) + - 39.0.57 Simplify usage of IItemRenderProperties::getArmorModel (#8349) + - 39.0.56 Hide mod update notification while screen is still fading in (#8386) + - 39.0.55 Revert "Hooks to allow registering and managing custom DFU schemes and types. (#8242)" + - 39.0.54 Provide NPE protection against out of order init of the TYPES and REF (#8410) + - 39.0.53 Add ShieldBlockEvent (#8261) + - 39.0.52 Add renderable API to allow easier rendering of OBJ and other custom models, from Entity and BlockEntity renderers. (#8259) + This is a redesign of a discarded section of my initial model system rewrite, back in 1.14. + In order to use it with the OBJ loader, you can use OBJLoader.INSTANCE.loadModel to get the OBJModel, and then call OBJModel#bakeRenderable() to get a SimpleRenderable object to render with. + The SimpleRenderable support animation, by providing different transformation matrices for each part in the MultipartTransforms. + Additionally, a BakedRenderable helper exists to turn an arbitrary BakedModel into a renderable. + After trying to get the B3D loader to work, I decided it wasn't worth the trouble and marked it for removal instead. + - 39.0.51 Merge values of defaulted optional tags, Fixes issue where multiple mods declare the same optional tag. (#8250) + - 39.0.50 Added new 1.18 biomes to the BiomeDictionary (#8246) + - 39.0.49 Hooks to allow registering and managing custom DFU schemes and types. (#8242) + - 39.0.48 Ping data compression (#8169) + - 39.0.47 Expand the LevelStem codec to allow dimension jsons to specify that the dimension's chunk generator should use the overworld/server's seed (#7955) + - 39.0.46 Add Client Commands (#7754) + - 39.0.45 Remove references to the now-broken `BlockEntity#save(CompoundTag)` method (#8235) + - 39.0.44 update McModLauncher libraries to newer versions... + - 39.0.43 add extra keystore properties + - 39.0.42 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.41 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.40 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.39 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.38 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.37 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.36 fix crowdin key + - 39.0.35 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.34 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.33 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.32 fix secondary branches builds + - 39.0.31 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated + - 39.0.30 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated + - 39.0.29 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated + - 39.0.28 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated + - 39.0.27 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated + - 39.0.26 TeamCity change in 'MinecraftForge / MinecraftForge' project: parameters of 'Build - Secondary Branches' build configuration were updated + - 39.0.25 TeamCity change in 'MinecraftForge / MinecraftForge' project: VCS roots of 'Build - Secondary Branches' build configuration were updated + - 39.0.24 Remove primary branches from building on secondary branch configuration and publish crowdin data. (#8397) + * Remove the normalized branch names also from the filter. + * Add the additional publishing arguments to get the crowdin information. + * TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + * Fix the configuration. + * Remove the required patch and use the base script. + * Make a note about the reference. + Co-authored-by: cpw + - 39.0.23 TeamCity change in 'MinecraftForge / MinecraftForge' project: project parameters were changed + - 39.0.22 Correct the build configuration to support a setup. (#8395) + * Add a setup task and publish the correct versions. + * Reconfigure build task and disable the normal build and test cycle on everything but pull requests, run an assemble there. + * Fix the derp in the build configuration. + - 39.0.21 Enable the TeamCity CI pipeline (#8368) + * Setup the build.gradle + * Setup the teamcity toolchain. + * Revert the usage of the local build of GU. + * Automatically add it now, it will always exist and is added to maven automatically by GU. + * Implement the branch filter and move the constant for the minimal changelog tag to a constant in the extension. + * Adding the JDK and Gradle version to the build script. + - 39.0.20 Fix and improve Ingredient invalidation (#8361) + - 39.0.19 Rework world persistence hooks to fix the double registry injection when loading single player worlds. (#8234) + - 39.0.18 Update tags for new 1.17 and 1.18 content (#7891) + - 39.0.17 Fix TerrainParticle rendering black under certain conditions (#8378) + - 39.0.16 Allow modded tools to work on glow lichen (#8371) + - 39.0.15 Fix custom climbable blocks not sending a death message (#8372) + Fixes #8370 + - 39.0.14 Provide access to the blockstate in BucketPickup#getPickupSound for multiply-logged blocks (#8357) + - 39.0.13 Fix clients being unable to deserialize tags for custom registries (#8352) + - 39.0.12 Fix particles going fullbright for a few frames when first spawning (#8291) + - 39.0.11 Also create parent directories when creating config files (#8364) + - 39.0.10 Fix crash with PermissionsAPI (#8330) + Fixes a crash in singleplayer, when the internal server didn't shut down correctly between world loads. + - 39.0.9 Re-add missing default spawn lists in features (#8285) + Fixes #8265 + Fixes #8301 + - 39.0.8 Fixed incorrect generic in PermissionAPI (#8317) + - 39.0.7 Redo of the whole PermissionAPI (#7780) + Co-authored-by: LexManos + - 39.0.6 Fix misplaced patch in SpreadingSnowyDirtBlock. + Fixes #8308. + - 39.0.5 Add RenderArmEvent to make overriding just the arm rendering not require copying nearly as much vanilla code (#8254) + - 39.0.4 Add MobEffect tags (#8231) + - 39.0.3 Log missing or unsupported dependencies (#8218) + - 39.0.2 Fix datagen test for sounds definitions provider (#8249) + - 39.0.1 Fix wrong stage being declared in transition to common (#8267) + - 39.0.0 Update to 1.18.1 + Co-Authored by: + - Curle + _ Orion + diff --git a/forge_1_18_2/gradle.properties b/forge_1_18_2/gradle.properties new file mode 100644 index 00000000..878bf1f7 --- /dev/null +++ b/forge_1_18_2/gradle.properties @@ -0,0 +1,4 @@ +# Sets default memory used for gradle commands. Can be overridden by user or command line properties. +# This is required to provide enough memory for the Minecraft decompilation process. +org.gradle.jvmargs=-Xmx3G +org.gradle.daemon=false \ No newline at end of file diff --git a/forge_1_18_2/gradle/wrapper/gradle-wrapper.jar b/forge_1_18_2/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY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aX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 0 HcmV?d00001 diff --git a/forge_1_18_2/gradle/wrapper/gradle-wrapper.properties b/forge_1_18_2/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..ae04661e --- /dev/null +++ b/forge_1_18_2/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/forge_1_18_2/gradlew b/forge_1_18_2/gradlew new file mode 100644 index 00000000..c53aefaa --- /dev/null +++ b/forge_1_18_2/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# 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. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# 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 +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 + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +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 + +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 ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +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 + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + 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 +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +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 + +# 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. + +# 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" "$@" diff --git a/forge_1_18_2/gradlew.bat b/forge_1_18_2/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/forge_1_18_2/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/AllMusicForge.java b/forge_1_18_2/src/main/java/coloryr/allmusic/AllMusicForge.java new file mode 100644 index 00000000..baeb76e3 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/AllMusicForge.java @@ -0,0 +1,127 @@ +package coloryr.allmusic; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.command.CommandEX; +import coloryr.allmusic.side.forge.CommandForge; +import coloryr.allmusic.side.forge.LogForge; +import coloryr.allmusic.side.forge.SideForge; +import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.ParseResults; +import com.mojang.brigadier.arguments.StringArgumentType; +import com.mojang.logging.LogUtils; +import net.minecraft.client.Minecraft; +import net.minecraft.commands.CommandSource; +import net.minecraft.commands.CommandSourceStack; +import net.minecraft.commands.Commands; +import net.minecraft.commands.arguments.ComponentArgument; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.MinecraftServer; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.RegisterCommandsEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; +import net.minecraftforge.event.server.ServerStartingEvent; +import net.minecraftforge.event.server.ServerStoppingEvent; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.ModLoadingContext; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import net.minecraftforge.network.NetworkEvent; +import net.minecraftforge.network.NetworkRegistry; +import net.minecraftforge.network.simple.SimpleChannel; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; +import net.minecraftforge.server.command.ForgeCommand; +import org.slf4j.Logger; + +import java.io.File; +import java.nio.charset.StandardCharsets; +import java.util.Locale; +import java.util.function.Supplier; + +import static net.minecraftforge.server.command.ForgeCommand.*; + +// The value here should match an entry in the META-INF/mods.toml file +@Mod(AllMusicForge.MODID) +public class AllMusicForge { + public static MinecraftServer server; + public static final SimpleChannel channel = NetworkRegistry.newSimpleChannel(new ResourceLocation("allmusic", "channel"), + () -> "1.0", s -> true, s -> true); + + // Define mod id in a common place for everything to reference + public static final String MODID = "allmusic"; + // Directly reference a slf4j logger + public static final Logger LOGGER = LogUtils.getLogger(); + // Create a Deferred Register to hold Blocks which will all be registered under the "examplemod" namespace + + public AllMusicForge() { + IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); + + // Register the commonSetup method for modloading + modEventBus.addListener(this::commonSetup); + + // Register ourselves for server and other game events we are interested in + MinecraftForge.EVENT_BUS.register(this); + } + + private void commonSetup(final FMLCommonSetupEvent event) { + channel.registerMessage(666, String.class, this::enc, this::dec, this::proc); + + String path = String.format(Locale.ROOT, "config/%s/", "AllMusic"); + + AllMusic.log = new LogForge(); + AllMusic.side = new SideForge(); + + new AllMusic().init(new File(path)); + } + + private void enc(String str, FriendlyByteBuf buffer) { + buffer.writeBytes(str.getBytes(StandardCharsets.UTF_8)); + } + + private String dec(FriendlyByteBuf buffer) { + return buffer.toString(StandardCharsets.UTF_8); + } + + private void proc(String str, Supplier supplier) { + NetworkEvent.Context context = supplier.get(); + context.setPacketHandled(true); + } + + @SubscribeEvent + public void onRegisterCommands(RegisterCommandsEvent event) { + CommandDispatcher dispatcher = event.getDispatcher(); + CommandForge.instance.register(dispatcher); + } + + // You can use SubscribeEvent and let the Event Bus discover methods to call + @SubscribeEvent + public void onServerStarting(ServerStartingEvent event) { + server = event.getServer(); + + AllMusic.start(); + Tasks.init(); + + + } + + @SubscribeEvent + public void onServerStopping(ServerStoppingEvent event) { + AllMusic.stop(); + } + + @SubscribeEvent + public void onPlayerLoggedOut(PlayerEvent.PlayerLoggedOutEvent event) { + AllMusic.removeNowPlayPlayer(event.getEntity().getName().getString()); + } + + @SubscribeEvent + public void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) { + AllMusic.joinPlay(event.getEntity().getName().getString()); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/TaskItem.java b/forge_1_18_2/src/main/java/coloryr/allmusic/TaskItem.java new file mode 100644 index 00000000..ed368410 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/TaskItem.java @@ -0,0 +1,6 @@ +package coloryr.allmusic; + +public class TaskItem { + public int tick; + public Runnable run; +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/Tasks.java b/forge_1_18_2/src/main/java/coloryr/allmusic/Tasks.java new file mode 100644 index 00000000..3a432adb --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/Tasks.java @@ -0,0 +1,24 @@ +package coloryr.allmusic; + +import java.util.ArrayList; +import java.util.List; + +public class Tasks { + public static List taskItems = new ArrayList<>(); + + public static void init() { + AllMusicForge.server.addTickable(Tasks::tick); + } + + public static void tick() { + var li = taskItems.iterator(); + while (li.hasNext()) { + var item = li.next(); + item.tick--; + if (item.tick == 0) { + li.remove(); + item.run.run(); + } + } + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/AllMusic.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/AllMusic.java new file mode 100644 index 00000000..309e2bf0 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/AllMusic.java @@ -0,0 +1,481 @@ +package coloryr.allmusic.core; + +import coloryr.allmusic.core.hud.DataSql; +import coloryr.allmusic.core.hud.HudUtils; +import coloryr.allmusic.core.music.api.APIMain; +import coloryr.allmusic.core.music.play.MusicSearch; +import coloryr.allmusic.core.music.play.PlayGo; +import coloryr.allmusic.core.music.play.PlayMusic; +import coloryr.allmusic.core.objs.ConfigObj; +import coloryr.allmusic.core.objs.CookieObj; +import coloryr.allmusic.core.objs.MessageObj; +import coloryr.allmusic.core.objs.hud.SaveObj; +import coloryr.allmusic.core.objs.music.SearchPageObj; +import coloryr.allmusic.core.side.IMyLogger; +import coloryr.allmusic.core.side.ISide; +import coloryr.allmusic.core.sql.IEconomy; +import coloryr.allmusic.core.utils.Logs; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import java.io.*; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.util.*; + +public class AllMusic { + public static final Gson gson = new Gson(); + + /** + * 客户端插件信道名 + */ + public static final String channel = "allmusic:channel"; + /** + * BC插件信道名 + */ + public static final String channelBC = "allmusic:channelbc"; + /** + * 插件版本号 + */ + public static final String version = "2.18.5"; + /** + * 配置文件版本号 + */ + public static final String configVersion = "103"; + /** + * 语言文件配置版本号 + */ + public static final String messageVersion = "103"; + /** + * 搜歌结果 + * 玩家名 结果 + */ + private static final Map searchSave = new HashMap<>(); + /** + * 投票的玩家 + */ + private static final List votePlayer = new ArrayList<>(); + /** + * 正在播放的玩家 + */ + private static final List nowPlayPlayer = new ArrayList<>(); + /** + * 日志 + */ + public static IMyLogger log; + /** + * 服务器端操作 + */ + public static ISide side; + /** + * 是否在运行 + */ + public static boolean isRun; + /** + * Cookie对象 + */ + public static CookieObj cookie; + /** + * 经济插件对象 + */ + public static IEconomy economy; + /** + * 网易API + */ + private static APIMain apiMusic; + /** + * 配置对象 + */ + private static ConfigObj config; + /** + * 语言对象 + */ + private static MessageObj message; + /** + * 配置文件 + */ + private static File configFile; + /** + * Cookie文件 + */ + private static File cookieFile; + /** + * 语言文件 + */ + private static File messageFile; + + /** + * 检查配置文件完整性 + */ + public static void configCheck() { + if (config == null) { + config = ConfigObj.makeDefault(); + log.warning("§d[AllMusic]§c配置文件config.json错误,已覆盖"); + save(); + } else if (config.check()) { + log.warning("§d[AllMusic]§c配置文件config.json错误,已覆盖"); + save(); + } + } + + /** + * 检查语言文件完整性 + */ + private static void messageCheck() { + if (message == null) { + message = new MessageObj(); + log.warning("§d[AllMusic]§c配置文件message.json错误,已覆盖"); + save(); + } else if (message.check()) { + log.warning("§d[AllMusic]§c配置文件message.json错误,已覆盖"); + save(); + } + } + + /** + * 检查是否需要 + * + * @param name 用户名 + * @param server 服务器名 + * @param checkList 是否检查正在播放的列表 + * @return 结果 + */ + public static boolean isOK(String name, String server, boolean checkList) { + try { + if (AllMusic.getConfig().NoMusicServer + .contains(server)) + return true; + if (server != null && AllMusic.getConfig().NoMusicPlayer.contains(name)) + return true; + if (!checkList) + return false; + return AllMusic.containNowPlay(name); + } catch (NoSuchElementException e) { + return true; + } + } + + /** + * 是否存在正在播放的玩家 + * + * @param player 用户名 + * @return 是否存在 + */ + public static boolean containNowPlay(String player) { + return !nowPlayPlayer.contains(player); + } + + /** + * 获取配置文件 + * + * @return 配置对象 + */ + public static ConfigObj getConfig() { + if (config == null) { + log.warning("§d[AllMusic]§c配置文件config.json错误,已使用默认配置文件"); + config = ConfigObj.makeDefault(); + } + return config; + } + + /** + * 获取语言文件 + * + * @return 语言对象 + */ + public static MessageObj getMessage() { + if (message == null) { + log.warning("§d[AllMusic]§c配置文件message.json错误,已使用默认配置文件"); + message = new MessageObj(); + } + return message; + } + + /** + * 添加搜歌结果 + * + * @param player 用户名 + * @param page 结果 + */ + public static void addSearch(String player, SearchPageObj page) { + searchSave.put(player, page); + } + + /** + * 获取搜歌结果 + * + * @param player 用户名 + * @return 结果 + */ + public static SearchPageObj getSearch(String player) { + return searchSave.get(player); + } + + /** + * 删除搜歌结果 + * + * @param player 用户名 + */ + public static void removeSearch(String player) { + searchSave.remove(player); + } + + /** + * 添加投票的玩家 + * + * @param player 用户名 + */ + public static void addVote(String player) { + if (!votePlayer.contains(player)) + votePlayer.add(player); + } + + /** + * 获取投票数量 + * + * @return 数量 + */ + public static int getVoteCount() { + return votePlayer.size(); + } + + /** + * 清空投票 + */ + public static void clearVote() { + votePlayer.clear(); + } + + /** + * 是否已经投票了 + * + * @param player 用户名 + * @return 结果 + */ + public static boolean containVote(String player) { + return votePlayer.contains(player); + } + + /** + * 添加正在播放的玩家 + * + * @param player 用户名 + */ + public static void addNowPlayPlayer(String player) { + if (!nowPlayPlayer.contains(player)) + nowPlayPlayer.add(player); + } + + /** + * 删除正在播放的玩家 + * + * @param player 用户名 + */ + public static void removeNowPlayPlayer(String player) { + nowPlayPlayer.remove(player); + } + + /** + * 清空正在播放玩家的列表 + */ + public static void clearNowPlayer() { + nowPlayPlayer.clear(); + } + + /** + * 保存配置文件 + */ + public static void save() { + try { + String data = new GsonBuilder().setPrettyPrinting().create().toJson(config); + FileOutputStream out = new FileOutputStream(configFile); + OutputStreamWriter write = new OutputStreamWriter( + out, StandardCharsets.UTF_8); + write.write(data); + write.close(); + data = new GsonBuilder().setPrettyPrinting().create().toJson(message); + out = new FileOutputStream(messageFile); + write = new OutputStreamWriter( + out, StandardCharsets.UTF_8); + write.write(data); + write.close(); + } catch (Exception e) { + log.warning("§d[AllMusic]§c配置文件保存错误"); + e.printStackTrace(); + } + } + + /** + * 保存Cookie + */ + public static void saveCookie() { + try { + String data = new GsonBuilder().setPrettyPrinting().create().toJson(cookie); + FileOutputStream out = new FileOutputStream(cookieFile); + OutputStreamWriter write = new OutputStreamWriter( + out, StandardCharsets.UTF_8); + write.write(data); + write.close(); + } catch (Exception e) { + log.warning("§d[AllMusic]§c配置文件保存错误"); + e.printStackTrace(); + } + } + + /** + * 启动插件 + */ + public static void start() { + PlayMusic.start(); + PlayGo.start(); + MusicSearch.start(); + DataSql.start(); + + log.info("§d[AllMusic]§e已启动-" + version); + } + + /** + * 停止插件 + */ + public static void stop() { + try { + clearVote(); + Logs.stop(); + side.sendStop(); + MusicSearch.stop(); + PlayMusic.stop(); + PlayGo.stop(); + DataSql.stop(); + } catch (IOException e) { + e.printStackTrace(); + } + log.info("§d[AllMusic]§2§e已停止,感谢使用"); + } + + /** + * 获取音乐API + * + * @return 音乐API + */ + public static APIMain getMusicApi() { + if (apiMusic == null) { + AllMusic.apiMusic = new APIMain(); + } + return apiMusic; + } + + /** + * 加载配置文件 + */ + private static void loadConfig() { + try { + InputStreamReader reader = new InputStreamReader( + Files.newInputStream(configFile.toPath()), StandardCharsets.UTF_8); + BufferedReader bf = new BufferedReader(reader); + config = new Gson().fromJson(bf, ConfigObj.class); + bf.close(); + reader.close(); + configCheck(); + + reader = new InputStreamReader(Files.newInputStream(messageFile.toPath()), StandardCharsets.UTF_8); + bf = new BufferedReader(reader); + message = new Gson().fromJson(bf, MessageObj.class); + bf.close(); + reader.close(); + messageCheck(); + + log.info("§d[AllMusic]§e当前语言配置文件版本为:" + messageVersion + + ",你的语言文件版本为:" + config.Version); + + if (!message.Version.equalsIgnoreCase(messageVersion)) { + log.warning("§d[AllMusic]§c语言文件版本号错误,运行可能会发生问题,请删除后重载"); + } + + reader = new InputStreamReader(Files.newInputStream(cookieFile.toPath()), StandardCharsets.UTF_8); + bf = new BufferedReader(reader); + cookie = new Gson().fromJson(bf, CookieObj.class); + bf.close(); + reader.close(); + if (cookie == null) { + cookie = new CookieObj(); + saveCookie(); + } + + log.info("§d[AllMusic]§e当前插件配置文件版本为:" + configVersion + + ",你的配置文件版本为:" + config.Version); + + if (!AllMusic.configVersion.equalsIgnoreCase(config.Version)) { + log.warning("§d[AllMusic]§c请及时更新配置文件"); + } + } catch (Exception e) { + log.warning("§d[AllMusic]§c读取配置文件错误"); + e.printStackTrace(); + } + } + + /** + * 加入时播放 + * + * @param player 用户名 + */ + public static void joinPlay(String player) { + if (getConfig().NoMusicPlayer.contains(player)) + return; + + AllMusic.side.runTask(() -> { + if (PlayMusic.nowPlayMusic != null) { + SaveObj obj = HudUtils.get(player); + String data = gson.toJson(obj); + AllMusic.side.send(data, player); + AllMusic.side.sendMusic(player, PlayGo.url); + if (!PlayMusic.nowPlayMusic.isUrl()) { + AllMusic.side.runTask(() -> + AllMusic.side.sendPic(player, PlayMusic.nowPlayMusic.getPicUrl()), 15); + } + AllMusic.side.runTask(() -> + AllMusic.side.sendPos(player, PlayMusic.musicNowTime + 1000), 40); + } + }, 40); + } + + /** + * 读取配置文件 + * + * @param file 配置文件文件夹 + */ + public void init(File file) { + log.info("§d[AllMusic]§2§e正在启动,感谢使用,本插件交流群:571239090"); + try { + if (!file.exists()) + file.mkdir(); + if (configFile == null) + configFile = new File(file, "config.json"); + if (messageFile == null) + messageFile = new File(file, "message.json"); + if (cookieFile == null) + cookieFile = new File(file, "cookie.json"); + if (Logs.file == null) + Logs.file = new File(file, "logs.log"); + if (DataSql.sqlFile == null) + DataSql.sqlFile = new File(file, "data.db"); + if (!configFile.exists()) { + Files.copy(this.getClass().getResourceAsStream("/config.json"), configFile.toPath()); + } + if (!messageFile.exists()) { + Files.copy(this.getClass().getResourceAsStream("/message.json"), messageFile.toPath()); + } + if (!cookieFile.exists()) { + cookieFile.createNewFile(); + } + if (!Logs.file.exists()) { + Logs.file.createNewFile(); + } + loadConfig(); + isRun = true; + } catch (IOException e) { + isRun = false; + log.warning("§d[AllMusic]§c启动失败"); + e.printStackTrace(); + } + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/AllMusicAPI.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/AllMusicAPI.java new file mode 100644 index 00000000..023fd10a --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/AllMusicAPI.java @@ -0,0 +1,68 @@ +package coloryr.allmusic.core; + +import coloryr.allmusic.core.enums.HudPos; +import coloryr.allmusic.core.side.ComType; + +public class AllMusicAPI { + /** + * 发送播放音乐 + * + * @param name 用户名 + * @param url 链接 + */ + public static void playMusic(String name, String url) { + AllMusic.side.send(name, ComType.play + url); + } + + /** + * 更新玩家Hud数据 + * + * @param name 用户名 + * @param pos 位置 + * @param data 数据 + */ + public static void sendHud(String name, HudPos pos, String data) { + String temp = getType(pos); + if (temp == null) + return; + AllMusic.side.send(name, temp + data); + } + + /** + * 发送图片 + * + * @param name 用户名 + * @param url 图片地址 + */ + public static void sendPic(String name, String url) { + AllMusic.side.send(name, ComType.img + url); + } + + /** + * 停止播放 + * + * @param name 用户名 + */ + public static void sendStop(String name) { + AllMusic.side.sendStop(name); + } + + /** + * 获取位置字符串 + * + * @param pos 位置 + * @return 字符串 + */ + private static String getType(HudPos pos) { + switch (pos) { + case info: + return ComType.info; + case lyric: + return ComType.lyric; + case list: + return ComType.list; + } + + return null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/command/CommandEX.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/command/CommandEX.java new file mode 100644 index 00000000..7ac17ea1 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/command/CommandEX.java @@ -0,0 +1,510 @@ +package coloryr.allmusic.core.command; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.hud.HudUtils; +import coloryr.allmusic.core.music.play.MusicSearch; +import coloryr.allmusic.core.music.play.PlayMusic; +import coloryr.allmusic.core.objs.SearchMusicObj; +import coloryr.allmusic.core.objs.hud.PosObj; +import coloryr.allmusic.core.objs.music.MusicObj; +import coloryr.allmusic.core.objs.music.SearchPageObj; +import coloryr.allmusic.core.utils.Function; + +import java.util.Locale; + +public class CommandEX { + /** + * 搜索音乐 + * + * @param sender 发送者 + * @param name 用户名 + * @param args 参数 + * @param isDefault 是否是默认点歌方式 + */ + private static void searchMusic(Object sender, String name, String[] args, boolean isDefault) { + MusicObj obj = new MusicObj(); + obj.sender = sender; + obj.name = name; + obj.args = args; + obj.isDefault = isDefault; + + if (AllMusic.side.onMusicAdd(sender, obj)) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.Cancel); + return; + } + + MusicSearch.addSearch(obj); + } + + /** + * 检查金额是否够 + * + * @param sender 发送者 + * @param name 用户名 + * @param cost 金额 + * @return 结果 + */ + private static boolean checkMoney(Object sender, String name, int cost) { + if (!AllMusic.getConfig().UseCost || AllMusic.economy == null) { + return false; + } + + if (!AllMusic.economy.check(name, cost)) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Cost.NoMoney); + return true; + } + return false; + } + + /** + * 扣钱 + * + * @param sender 发送者 + * @param name 用户名 + * @param cost 金额 + * @param message 结果消息 + * @return 结果 + */ + private static boolean cost(Object sender, String name, int cost, String message) { + if (!AllMusic.getConfig().UseCost || AllMusic.economy == null) { + return false; + } + + if (AllMusic.economy.cost(name, cost)) { + AllMusic.side.sendMessage(sender, message + .replace("%Cost%", "" + cost)); + return false; + } else { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Cost.CostFail); + return true; + } + } + + /** + * 添加音乐 + * + * @param sender 发送者 + * @param name 用户名 + * @param args 参数 + */ + private static void addMusic(Object sender, String name, String[] args) { + String musicID; + if (args[0].contains("id=") && !args[0].contains("/?userid")) { + if (args[0].contains("&user")) + musicID = Function.getString(args[0], "id=", "&user"); + else + musicID = Function.getString(args[0], "id=", null); + } else if (args[0].contains("song/")) { + if (args[0].contains("/?userid")) + musicID = Function.getString(args[0], "song/", "/?userid"); + else + musicID = Function.getString(args[0], "song/", null); + } else + musicID = args[0]; + if (Function.isInteger(musicID)) { + if (PlayMusic.getSize() >= AllMusic.getConfig().MaxList) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.ListFull); + } else if (AllMusic.getConfig().BanMusic.contains(musicID)) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.BanMusic); + } else if (PlayMusic.isHave(musicID)) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.ExistMusic); + } else { + if (checkMoney(sender, name, AllMusic.getConfig().AddMusicCost)) { + return; + } + if (cost(sender, name, AllMusic.getConfig().AddMusicCost, + AllMusic.getMessage().Cost.AddMusic)) { + return; + } + AllMusic.getConfig().RemoveNoMusicPlayer(name); + if (AllMusic.side.needPlay()) { + MusicObj obj = new MusicObj(); + obj.sender = sender; + obj.id = musicID; + obj.name = name; + obj.isDefault = false; + + if (AllMusic.side.onMusicAdd(sender, obj)) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.Cancel); + return; + } + + PlayMusic.addTask(obj); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.Success); + } else + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.NoPlayer); + } + } else + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.NoID); + } + + /** + * 展示搜歌结果 + * + * @param sender 发送者 + * @param search 搜歌结果 + */ + public static void showSearch(Object sender, SearchPageObj search) { + int index = search.getIndex(); + SearchMusicObj item; + String info; + AllMusic.side.sendMessage(sender, ""); + if (search.haveLastPage()) { + AllMusic.side.sendMessageRun(sender, "§d[AllMusic]§2输入/music lastpage上一页", + AllMusic.getMessage().Page.Last, "/music lastpage"); + } + for (int a = 0; a < index; a++) { + item = search.getRes(a + search.getPage() * 10); + info = AllMusic.getMessage().Page.Choice; + info = info.replace("%index%", "" + (a + 1)) + .replace("%MusicName%", item.name) + .replace("%MusicAuthor%", item.author) + .replace("%MusicAl%", item.al); + AllMusic.side.sendMessageRun(sender, info, + AllMusic.getMessage().Click.This, "/music select " + (a + 1)); + } + if (search.haveNextPage()) { + AllMusic.side.sendMessageRun(sender, "§d[AllMusic]§2输入/music nextpage下一页", + AllMusic.getMessage().Page.Next, "/music nextpage"); + } + AllMusic.side.sendMessage(sender, ""); + } + + /** + * 执行命令 + * + * @param sender 发送者 + * @param name 用户名 + * @param args 参数 + */ + public static void ex(Object sender, String name, String[] args) { + if (args.length == 0) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + return; + } else if (args[0].equalsIgnoreCase("help")) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Help.Normal.Head); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Normal.Base, + AllMusic.getMessage().Click.Check, "/music "); + AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().Help.Normal.Stop, + AllMusic.getMessage().Click.This, "/music stop"); + AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().Help.Normal.List, + AllMusic.getMessage().Click.This, "/music list"); + AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().Help.Normal.Vote, + AllMusic.getMessage().Click.This, "/music vote"); + AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().Help.Normal.NoMusic, + AllMusic.getMessage().Click.This, "/music nomusic"); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Normal.Search, + AllMusic.getMessage().Click.Check, "/music search "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Normal.Select, + AllMusic.getMessage().Click.Check, "/music select "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Normal.Hud1, + AllMusic.getMessage().Click.Check, "/music hud enable "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Normal.Hud2, + AllMusic.getMessage().Click.Check, "/music hud "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Normal.Hud3, + AllMusic.getMessage().Click.Check, "/music hud picsize "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Normal.Hud4, + AllMusic.getMessage().Click.Check, "/music hud picrotate "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Normal.Hud5, + AllMusic.getMessage().Click.Check, "/music hud picrotatespeed "); + if (AllMusic.getConfig().Admin.contains(name)) { + AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().Help.Admin.Reload, + AllMusic.getMessage().Click.This, "/music reload"); + AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().Help.Admin.Next, + AllMusic.getMessage().Click.This, "/music next"); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Admin.Ban, + AllMusic.getMessage().Click.Check, "/music ban "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Admin.Url, + AllMusic.getMessage().Click.Check, "/music url "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Admin.Delete, + AllMusic.getMessage().Click.Check, "/music delete "); + AllMusic.side.sendMessageSuggest(sender, AllMusic.getMessage().Help.Admin.AddList, + AllMusic.getMessage().Click.Check, "/music addlist "); + AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().Help.Admin.ClearList, + AllMusic.getMessage().Click.This, "/music clearlist"); + AllMusic.side.sendMessageRun(sender, AllMusic.getMessage().Help.Admin.Login, + AllMusic.getMessage().Click.This, "/music login"); + } + return; + } else if (args[0].equalsIgnoreCase("stop")) { + AllMusic.side.clearHud(name); + AllMusic.side.sendStop(name); + HudUtils.clearHud(name); + AllMusic.removeNowPlayPlayer(name); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().MusicPlay.StopPlay); + return; + } else if (args[0].equalsIgnoreCase("list")) { + if (PlayMusic.nowPlayMusic == null || PlayMusic.nowPlayMusic.isNull()) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().MusicPlay.NoMusic); + } else { + String info = AllMusic.getMessage().MusicPlay.Play; + info = info.replace("%MusicName%", PlayMusic.nowPlayMusic.getName()) + .replace("%MusicAuthor%", PlayMusic.nowPlayMusic.getAuthor()) + .replace("%MusicAl%", PlayMusic.nowPlayMusic.getAl()) + .replace("%MusicAlia%", PlayMusic.nowPlayMusic.getAlia()) + .replace("%PlayerName%", PlayMusic.nowPlayMusic.getCall()); + AllMusic.side.sendMessage(sender, info); + } + if (PlayMusic.getSize() == 0) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().MusicPlay.NoPlay); + } else { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().MusicPlay.ListMusic.Head + .replace("&Count&", "" + PlayMusic.getSize())); + AllMusic.side.sendMessage(sender, PlayMusic.getAllList()); + } + return; + } else if (args[0].equalsIgnoreCase("vote")) { + if (AllMusic.getConfig().NeedPermission && + AllMusic.side.checkPermission(name, "allmusic.vote")) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Vote.NoPermission); + return; + } + if (PlayMusic.getSize() == 0 && AllMusic.getConfig().PlayList.size() == 0) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().MusicPlay.NoPlay); + } else if (PlayMusic.voteTime == 0) { + PlayMusic.voteTime = 30; + AllMusic.addVote(name); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Vote.DoVote); + String data = AllMusic.getMessage().Vote.BQ; + AllMusic.side.bq(data.replace("%PlayerName%", name)); + } else if (PlayMusic.voteTime > 0) { + if (!AllMusic.containVote(name)) { + AllMusic.addVote(name); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Vote.Agree); + String data = AllMusic.getMessage().Vote.BQAgree; + data = data.replace("%PlayerName%", name) + .replace("%Count%", "" + AllMusic.getVoteCount()); + AllMusic.side.bq(data); + } else { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Vote.ARAgree); + } + } + AllMusic.getConfig().RemoveNoMusicPlayer(name); + return; + } else if (args[0].equalsIgnoreCase("nomusic")) { + AllMusic.side.sendStop(name); + AllMusic.side.clearHud(name); + AllMusic.getConfig().AddNoMusicPlayer(name); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().MusicPlay.NoPlayMusic); + return; + } else if (args[0].equalsIgnoreCase("search") && args.length >= 2) { + if (AllMusic.getConfig().NeedPermission && + AllMusic.side.checkPermission(name, "allmusic.search")) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.NoPer); + return; + } + if (checkMoney(sender, name, AllMusic.getConfig().SearchCost)) { + return; + } + if (cost(sender, name, AllMusic.getConfig().SearchCost, + AllMusic.getMessage().Cost.Search)) { + return; + } + + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.StartSearch); + searchMusic(sender, name, args, false); + return; + } else if (args[0].equalsIgnoreCase("select") && args.length == 2) { + if (AllMusic.getConfig().NeedPermission && + AllMusic.side.checkPermission(name, "allmusic.search")) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.NoPer); + return; + } + SearchPageObj obj = AllMusic.getSearch(name); + if (obj == null) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.NoSearch); + } else if (!args[1].isEmpty() && Function.isInteger(args[1])) { + int a = Integer.parseInt(args[1]); + if (a == 0) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.ErrorNum); + return; + } + String[] ID = new String[1]; + ID[0] = obj.getSong((obj.getPage() * 10) + (a - 1)); + AllMusic.side.sendMessage(sender, + AllMusic.getMessage().Search.Chose.replace("%Num%", "" + a)); + addMusic(sender, name, ID); + AllMusic.removeSearch(name); + } else { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.ErrorNum); + } + return; + } else if (args[0].equalsIgnoreCase("nextpage")) { + if (AllMusic.getConfig().NeedPermission && + AllMusic.side.checkPermission(name, "allmusic.search")) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.NoPer); + return; + } + SearchPageObj obj = AllMusic.getSearch(name); + if (obj == null) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.NoSearch); + } else if (obj.nextPage()) { + showSearch(sender, obj); + } else { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.CantNext); + } + return; + } else if (args[0].equalsIgnoreCase("lastpage")) { + if (AllMusic.getConfig().NeedPermission && + AllMusic.side.checkPermission(name, "allmusic.search")) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.NoPer); + return; + } + SearchPageObj obj = AllMusic.getSearch(name); + if (obj == null) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.NoSearch); + } else if (obj.lastPage()) { + showSearch(sender, obj); + } else { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Search.CantLast); + } + return; + } else if (args[0].equalsIgnoreCase("hud")) { + if (args.length == 1) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + } else { + if (args[1].equalsIgnoreCase("enable")) { + if (args.length == 3) { + try { + String pos = args[2].toLowerCase(Locale.ROOT); + boolean temp = HudUtils.setHudEnable(name, pos); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Hud.State + .replace("%State%", temp ? "启用" : "关闭") + .replace("%Hud%", AllMusic.getMessage().HudList.Get(pos))); + } catch (Exception e) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + } + } else { + boolean temp = HudUtils.setHudEnable(name, null); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Hud.State + .replace("%State%", temp ? "启用" : "关闭") + .replace("%Hud%", AllMusic.getMessage().HudList.All)); + } + } else if (args[1].equalsIgnoreCase("reset")) { + HudUtils.reset(name); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Hud.Reset); + } else if (args[1].equalsIgnoreCase("picsize")) { + if (args.length != 3 || !HudUtils.setPicSize(name, args[2])) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + return; + } + AllMusic.side.sendMessage(sender, + AllMusic.getMessage().Hud.PicSize.replace("%Size%", args[2])); + } else if (args[1].equalsIgnoreCase("picrotate")) { + if (args.length != 3) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + return; + } + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Hud.PicRotate + .replace("%State%", String.valueOf(HudUtils.setPicRotate(name, args[2])))); + } else if (args[1].equalsIgnoreCase("picrotatespeed")) { + if (args.length != 3 || !HudUtils.setPicRotateSpeed(name, args[2])) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + return; + } + AllMusic.side.sendMessage(sender, + AllMusic.getMessage().Hud.PicRotateSpeed.replace("%Size%", args[2])); + } else if (args.length != 4) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + } else { + try { + PosObj obj = HudUtils.setHudPos(name, args[1], args[2], args[3]); + if (obj == null) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + } else { + String temp = AllMusic.getMessage().Hud.Set + .replace("%Hud%", args[1]) + .replace("%x%", args[2]) + .replace("%y%", args[3]); + AllMusic.side.sendMessage(sender, temp); + } + } catch (Exception e) { + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.Error); + } + } + } + return; + } else if (args[0].equalsIgnoreCase("reload")) { + AllMusic.side.reload(); + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2已重读配置文件"); + return; + } else if (AllMusic.getConfig().Admin.contains(name)) { + if (args[0].equalsIgnoreCase("next")) { + PlayMusic.musicLessTime = 1; + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2已强制切歌"); + AllMusic.getConfig().RemoveNoMusicPlayer(name); + return; + } else if (args[0].equalsIgnoreCase("ban") && args.length == 2) { + if (Function.isInteger(args[1])) { + AllMusic.getConfig().addBanID(args[1]); + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2已禁止" + args[1]); + } else { + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2请输入有效的ID"); + } + return; + } else if (args[0].equalsIgnoreCase("url") && args.length == 2) { + MusicObj obj = new MusicObj(); + obj.sender = sender; + obj.isUrl = true; + obj.url = args[1]; + PlayMusic.addTask(obj); + AllMusic.side.sendMessage(sender, AllMusic.getMessage().AddMusic.Success); + return; + } else if (args[0].equalsIgnoreCase("delete") && args.length == 2) { + if (!args[1].isEmpty() && Function.isInteger(args[1])) { + int music = Integer.parseInt(args[1]); + if (music == 0) { + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2请输入有效的序列ID"); + return; + } + if (music > PlayMusic.getSize()) { + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2序列号过大"); + return; + } + PlayMusic.remove(music - 1); + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2已删除序列" + music); + } else { + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2请输入有效的序列ID"); + } + return; + } else if (args[0].equalsIgnoreCase("addlist") && args.length == 2) { + if (Function.isInteger(args[1])) { + AllMusic.getMusicApi().setList(args[1], sender); + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2添加空闲音乐列表" + args[1]); + } else { + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2请输入有效的音乐列表ID"); + } + return; + } else if (args[0].equalsIgnoreCase("clearlist")) { + AllMusic.getConfig().PlayList.clear(); + AllMusic.save(); + AllMusic.side.sendMessage(sender, "§d[AllMusic]§2添加空闲音乐列表已清空"); + return; + } else if (args[0].equalsIgnoreCase("code")) { + AllMusic.getMusicApi().sendCode(sender); + return; + } else if (args[0].equalsIgnoreCase("login")) { + if (args.length != 2) { + AllMusic.side.sendMessage(sender, "§d[AllMusic]§c没有手机验证码"); + return; + } + AllMusic.side.sendMessage(sender, "§d[AllMusic]§d重新登录网易云账户"); + AllMusic.getMusicApi().login(sender, args[1]); + return; + } + } + if (AllMusic.getConfig().NeedPermission && + AllMusic.side.checkPermission(name, "allmusic.addmusic")) + AllMusic.side.sendMessage(sender, AllMusic.getMessage().Command.NoPer); + else { + switch (AllMusic.getConfig().DefaultAddMusic) { + case 1: + searchMusic(sender, name, args, true); + break; + case 0: + default: + addMusic(sender, name, args); + } + } + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/command/TabCommand.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/command/TabCommand.java new file mode 100644 index 00000000..dbe2d90a --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/command/TabCommand.java @@ -0,0 +1,101 @@ +package coloryr.allmusic.core.command; + +import coloryr.allmusic.core.AllMusic; + +import java.util.ArrayList; +import java.util.List; + +public class TabCommand { + /** + * 个人的指令 + */ + private static final List normal = new ArrayList() {{ + this.add("stop"); + this.add("list"); + this.add("vote"); + this.add("nomusic"); + this.add("search"); + this.add("hud"); + }}; + + /** + * 搜歌的指令 + */ + private static final List search = new ArrayList() {{ + this.add("select"); + this.add("nextpage"); + this.add("lastpage"); + }}; + + /** + * 管理员的指令 + */ + private static final List admin = new ArrayList() {{ + this.add("reload"); + this.add("next"); + this.add("ban"); + this.add("delete"); + this.add("addlist"); + this.add("clearlist"); + this.add("login"); + }}; + + /** + * Hud的指令 + */ + private static final List hudlist = new ArrayList() {{ + this.add("info"); + this.add("list"); + this.add("lyric"); + this.add("pic"); + }}; + + /** + * Hud的指令 + */ + private static final List hud = new ArrayList() {{ + this.add("info"); + this.add("list"); + this.add("lyric"); + this.add("pic"); + this.add("picsize"); + this.add("picrotate"); + this.add("picrotatespeed"); + this.add("enable"); + this.add("reset"); + }}; + + /** + * 获取Tab指令列表 + * + * @param name 用户名 + * @param arg 参数 + * @return 指令列表 + */ + public static List getTabList(String name, String[] arg) { + List arguments = new ArrayList<>(); + if (arg.length == 0 || arg.length == 1) { + arguments.addAll(normal); + if (AllMusic.getSearch(name) != null) { + arguments.addAll(search); + } + if (AllMusic.getConfig().Admin.contains(name)) { + arguments.addAll(admin); + } + } else if (arg.length == 2) { + if ("hud".equalsIgnoreCase(arg[0]) && + "enable".equalsIgnoreCase(arg[1])) { + arguments.addAll(hudlist); + } + else if ("hud".equalsIgnoreCase(arg[0])) { + arguments.addAll(hud); + } + } else if (arg.length == 3) { + if ("hud".equalsIgnoreCase(arg[0]) && + "enable".equalsIgnoreCase(arg[1])) { + arguments.addAll(hudlist); + } + } + return arguments; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Bitstream.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Bitstream.java new file mode 100644 index 00000000..79de8f63 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Bitstream.java @@ -0,0 +1,536 @@ +/* + * 11/19/04 1.0 moved to LGPL. + * + * 11/17/04 Uncomplete frames discarded. E.B, javalayer@javazoom.net + * + * 12/05/03 ID3v2 tag returned. E.B, javalayer@javazoom.net + * + * 12/12/99 Based on Ibitstream. Exceptions thrown on errors, + * Temporary removed seek functionality. mdm@techie.com + * + * 02/12/99 : Java Conversion by E.B , javalayer@javazoom.net + * + * 04/14/97 : Added function prototypes for new syncing and seeking + * mechanisms. Also made this file portable. Changes made by Jeff Tsay + * + * @(#) ibitstream.h 1.5, last edit: 6/15/94 16:55:34 + * @(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de) + * @(#) Berlin University of Technology + *----------------------------------------------------------------------- + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *---------------------------------------------------------------------- + */ + +package coloryr.allmusic.core.decoder; + +import java.io.*; + + +/** + * The Bistream class is responsible for parsing + * an MPEG audio bitstream. + * + * REVIEW: much of the parsing currently occurs in the + * various decoders. This should be moved into this class and associated + * inner classes. + */ +public final class Bitstream implements BitstreamErrors { + /** + * Maximum size of the frame buffer. + */ + private static final int BUFFER_INT_SIZE = 433; + /** + * Synchronization control constant for the initial + * synchronization to the start of a frame. + */ + static byte INITIAL_SYNC = 0; + + // max. 1730 bytes per frame: 144 * 384kbit/s / 32000 Hz + 2 Bytes CRC + /** + * Synchronization control constant for non-initial frame + * synchronizations. + */ + static byte STRICT_SYNC = 1; + /** + * The frame buffer that holds the data for the current frame. + */ + private final int[] framebuffer = new int[BUFFER_INT_SIZE]; + private final int[] bitmask = {0, // dummy + 0x00000001, 0x00000003, 0x00000007, 0x0000000F, + 0x0000001F, 0x0000003F, 0x0000007F, 0x000000FF, + 0x000001FF, 0x000003FF, 0x000007FF, 0x00000FFF, + 0x00001FFF, 0x00003FFF, 0x00007FFF, 0x0000FFFF, + 0x0001FFFF}; + private final PushbackInputStream source; + private final Header header = new Header(); + private final byte[] syncbuf = new byte[4]; + /** + * The bytes read from the stream. + */ + private final byte[] frame_bytes = new byte[BUFFER_INT_SIZE * 4]; + private final Crc16[] crc = new Crc16[1]; + /** + * Number of valid bytes in the frame buffer. + */ + private int framesize; + //private int current_frame_number; + //private int last_frame_number; + /** + * Index into framebuffer where the next bits are + * retrieved. + */ + private int wordpointer; + /** + * Number (0-31, from MSB to LSB) of next bit for get_bits() + */ + private int bitindex; + /** + * The current specified syncword + */ + private int syncword; + /** + * Audio header position in stream. + */ + private int header_pos = 0; + /** + * + */ + private boolean single_ch_mode; + private byte[] rawid3v2 = null; + + private boolean firstframe = true; + + + /** + * Construct a IBitstream that reads data from a + * given InputStream. + * + * @param in The InputStream to read from. + */ + public Bitstream(InputStream in) { + if (in == null) throw new NullPointerException("in"); + in = new BufferedInputStream(in); + loadID3v2(in); + firstframe = true; + //source = new PushbackInputStream(in, 1024); + source = new PushbackInputStream(in, BUFFER_INT_SIZE * 4); + + closeFrame(); + //current_frame_number = -1; + //last_frame_number = -1; + } + + /** + * Return position of the first audio header. + * + * @return size of ID3v2 tag frames. + */ + public int header_pos() { + return header_pos; + } + + /** + * Load ID3v2 frames. + * + * @param in MP3 InputStream. + * @author JavaZOOM + */ + private void loadID3v2(InputStream in) { + int size = -1; + try { + // Read ID3v2 header (10 bytes). + in.mark(10); + size = readID3v2Header(in); + header_pos = size; + } catch (IOException e) { + } finally { + try { + // Unread ID3v2 header (10 bytes). + in.reset(); + } catch (IOException e) { + } + } + // Load ID3v2 tags. + try { + if (size > 0) { + rawid3v2 = new byte[size]; + in.read(rawid3v2, 0, rawid3v2.length); + } + } catch (IOException e) { + } + } + + /** + * Parse ID3v2 tag header to find out size of ID3v2 frames. + * + * @param in MP3 InputStream + * @return size of ID3v2 frames + header + * @throws IOException + * @author JavaZOOM + */ + private int readID3v2Header(InputStream in) throws IOException { + byte[] id3header = new byte[4]; + int size = -10; + in.read(id3header, 0, 3); + // Look for ID3v2 + if ((id3header[0] == 'I') && (id3header[1] == 'D') && (id3header[2] == '3')) { + in.read(id3header, 0, 3); + int majorVersion = id3header[0]; + int revision = id3header[1]; + in.read(id3header, 0, 4); + size = (id3header[0] << 21) + (id3header[1] << 14) + (id3header[2] << 7) + (id3header[3]); + } + return (size + 10); + } + + /** + * Return raw ID3v2 frames + header. + * + * @return ID3v2 InputStream or null if ID3v2 frames are not available. + */ + public InputStream getRawID3v2() { + if (rawid3v2 == null) return null; + else { + return new ByteArrayInputStream(rawid3v2); + } + } + + /** + * Close the Bitstream. + * + * @throws BitstreamException + */ + public void close() throws BitstreamException { + try { + source.close(); + } catch (IOException ex) { + throw newBitstreamException(STREAM_ERROR, ex); + } + } + + /** + * Reads and parses the next frame from the input source. + * + * @return the Header describing details of the frame read, + * or null if the end of the stream has been reached. + */ + public Header readFrame() throws BitstreamException { + Header result = null; + try { + result = readNextFrame(); + // E.B, Parse VBR (if any) first frame. + if (firstframe) { + result.parseVBR(frame_bytes); + firstframe = false; + } + } catch (BitstreamException ex) { + if ((ex.getErrorCode() == INVALIDFRAME)) { + // Try to skip this frame. + //System.out.println("INVALIDFRAME"); + try { + closeFrame(); + result = readNextFrame(); + } catch (BitstreamException e) { + if ((e.getErrorCode() != STREAM_EOF)) { + // wrap original exception so stack trace is maintained. + throw newBitstreamException(e.getErrorCode(), e); + } + } + } else if ((ex.getErrorCode() != STREAM_EOF)) { + // wrap original exception so stack trace is maintained. + throw newBitstreamException(ex.getErrorCode(), ex); + } + } + return result; + } + + /** + * Read next MP3 frame. + * + * @return MP3 frame header. + * @throws BitstreamException + */ + private Header readNextFrame() throws BitstreamException { + if (framesize == -1) { + nextFrame(); + } + return header; + } + + + /** + * Read next MP3 frame. + * + * @throws BitstreamException + */ + private void nextFrame() throws BitstreamException { + // entire frame is read by the header class. + header.read_header(this, crc); + } + + /** + * Unreads the bytes read from the frame. + * + * @throws BitstreamException + */ + // REVIEW: add new error codes for this. + public void unreadFrame() throws BitstreamException { + if (wordpointer == -1 && bitindex == -1 && (framesize > 0)) { + try { + source.unread(frame_bytes, 0, framesize); + } catch (IOException ex) { + throw newBitstreamException(STREAM_ERROR); + } + } + } + + /** + * Close MP3 frame. + */ + public void closeFrame() { + framesize = -1; + wordpointer = -1; + bitindex = -1; + } + + /** + * Determines if the next 4 bytes of the stream represent a + * frame header. + */ + public boolean isSyncCurrentPosition(int syncmode) throws BitstreamException { + int read = readBytes(syncbuf, 0, 4); + int headerstring = ((syncbuf[0] << 24) & 0xFF000000) | ((syncbuf[1] << 16) & 0x00FF0000) | ((syncbuf[2] << 8) & 0x0000FF00) | ((syncbuf[3] << 0) & 0x000000FF); + + try { + source.unread(syncbuf, 0, read); + } catch (IOException ex) { + } + + boolean sync = false; + switch (read) { + case 0: + sync = true; + break; + case 4: + sync = isSyncMark(headerstring, syncmode, syncword); + break; + } + + return sync; + } + + BitstreamException newBitstreamException(int errorcode) { + return new BitstreamException(errorcode, null); + } + + private BitstreamException newBitstreamException(int errorcode, Throwable throwable) { + return new BitstreamException(errorcode, throwable); + } + + /** + * Get next 32 bits from bitstream. + * They are stored in the headerstring. + * syncmod allows Synchro flag ID + * The returned value is False at the end of stream. + */ + + int syncHeader(byte syncmode) throws BitstreamException { + boolean sync; + int headerstring; + // read additional 2 bytes + int bytesRead = readBytes(syncbuf, 0, 3); + + if (bytesRead != 3) throw newBitstreamException(STREAM_EOF, null); + + headerstring = ((syncbuf[0] << 16) & 0x00FF0000) | ((syncbuf[1] << 8) & 0x0000FF00) | ((syncbuf[2]) & 0x000000FF); + + do { + headerstring <<= 8; + + if (readBytes(syncbuf, 3, 1) != 1) + throw newBitstreamException(STREAM_EOF, null); + + headerstring |= (syncbuf[3] & 0x000000FF); + + sync = isSyncMark(headerstring, syncmode, syncword); + } + while (!sync); + + return headerstring; + } + + public boolean isSyncMark(int headerstring, int syncmode, int word) { + boolean sync = false; + + if (syncmode == INITIAL_SYNC) { + sync = ((headerstring & 0xFFE00000) == 0xFFE00000); // SZD: MPEG 2.5 + } else { + sync = ((headerstring & 0xFFF80C00) == word) && + (((headerstring & 0x000000C0) == 0x000000C0) == single_ch_mode); + } + + // filter out invalid sample rate + if (sync) + sync = (((headerstring >>> 10) & 3) != 3); + // filter out invalid layer + if (sync) + sync = (((headerstring >>> 17) & 3) != 0); + // filter out invalid version + if (sync) + sync = (((headerstring >>> 19) & 3) != 1); + + return sync; + } + + /** + * Reads the data for the next frame. The frame is not parsed + * until parse frame is called. + */ + int read_frame_data(int bytesize) throws BitstreamException { + int numread = readFully(frame_bytes, 0, bytesize); + framesize = bytesize; + wordpointer = -1; + bitindex = -1; + return numread; + } + + /** + * Parses the data previously read with read_frame_data(). + */ + void parse_frame() throws BitstreamException { + // Convert Bytes read to int + int b = 0; + byte[] byteread = frame_bytes; + int bytesize = framesize; + + for (int k = 0; k < bytesize; k = k + 4) { + int convert = 0; + byte b0 = 0; + byte b1 = 0; + byte b2 = 0; + byte b3 = 0; + b0 = byteread[k]; + if (k + 1 < bytesize) b1 = byteread[k + 1]; + if (k + 2 < bytesize) b2 = byteread[k + 2]; + if (k + 3 < bytesize) b3 = byteread[k + 3]; + framebuffer[b++] = ((b0 << 24) & 0xFF000000) | ((b1 << 16) & 0x00FF0000) | ((b2 << 8) & 0x0000FF00) | (b3 & 0x000000FF); + } + wordpointer = 0; + bitindex = 0; + } + + /** + * Read bits from buffer into the lower bits of an unsigned int. + * The LSB contains the latest read bit of the stream. + * (1 <= number_of_bits <= 16) + */ + public int get_bits(int number_of_bits) { + int returnvalue = 0; + int sum = bitindex + number_of_bits; + + // E.B + // There is a problem here, wordpointer could be -1 ?! + if (wordpointer < 0) wordpointer = 0; + // E.B : End. + + if (sum <= 32) { + // all bits contained in *wordpointer + returnvalue = (framebuffer[wordpointer] >>> (32 - sum)) & bitmask[number_of_bits]; + // returnvalue = (wordpointer[0] >> (32 - sum)) & bitmask[number_of_bits]; + if ((bitindex += number_of_bits) == 32) { + bitindex = 0; + wordpointer++; // added by me! + } + return returnvalue; + } + + int Right = (framebuffer[wordpointer] & 0x0000FFFF); + wordpointer++; + int Left = (framebuffer[wordpointer] & 0xFFFF0000); + returnvalue = ((Right << 16) & 0xFFFF0000) | ((Left >>> 16) & 0x0000FFFF); + + returnvalue >>>= 48 - sum; // returnvalue >>= 16 - (number_of_bits - (32 - bitindex)) + returnvalue &= bitmask[number_of_bits]; + bitindex = sum - 32; + return returnvalue; + } + + /** + * Set the word we want to sync the header to. + * In Big-Endian byte order + */ + void set_syncword(int syncword0) { + syncword = syncword0 & 0xFFFFFF3F; + single_ch_mode = ((syncword0 & 0x000000C0) == 0x000000C0); + } + + /** + * Reads the exact number of bytes from the source + * input stream into a byte array. + * + * @param b The byte array to read the specified number + * of bytes into. + * @param offs The index in the array where the first byte + * read should be stored. + * @param len the number of bytes to read. + * @throws BitstreamException is thrown if the specified + * number of bytes could not be read from the stream. + */ + private int readFully(byte[] b, int offs, int len) + throws BitstreamException { + int nRead = 0; + try { + while (len > 0) { + int bytesread = source.read(b, offs, len); + if (bytesread == -1) { + while (len-- > 0) { + b[offs++] = 0; + } + break; + //throw newBitstreamException(UNEXPECTED_EOF, new EOFException()); + } + nRead = nRead + bytesread; + offs += bytesread; + len -= bytesread; + } + } catch (IOException ex) { + throw newBitstreamException(STREAM_ERROR, ex); + } + return nRead; + } + + /** + * Simlar to readFully, but doesn't throw exception when + * EOF is reached. + */ + private int readBytes(byte[] b, int offs, int len) + throws BitstreamException { + int totalBytesRead = 0; + try { + while (len > 0) { + int bytesread = source.read(b, offs, len); + if (bytesread == -1) { + break; + } + totalBytesRead += bytesread; + offs += bytesread; + len -= bytesread; + } + } catch (IOException ex) { + throw newBitstreamException(STREAM_ERROR, ex); + } + return totalBytesRead; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamErrors.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamErrors.java new file mode 100644 index 00000000..57cd7049 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamErrors.java @@ -0,0 +1,55 @@ +/* + * 11/19/04 1.0 moved to LGPL. + * 11/17/04 INVALIDFRAME code added. javalayer@javazoom.net + * 12/12/99 Initial version. mdm@techie.com + *----------------------------------------------------------------------- + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *---------------------------------------------------------------------- + */ + +package coloryr.allmusic.core.decoder; + +/** + * This interface describes all error codes that can be thrown + * in BistreamExceptions. + * + * @author MDM 12/12/99 + * @see BitstreamException + * @since 0.0.6 + */ + +public interface BitstreamErrors extends JavaLayerErrors { + + /** + * An undeterminable error occurred. + */ + int UNKNOWN_ERROR = BITSTREAM_ERROR; + + /** + * A problem occurred reading from the stream. + */ + int STREAM_ERROR = BITSTREAM_ERROR + 2; + + /** + * The end of the stream was reached. + */ + int STREAM_EOF = BITSTREAM_ERROR + 4; + + /** + * Frame data are missing. + */ + int INVALIDFRAME = BITSTREAM_ERROR + 5; + +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamException.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamException.java new file mode 100644 index 00000000..c5ec3bca --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/BitstreamException.java @@ -0,0 +1,65 @@ +/* + * 11/19/04 1.0 moved to LGPL. + * 12/12/99 Initial version. mdm@techie.com + *----------------------------------------------------------------------- + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *---------------------------------------------------------------------- + */ + +package coloryr.allmusic.core.decoder; + +/** + * Instances of BitstreamException are thrown + * when operations on a Bitstream fail. + *

+ * The exception provides details of the exception condition + * in two ways: + *

  1. + * as an error-code describing the nature of the error + *


  2. + * as the Throwable instance, if any, that was thrown + * indicating that an exceptional condition has occurred. + *

+ * + * @author MDM 12/12/99 + * @since 0.0.6 + */ + +public class BitstreamException extends JavaLayerException + implements BitstreamErrors { + private int errorcode = UNKNOWN_ERROR; + + public BitstreamException(String msg, Throwable t) { + super(msg, t); + } + + public BitstreamException(int errorcode, Throwable t) { + this(getErrorString(errorcode), t); + this.errorcode = errorcode; + } + + static public String getErrorString(int errorcode) { + // REVIEW: use resource bundle to map error codes + // to locale-sensitive strings. + + return "Bitstream errorcode " + Integer.toHexString(errorcode); + } + + public int getErrorCode() { + return errorcode; + } + + +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Crc16.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Crc16.java new file mode 100644 index 00000000..d3acaa67 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Crc16.java @@ -0,0 +1,64 @@ +/* + * 11/19/04 : 1.0 moved to LGPL. + * + * 02/12/99 : Java Conversion by E.B , javalayer@javazoom.net + * + * @(#) crc.h 1.5, last edit: 6/15/94 16:55:32 + * @(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de) + * @(#) Berlin University of Technology + *----------------------------------------------------------------------- + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *---------------------------------------------------------------------- + */ +package coloryr.allmusic.core.decoder; + +/** + * 16-Bit CRC checksum + */ +public final class Crc16 { + private short crc; + + /** + * Dummy Constructor + */ + public Crc16() { + crc = (short) 0xFFFF; + } + + /** + * Feed a bitstring to the crc calculation (0 < length <= 32). + */ + public void add_bits(int bitstring, int length) { + int bitmask = 1 << (length - 1); + do + if (((crc & 0x8000) == 0) ^ ((bitstring & bitmask) == 0)) { + crc <<= 1; + short polynomial = (short) 0x8005; + crc ^= polynomial; + } else + crc <<= 1; + while ((bitmask >>>= 1) != 0); + } + + /** + * Return the calculated checksum. + * Erase it for next calls to add_bits(). + */ + public short checksum() { + short sum = crc; + crc = (short) 0xFFFF; + return sum; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Header.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Header.java new file mode 100644 index 00000000..4aad9a05 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/Header.java @@ -0,0 +1,618 @@ +/* + * 11/19/04 : 1.0 moved to LGPL. + * VBRI header support added, E.B javalayer@javazoom.net + * + * 12/04/03 : VBR (XING) header support added, E.B javalayer@javazoom.net + * + * 02/13/99 : Java Conversion by JavaZOOM , E.B javalayer@javazoom.net + * + * Declarations for MPEG header class + * A few layer III, MPEG-2 LSF, and seeking modifications made by Jeff Tsay. + * Last modified : 04/19/97 + * + * @(#) header.h 1.7, last edit: 6/15/94 16:55:33 + * @(#) Copyright (C) 1993, 1994 Tobias Bading (bading@cs.tu-berlin.de) + * @(#) Berlin University of Technology + *----------------------------------------------------------------------- + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *---------------------------------------------------------------------- + */ +package coloryr.allmusic.core.decoder; + +/** + * Class for extracting information from a frame header. + */ +public final class Header { + public static final int[][] frequencies = + {{22050, 24000, 16000, 1}, + {44100, 48000, 32000, 1}, + {11025, 12000, 8000, 1}}; // SZD: MPEG25 + + /** + * Constant for MPEG-2 LSF version + */ + public static final int MPEG2_LSF = 0; + public static final int MPEG25_LSF = 2; // SZD + + /** + * Constant for MPEG-1 version + */ + public static final int MPEG1 = 1; + + public static final int STEREO = 0; + public static final int JOINT_STEREO = 1; + public static final int DUAL_CHANNEL = 2; + public static final int SINGLE_CHANNEL = 3; + public static final int FOURTYFOUR_POINT_ONE = 0; + public static final int FOURTYEIGHT = 1; + public static final int THIRTYTWO = 2; + // E.B -> private to public + public static final int[][][] bitrates = { + {{0 /*free format*/, 32000, 48000, 56000, 64000, 80000, 96000, + 112000, 128000, 144000, 160000, 176000, 192000, 224000, 256000, 0}, + {0 /*free format*/, 8000, 16000, 24000, 32000, 40000, 48000, + 56000, 64000, 80000, 96000, 112000, 128000, 144000, 160000, 0}, + {0 /*free format*/, 8000, 16000, 24000, 32000, 40000, 48000, + 56000, 64000, 80000, 96000, 112000, 128000, 144000, 160000, 0}}, + + {{0 /*free format*/, 32000, 64000, 96000, 128000, 160000, 192000, + 224000, 256000, 288000, 320000, 352000, 384000, 416000, 448000, 0}, + {0 /*free format*/, 32000, 48000, 56000, 64000, 80000, 96000, + 112000, 128000, 160000, 192000, 224000, 256000, 320000, 384000, 0}, + {0 /*free format*/, 32000, 40000, 48000, 56000, 64000, 80000, + 96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000, 0}}, + // SZD: MPEG2.5 + {{0 /*free format*/, 32000, 48000, 56000, 64000, 80000, 96000, + 112000, 128000, 144000, 160000, 176000, 192000, 224000, 256000, 0}, + {0 /*free format*/, 8000, 16000, 24000, 32000, 40000, 48000, + 56000, 64000, 80000, 96000, 112000, 128000, 144000, 160000, 0}, + {0 /*free format*/, 8000, 16000, 24000, 32000, 40000, 48000, + 56000, 64000, 80000, 96000, 112000, 128000, 144000, 160000, 0}}, + + }; + // E.B -> private to public + public static final String[][][] bitrate_str = { + {{"free format", "32 kbit/s", "48 kbit/s", "56 kbit/s", "64 kbit/s", + "80 kbit/s", "96 kbit/s", "112 kbit/s", "128 kbit/s", "144 kbit/s", + "160 kbit/s", "176 kbit/s", "192 kbit/s", "224 kbit/s", "256 kbit/s", + "forbidden"}, + {"free format", "8 kbit/s", "16 kbit/s", "24 kbit/s", "32 kbit/s", + "40 kbit/s", "48 kbit/s", "56 kbit/s", "64 kbit/s", "80 kbit/s", + "96 kbit/s", "112 kbit/s", "128 kbit/s", "144 kbit/s", "160 kbit/s", + "forbidden"}, + {"free format", "8 kbit/s", "16 kbit/s", "24 kbit/s", "32 kbit/s", + "40 kbit/s", "48 kbit/s", "56 kbit/s", "64 kbit/s", "80 kbit/s", + "96 kbit/s", "112 kbit/s", "128 kbit/s", "144 kbit/s", "160 kbit/s", + "forbidden"}}, + + {{"free format", "32 kbit/s", "64 kbit/s", "96 kbit/s", "128 kbit/s", + "160 kbit/s", "192 kbit/s", "224 kbit/s", "256 kbit/s", "288 kbit/s", + "320 kbit/s", "352 kbit/s", "384 kbit/s", "416 kbit/s", "448 kbit/s", + "forbidden"}, + {"free format", "32 kbit/s", "48 kbit/s", "56 kbit/s", "64 kbit/s", + "80 kbit/s", "96 kbit/s", "112 kbit/s", "128 kbit/s", "160 kbit/s", + "192 kbit/s", "224 kbit/s", "256 kbit/s", "320 kbit/s", "384 kbit/s", + "forbidden"}, + {"free format", "32 kbit/s", "40 kbit/s", "48 kbit/s", "56 kbit/s", + "64 kbit/s", "80 kbit/s", "96 kbit/s", "112 kbit/s", "128 kbit/s", + "160 kbit/s", "192 kbit/s", "224 kbit/s", "256 kbit/s", "320 kbit/s", + "forbidden"}}, + // SZD: MPEG2.5 + {{"free format", "32 kbit/s", "48 kbit/s", "56 kbit/s", "64 kbit/s", + "80 kbit/s", "96 kbit/s", "112 kbit/s", "128 kbit/s", "144 kbit/s", + "160 kbit/s", "176 kbit/s", "192 kbit/s", "224 kbit/s", "256 kbit/s", + "forbidden"}, + {"free format", "8 kbit/s", "16 kbit/s", "24 kbit/s", "32 kbit/s", + "40 kbit/s", "48 kbit/s", "56 kbit/s", "64 kbit/s", "80 kbit/s", + "96 kbit/s", "112 kbit/s", "128 kbit/s", "144 kbit/s", "160 kbit/s", + "forbidden"}, + {"free format", "8 kbit/s", "16 kbit/s", "24 kbit/s", "32 kbit/s", + "40 kbit/s", "48 kbit/s", "56 kbit/s", "64 kbit/s", "80 kbit/s", + "96 kbit/s", "112 kbit/s", "128 kbit/s", "144 kbit/s", "160 kbit/s", + "forbidden"}}, + }; + // VBR support added by E.B + private final double[] h_vbr_time_per_frame = {-1, 384, 1152, 1152}; + public short checksum; + public int framesize; + public int nSlots; + private int h_layer, h_protection_bit, h_bitrate_index, + h_padding_bit, h_mode_extension; + private int h_version; + private int h_mode; + private int h_sample_frequency; + private int h_number_of_subbands, h_intensity_stereo_bound; + private boolean h_vbr; + private int h_vbr_frames; + private int h_vbr_bytes; + private byte syncmode = Bitstream.INITIAL_SYNC; + private Crc16 crc; + + Header() { + } + + /** + * Returns total ms. + * + * @param streamsize + * @return total milliseconds + */ + public float total_ms(int streamsize) { + return (max_number_of_frames(streamsize) * ms_per_frame()); + } + + public String toString() { + StringBuilder buffer = new StringBuilder(200); + buffer.append("Layer "); + buffer.append(layer_string()); + buffer.append(" frame "); + buffer.append(mode_string()); + buffer.append(' '); + buffer.append(version_string()); + if (!checksums()) + buffer.append(" no"); + buffer.append(" checksums"); + buffer.append(' '); + buffer.append(sample_frequency_string()); + buffer.append(','); + buffer.append(' '); + buffer.append(bitrate_string()); + + return buffer.toString(); + } + + // Functions to query header contents: + + /** + * Read a 32-bit header from the bitstream. + */ + void read_header(Bitstream stream, Crc16[] crcp) throws BitstreamException { + int headerstring; + int channel_bitrate; + boolean sync = false; + do { + headerstring = stream.syncHeader(syncmode); + if (syncmode == Bitstream.INITIAL_SYNC) { + h_version = ((headerstring >>> 19) & 1); + if (((headerstring >>> 20) & 1) == 0) // SZD: MPEG2.5 detection + if (h_version == MPEG2_LSF) + h_version = MPEG25_LSF; + else + throw stream.newBitstreamException(Bitstream.UNKNOWN_ERROR); + if ((h_sample_frequency = ((headerstring >>> 10) & 3)) == 3) { + throw stream.newBitstreamException(Bitstream.UNKNOWN_ERROR); + } + } + h_layer = 4 - (headerstring >>> 17) & 3; + h_protection_bit = (headerstring >>> 16) & 1; + h_bitrate_index = (headerstring >>> 12) & 0xF; + h_padding_bit = (headerstring >>> 9) & 1; + h_mode = ((headerstring >>> 6) & 3); + h_mode_extension = (headerstring >>> 4) & 3; + if (h_mode == JOINT_STEREO) + h_intensity_stereo_bound = (h_mode_extension << 2) + 4; + else + h_intensity_stereo_bound = 0; // should never be used + // calculate number of subbands: + if (h_layer == 1) + h_number_of_subbands = 32; + else { + channel_bitrate = h_bitrate_index; + // calculate bitrate per channel: + if (h_mode != SINGLE_CHANNEL) + if (channel_bitrate == 4) + channel_bitrate = 1; + else + channel_bitrate -= 4; + if ((channel_bitrate == 1) || (channel_bitrate == 2)) + if (h_sample_frequency == THIRTYTWO) + h_number_of_subbands = 12; + else + h_number_of_subbands = 8; + else if ((h_sample_frequency == FOURTYEIGHT) || ((channel_bitrate >= 3) && (channel_bitrate <= 5))) + h_number_of_subbands = 27; + else + h_number_of_subbands = 30; + } + if (h_intensity_stereo_bound > h_number_of_subbands) + h_intensity_stereo_bound = h_number_of_subbands; + // calculate framesize and nSlots + calculate_framesize(); + // read framedata: + int framesizeloaded = stream.read_frame_data(framesize); + if ((framesize >= 0) && (framesizeloaded != framesize)) { + // Data loaded does not match to expected framesize, + // it might be an ID3v1 TAG. (Fix 11/17/04). + throw stream.newBitstreamException(Bitstream.INVALIDFRAME); + } + if (stream.isSyncCurrentPosition(syncmode)) { + if (syncmode == Bitstream.INITIAL_SYNC) { + syncmode = Bitstream.STRICT_SYNC; + stream.set_syncword(headerstring & 0xFFF80CC0); + } + sync = true; + } else { + stream.unreadFrame(); + } + } + while (!sync); + stream.parse_frame(); + if (h_protection_bit == 0) { + // frame contains a crc checksum + checksum = (short) stream.get_bits(16); + if (crc == null) + crc = new Crc16(); + crc.add_bits(headerstring, 16); + crcp[0] = crc; + } else + crcp[0] = null; + } + + /** + * Parse frame to extract optionnal VBR frame. + * + * @param firstframe + * @author E.B (javalayer@javazoom.net) + */ + void parseVBR(byte[] firstframe) throws BitstreamException { + // Trying Xing header. + String xing = "Xing"; + byte[] tmp = new byte[4]; + int offset = 0; + // Compute "Xing" offset depending on MPEG version and channels. + if (h_version == MPEG1) { + if (h_mode == SINGLE_CHANNEL) offset = 21 - 4; + else offset = 36 - 4; + } else { + if (h_mode == SINGLE_CHANNEL) offset = 13 - 4; + else offset = 21 - 4; + } + byte[] h_vbr_toc; + try { + System.arraycopy(firstframe, offset, tmp, 0, 4); + // Is "Xing" ? + if (xing.equals(new String(tmp))) { + //Yes. + h_vbr = true; + h_vbr_frames = -1; + h_vbr_bytes = -1; + h_vbr_toc = new byte[100]; + + int length = 4; + // Read flags. + byte[] flags = new byte[4]; + System.arraycopy(firstframe, offset + length, flags, 0, flags.length); + length += flags.length; + // Read number of frames (if available). + if ((flags[3] & (byte) (1)) != 0) { + System.arraycopy(firstframe, offset + length, tmp, 0, tmp.length); + h_vbr_frames = (tmp[0] << 24) & 0xFF000000 | (tmp[1] << 16) & 0x00FF0000 | (tmp[2] << 8) & 0x0000FF00 | tmp[3] & 0x000000FF; + length += 4; + } + // Read size (if available). + if ((flags[3] & (byte) (1 << 1)) != 0) { + System.arraycopy(firstframe, offset + length, tmp, 0, tmp.length); + h_vbr_bytes = (tmp[0] << 24) & 0xFF000000 | (tmp[1] << 16) & 0x00FF0000 | (tmp[2] << 8) & 0x0000FF00 | tmp[3] & 0x000000FF; + length += 4; + } + // Read TOC (if available). + if ((flags[3] & (byte) (1 << 2)) != 0) { + System.arraycopy(firstframe, offset + length, h_vbr_toc, 0, h_vbr_toc.length); + length += h_vbr_toc.length; + } + // Read scale (if available). + if ((flags[3] & (byte) (1 << 3)) != 0) { + System.arraycopy(firstframe, offset + length, tmp, 0, tmp.length); + } + } + } catch (ArrayIndexOutOfBoundsException e) { + throw new BitstreamException("XingVBRHeader Corrupted", e); + } + + // Trying VBRI header. + String vbri = "VBRI"; + offset = 36 - 4; + try { + System.arraycopy(firstframe, offset, tmp, 0, 4); + // Is "VBRI" ? + if (vbri.equals(new String(tmp))) { + //Yes. + h_vbr = true; + h_vbr_frames = -1; + h_vbr_bytes = -1; + // Bytes. + int length = 4 + 6; + System.arraycopy(firstframe, offset + length, tmp, 0, tmp.length); + h_vbr_bytes = (tmp[0] << 24) & 0xFF000000 | (tmp[1] << 16) & 0x00FF0000 | (tmp[2] << 8) & 0x0000FF00 | tmp[3] & 0x000000FF; + length += 4; + // Frames. + System.arraycopy(firstframe, offset + length, tmp, 0, tmp.length); + h_vbr_frames = (tmp[0] << 24) & 0xFF000000 | (tmp[1] << 16) & 0x00FF0000 | (tmp[2] << 8) & 0x0000FF00 | tmp[3] & 0x000000FF; + } + } catch (ArrayIndexOutOfBoundsException e) { + throw new BitstreamException("VBRIVBRHeader Corrupted", e); + } + } + + /** + * Returns version. + */ + public int version() { + return h_version; + } + + /** + * Returns Layer ID. + */ + public int layer() { + return h_layer; + } + + /** + * Returns bitrate index. + */ + public int bitrate_index() { + return h_bitrate_index; + } + + /** + * Returns Sample Frequency. + */ + public int sample_frequency() { + return h_sample_frequency; + } + + /** + * Returns Frequency. + */ + public int frequency() { + return frequencies[h_version][h_sample_frequency]; + } + + /** + * Returns Mode. + */ + public int mode() { + return h_mode; + } + + /** + * Returns Protection bit. + */ + public boolean checksums() { + return h_protection_bit == 0; + } + + // Seeking and layer III stuff + + /** + * Returns Checksum flag. + * Compares computed checksum with stream checksum. + */ + public boolean checksum_ok() { + return (checksum == crc.checksum()); + } + + /** + * Returns Slots. + */ + public int slots() { + return nSlots; + } + + // E.B -> private to public + + /** + * Returns Mode Extension. + */ + public int mode_extension() { + return h_mode_extension; + } + + /** + * Calculate Frame size. + * Calculates framesize in bytes excluding header size. + */ + public void calculate_framesize() { + + if (h_layer == 1) { + framesize = (12 * bitrates[h_version][0][h_bitrate_index]) / + frequencies[h_version][h_sample_frequency]; + if (h_padding_bit != 0) framesize++; + framesize <<= 2; // one slot is 4 bytes long + nSlots = 0; + } else { + framesize = (144 * bitrates[h_version][h_layer - 1][h_bitrate_index]) / + frequencies[h_version][h_sample_frequency]; + if (h_version == MPEG2_LSF || h_version == MPEG25_LSF) framesize >>= 1; // SZD + if (h_padding_bit != 0) framesize++; + // Layer III slots + if (h_layer == 3) { + if (h_version == MPEG1) { + nSlots = framesize - ((h_mode == SINGLE_CHANNEL) ? 17 : 32) // side info size + - ((h_protection_bit != 0) ? 0 : 2) // CRC size + - 4; // header size + } else { // MPEG-2 LSF, SZD: MPEG-2.5 LSF + nSlots = framesize - ((h_mode == SINGLE_CHANNEL) ? 9 : 17) // side info size + - ((h_protection_bit != 0) ? 0 : 2) // CRC size + - 4; // header size + } + } else { + nSlots = 0; + } + } + framesize -= 4; // subtract header size + } + + /** + * Returns the maximum number of frames in the stream. + * + * @param streamsize + * @return number of frames + */ + public int max_number_of_frames(int streamsize) // E.B + { + if (h_vbr) return h_vbr_frames; + else { + if ((framesize + 4 - h_padding_bit) == 0) return 0; + else return (streamsize / (framesize + 4 - h_padding_bit)); + } + } + + /** + * Returns ms/frame. + * + * @return milliseconds per frame + */ + public float ms_per_frame() // E.B + { + if (h_vbr) { + double tpf = h_vbr_time_per_frame[layer()] / frequency(); + if ((h_version == MPEG2_LSF) || (h_version == MPEG25_LSF)) tpf /= 2; + return ((float) (tpf * 1000)); + } else { + float[][] ms_per_frame_array = {{8.707483f, 8.0f, 12.0f}, + {26.12245f, 24.0f, 36.0f}, + {26.12245f, 24.0f, 36.0f}}; + return (ms_per_frame_array[h_layer - 1][h_sample_frequency]); + } + } + + // functions which return header informations as strings: + + /** + * Return Layer version. + */ + public String layer_string() { + switch (h_layer) { + case 1: + return "I"; + case 2: + return "II"; + case 3: + return "III"; + } + return null; + } + + /** + * Return Bitrate. + * + * @return bitrate in bps + */ + public String bitrate_string() { + if (h_vbr) { + return bitrate() / 1000 + " kb/s"; + } else return bitrate_str[h_version][h_layer - 1][h_bitrate_index]; + } + + /** + * Return Bitrate. + * + * @return bitrate in bps and average bitrate for VBR header + */ + public int bitrate() { + if (h_vbr) { + return ((int) ((h_vbr_bytes * 8) / (ms_per_frame() * h_vbr_frames))) * 1000; + } else return bitrates[h_version][h_layer - 1][h_bitrate_index]; + } + + /** + * Returns Frequency + * + * @return frequency string in kHz + */ + public String sample_frequency_string() { + switch (h_sample_frequency) { + case THIRTYTWO: + if (h_version == MPEG1) + return "32 kHz"; + else if (h_version == MPEG2_LSF) + return "16 kHz"; + else // SZD + return "8 kHz"; + case FOURTYFOUR_POINT_ONE: + if (h_version == MPEG1) + return "44.1 kHz"; + else if (h_version == MPEG2_LSF) + return "22.05 kHz"; + else // SZD + return "11.025 kHz"; + case FOURTYEIGHT: + if (h_version == MPEG1) + return "48 kHz"; + else if (h_version == MPEG2_LSF) + return "24 kHz"; + else // SZD + return "12 kHz"; + } + return (null); + } + + /** + * Returns Mode. + */ + public String mode_string() { + switch (h_mode) { + case STEREO: + return "Stereo"; + case JOINT_STEREO: + return "Joint stereo"; + case DUAL_CHANNEL: + return "Dual channel"; + case SINGLE_CHANNEL: + return "Single channel"; + } + return null; + } + + /** + * Returns Version. + * + * @return MPEG-1 or MPEG-2 LSF or MPEG-2.5 LSF + */ + public String version_string() { + switch (h_version) { + case MPEG1: + return "MPEG-1"; + case MPEG2_LSF: + return "MPEG-2 LSF"; + case MPEG25_LSF: // SZD + return "MPEG-2.5 LSF"; + } + return (null); + } + + /** + * Returns the number of subbands in the current frame. + * + * @return number of subbands + */ + public int number_of_subbands() { + return h_number_of_subbands; + } + + /** + * Returns Intensity Stereo. + * (Layer II joint stereo only). + * Returns the number of subbands which are in stereo mode, + * subbands above that limit are in intensity stereo mode. + * + * @return intensity + */ + public int intensity_stereo_bound() { + return h_intensity_stereo_bound; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerErrors.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerErrors.java new file mode 100644 index 00000000..42a81bdf --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerErrors.java @@ -0,0 +1,39 @@ +/* + * 11/19/04 1.0 moved to LGPL. + * 12/12/99 Initial version. mdm@techie.com + *----------------------------------------------------------------------- + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *---------------------------------------------------------------------- + */ + +package coloryr.allmusic.core.decoder; + +/** + * Exception erorr codes for components of the JavaLayer API. + */ +public interface JavaLayerErrors { + /** + * The first bitstream error code. See the {@link DecoderErrors DecoderErrors} + * interface for other bitstream error codes. + */ + int BITSTREAM_ERROR = 0x100; + + /** + * The first decoder error code. See the {@link DecoderErrors DecoderErrors} + * interface for other decoder error codes. + */ + int DECODER_ERROR = 0x200; + +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerException.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerException.java new file mode 100644 index 00000000..d624c3e8 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/decoder/JavaLayerException.java @@ -0,0 +1,61 @@ +/* + * 11/19/04 1.0 moved to LGPL. + * 12/12/99 Initial version. mdm@techie.com + *----------------------------------------------------------------------- + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *---------------------------------------------------------------------- + */ + +package coloryr.allmusic.core.decoder; + +import java.io.PrintStream; + + +/** + * The JavaLayerException is the base class for all API-level + * exceptions thrown by JavaLayer. To facilitate conversion and + * common handling of exceptions from other domains, the class + * can delegate some functionality to a contained Throwable instance. + *

+ * + * @author MDM + */ +public class JavaLayerException extends Exception { + + private Throwable exception; + + public JavaLayerException(String msg) { + super(msg); + } + + public JavaLayerException(String msg, Throwable t) { + super(msg); + exception = t; + } + + public void printStackTrace() { + printStackTrace(System.err); + } + + public void printStackTrace(PrintStream ps) { + if (this.exception == null) { + super.printStackTrace(ps); + } else { + exception.printStackTrace(); + } + } + + +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/enums/EncryptType.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/enums/EncryptType.java new file mode 100644 index 00000000..305bb5e2 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/enums/EncryptType.java @@ -0,0 +1,5 @@ +package coloryr.allmusic.core.enums; + +public enum EncryptType { + WEAPI, EAPI, API +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/enums/HudPos.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/enums/HudPos.java new file mode 100644 index 00000000..026127b4 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/enums/HudPos.java @@ -0,0 +1,5 @@ +package coloryr.allmusic.core.enums; + +public enum HudPos { + info, list, lyric, pic +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/hud/DataSql.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/hud/DataSql.java new file mode 100644 index 00000000..b61a6556 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/hud/DataSql.java @@ -0,0 +1,255 @@ +package coloryr.allmusic.core.hud; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.objs.hud.PosObj; +import coloryr.allmusic.core.objs.hud.SaveObj; + +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.Statement; +import java.text.MessageFormat; +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.Semaphore; + +public class DataSql { + private static final Queue tasks = new ConcurrentLinkedQueue<>(); + private static final Semaphore semaphore = new Semaphore(0); + /** + * 创建表用 + */ + private static final String table = "CREATE TABLE \"allmusic\" (\n" + + " \"id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,\n" + + " \"name\" TEXT(20),\n" + + " \"info_x\" integer(6),\n" + + " \"info_y\" integer(6),\n" + + " \"info_enable\" integer(1),\n" + + " \"lyric_x\" integer(6),\n" + + " \"lyric_y\" integer(6),\n" + + " \"lyric_enable\" integer(1),\n" + + " \"list_x\" integer(6),\n" + + " \"list_y\" integer(6),\n" + + " \"list_enable\" integer(1),\n" + + " \"pic_x\" integer(6),\n" + + " \"pic_y\" integer(6),\n" + + " \"pic_size\" integer(6),\n" + + " \"pic_enable\" integer(1),\n" + + " \"pic_rotate\" integer(1),\n" + + " \"pic_rotate_speed\" integer(6)\n" + + ");"; + /** + * 数据库文件 + */ + public static File sqlFile; + private static boolean isRun; + /** + * 数据库链接对象 + */ + private static Connection connection; + + /** + * 初始化数据库 + */ + public static void init() { + try { + AllMusic.log.info("正在初始化数据库"); + if (connection != null) + connection.close(); + Class.forName("org.sqlite.JDBC"); + connection = DriverManager.getConnection("jdbc:sqlite:" + sqlFile.getPath()); + Statement stat = connection.createStatement(); + ResultSet set = stat.executeQuery("SELECT name FROM sqlite_master WHERE type='table' AND name='allmusic';"); + if (!set.next()) { + set.close(); + stat.execute(table); + } + stat.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * 检查玩家是否在数据库 + * + * @param name 用户名 + * @return 结果 + */ + public static boolean check(String name) { + try { + boolean have = false; + if (connection.isReadOnly() || connection.isClosed()) { + init(); + } + Statement stat = connection.createStatement(); + ResultSet set = stat.executeQuery("SELECT allmusic.id FROM allmusic WHERE allmusic.name ='" + name + "'"); + if (set.next()) { + have = true; + } + set.close(); + stat.close(); + return have; + } catch (Exception e) { + e.printStackTrace(); + } + return false; + } + + /** + * 更新玩家Hud数据 + * + * @param name 用户名 + * @param hud Hud数据 + */ + private static void update(String name, SaveObj hud) { + String sql = ""; + try { + if (connection.isReadOnly() || connection.isClosed()) { + init(); + } + Statement stat = connection.createStatement(); + sql = MessageFormat.format("UPDATE allmusic SET info_x={0},info_y={1},info_enable={2},lyric_x={3},lyric_y={4},lyric_enable={5},list_x={6},list_y={7}, list_enable={8},pic_x={9},pic_y={10},pic_enable={11},pic_size={12},pic_rotate={13},pic_rotate_speed={14} WHERE name=@name", + hud.Info.x, hud.Info.y, hud.EnableInfo ? 1 : 0, + hud.Lyric.x, hud.Lyric.y, hud.EnableLyric ? 1 : 0, + hud.List.x, hud.List.y, hud.EnableList ? 1 : 0, + hud.Pic.x, hud.Pic.y, hud.EnablePic ? 1 : 0, + hud.PicSize, hud.EnablePicRotate ? 1: 0, + hud.PicRotateSpeed); + sql = sql.replace("@name", "'" + name + "'"); + stat.execute(sql); + stat.close(); + } catch (Exception e) { + AllMusic.log.info(sql); + e.printStackTrace(); + } + } + + /** + * 添加用户Hud数据 + * + * @param name 用户名 + * @param hud 数据 + */ + public static void addUser(String name, SaveObj hud) { + String sql = ""; + try { + if (connection.isReadOnly() || connection.isClosed()) { + init(); + } + if (check(name)) { + update(name, hud); + } else { + Statement stat = connection.createStatement(); + sql = MessageFormat.format("INSERT INTO allmusic (name,info_x,info_y," + + "info_enable,lyric_x,lyric_y,lyric_enable,list_x,list_y,list_enable," + + "pic_x,pic_y,pic_enable,pic_size,pic_rotate,pic_rotate_speed)" + + "VALUES (@name,{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14})", + hud.Info.x, hud.Info.y, hud.EnableInfo ? 1 : 0, + hud.Lyric.x, hud.Lyric.y, hud.EnableLyric ? 1 : 0, + hud.List.x, hud.List.y, hud.EnableList ? 1 : 0, + hud.Pic.x, hud.Pic.y, hud.EnablePic ? 1 : 0, + hud.PicSize, hud.EnablePicRotate ? 1: 0, + hud.PicRotateSpeed); + sql = sql.replace("@name", "'" + name + "'"); + stat.execute(sql); + stat.close(); + } + } catch (Exception e) { + AllMusic.log.info(sql); + e.printStackTrace(); + } + } + + /** + * 读取所有数据 + */ + private static void readAll() { + try { + AllMusic.log.info("正在读取数据库所有内容"); + if (connection.isReadOnly() || connection.isClosed()) { + init(); + } + Statement stat = connection.createStatement(); + ResultSet set = stat.executeQuery("SELECT name,info_x,info_y,info_enable,lyric_x,lyric_y,lyric_enable,list_x,list_y,list_enable,pic_x,pic_y,pic_enable,pic_size,pic_rotate,pic_rotate_speed FROM allmusic"); + while (set.next()) { + String name = set.getString(1); + SaveObj obj = new SaveObj(); + PosObj pos1 = new PosObj(); + pos1.x = set.getInt(2); + pos1.y = set.getInt(3); + obj.Info = pos1; + obj.EnableInfo = set.getInt(4) == 1; + PosObj pos2 = new PosObj(); + pos2.x = set.getInt(5); + pos2.y = set.getInt(6); + obj.Lyric = pos2; + obj.EnableLyric = set.getInt(7) == 1; + PosObj pos3 = new PosObj(); + pos3.x = set.getInt(8); + pos3.y = set.getInt(9); + obj.List = pos3; + obj.EnableList = set.getInt(10) == 1; + PosObj pos4 = new PosObj(); + pos4.x = set.getInt(11); + pos4.y = set.getInt(12); + obj.Pic = pos4; + obj.EnablePic = set.getInt(13) == 1; + obj.PicSize = set.getInt(14); + obj.EnablePicRotate = set.getInt(15) == 1; + obj.PicRotateSpeed = set.getInt(16); + HudUtils.add(name, obj); + } + stat.close(); + } catch (Exception e) { + AllMusic.log.warning("数据库读取错误,请删除关闭服务器删除数据库,在启动服务器"); + e.printStackTrace(); + } + } + + public static void task(Runnable runnable) { + tasks.add(runnable); + semaphore.release(); + } + + /** + * 启用Hud数据库 + */ + public static void start() { + init(); + readAll(); + Thread thread = new Thread(DataSql::run); + isRun = true; + thread.start(); + } + + /** + * 停止数据库 + */ + public static void stop() { + isRun = false; + semaphore.release(); + HudUtils.save(); + } + + private static void run() { + Runnable runnable; + while (isRun) { + try { + semaphore.acquire(); + if (!isRun) + return; + do { + runnable = tasks.poll(); + if (runnable != null) { + runnable.run(); + } + } + while (runnable != null); + } catch (Exception e) { + e.printStackTrace(); + } + } + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/hud/HudUtils.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/hud/HudUtils.java new file mode 100644 index 00000000..d4c3131f --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/hud/HudUtils.java @@ -0,0 +1,348 @@ +package coloryr.allmusic.core.hud; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.enums.HudPos; +import coloryr.allmusic.core.music.play.LyricSave; +import coloryr.allmusic.core.music.play.PlayMusic; +import coloryr.allmusic.core.objs.hud.PosObj; +import coloryr.allmusic.core.objs.hud.SaveObj; +import coloryr.allmusic.core.objs.music.SongInfoObj; +import coloryr.allmusic.core.utils.Function; +import com.google.gson.Gson; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +public class HudUtils { + private static final Map huds = new ConcurrentHashMap<>(); + + public static SaveObj get(String name) { + if (!huds.containsKey(name)) { + SaveObj obj = AllMusic.getConfig().DefaultHud.copy(); + huds.put(name, obj); + DataSql.task(() -> DataSql.addUser(name, obj)); + return obj; + } + return huds.get(name); + } + + public static void add(String name, SaveObj hud) { + huds.put(name, hud); + } + + public static void addAndSave(String name, SaveObj hud) { + huds.put(name, hud); + DataSql.task(() -> DataSql.addUser(name, hud)); + } + + public static void save() { + for (Map.Entry item : huds.entrySet()) { + DataSql.addUser(item.getKey(), item.getValue()); + } + } + + /** + * 设置玩家Hud位置 + * + * @param player 用户名 + * @param pos 位置 + * @param x x + * @param y y + * @return 位置数据 + */ + public static PosObj setHudPos(String player, String pos, String x, String y) { + SaveObj obj = get(player); + if (obj == null) + obj = AllMusic.getConfig().DefaultHud.copy(); + HudPos pos1 = HudPos.valueOf(pos); + PosObj posOBJ = new PosObj(0, 0); + if (!Function.isInteger(x) && !Function.isInteger(y)) + return null; + int x1 = Integer.parseInt(x); + int y1 = Integer.parseInt(y); + + switch (pos1) { + case lyric: + posOBJ = obj.Lyric; + break; + case list: + posOBJ = obj.List; + break; + case info: + posOBJ = obj.Info; + break; + case pic: + posOBJ = obj.Pic; + } + posOBJ.x = x1; + posOBJ.y = y1; + + addAndSave(player, obj); + AllMusic.save(); + HudUtils.sendHudPos(player); + return posOBJ; + } + + /** + * 更新Hud的List数据 + */ + public static void sendHudListData() { + String info; + if (PlayMusic.getSize() == 0) { + info = AllMusic.getMessage().Hud.NoList; + } else { + String now; + StringBuilder list = new StringBuilder(); + for (SongInfoObj info1 : PlayMusic.getList()) { + if (info1 == null) + continue; + now = info1.getInfo(); + if (now.length() > AllMusic.getConfig().MessageLimitSize) + now = now.substring(0, AllMusic.getConfig().MessageLimitSize - 1) + "..."; + list.append(now).append("\n"); + } + info = AllMusic.getMessage().Hud.List + .replace("%Size%", String.valueOf(PlayMusic.getList().size())) + .replace("%List%", list.toString()); + } + + AllMusic.side.sendHudList(info); + } + + /** + * 时间转换 + * + * @param time 时间 + * @return 结果 + */ + private static String tranTime(int time) { + int m = time / 60; + int s = time - m * 60; + return (m < 10 ? "0" : "") + m + ":" + (s < 10 ? "0" : "") + s; + } + + /** + * 更新Hud的信息数据 + */ + public static void sendHudNowData() { + String info; + if (PlayMusic.nowPlayMusic == null) { + info = AllMusic.getMessage().Hud.NoMusic; + } else { + info = AllMusic.getMessage().Hud.Music + .replace("%Name%", PlayMusic.nowPlayMusic.getName()) + .replace("%AllTime%", tranTime(PlayMusic.musicAllTime)) + .replace("%NowTime%", tranTime(PlayMusic.musicNowTime / 1000)) + .replace("%Author%", PlayMusic.nowPlayMusic.getAuthor()) + .replace("%Alia%", PlayMusic.nowPlayMusic.getAlia()) + .replace("%Al%", PlayMusic.nowPlayMusic.getAl()) + .replace("%Player%", PlayMusic.nowPlayMusic.getCall()); + } + + AllMusic.side.sendHudInfo(info); + } + + /** + * 更新Hud的歌词数据 + */ + public static void sendHudLyricData() { + String info; + LyricSave obj = PlayMusic.lyric; + if (obj == null) { + info = AllMusic.getMessage().Hud.NoLyric; + } else { + String lyric = obj.getLyric(); + String tLyric = obj.getTlyric(); + String kLyric = obj.getKly(); + if (!AllMusic.getConfig().KtvMode) { + info = AllMusic.getMessage().Hud.Lyric + .replace("%Lyric%", lyric == null ? "" : lyric) + .replace("%Tlyric%", tLyric != null ? tLyric : ""); + } else { + info = AllMusic.getMessage().Hud.Ktv + .replace("%Lyric%", lyric != null ? lyric : "") + .replace("%KLyric%", kLyric != null ? kLyric : "") + .replace("%Tlyric%", tLyric != null ? tLyric : ""); + } + } + + AllMusic.side.sendHudLyric(info); + } + + /** + * 更新Hud的开启关闭数据 + * + * @param player 用户名 + * @param pos 输入数据 + * @return 设置结果 + */ + public static boolean setHudEnable(String player, String pos) { + SaveObj obj = get(player); + boolean res = false; + if (obj == null) { + obj = AllMusic.getConfig().DefaultHud.copy(); + res = obj.EnableInfo && obj.EnableList && obj.EnableLyric; + } else { + if (pos == null) { + if (obj.EnableInfo && obj.EnableList && obj.EnableLyric) { + obj.EnableInfo = false; + obj.EnableList = false; + obj.EnableLyric = false; + obj.EnablePic = false; + } else { + obj.EnableInfo = true; + obj.EnableList = true; + obj.EnableLyric = true; + obj.EnablePic = true; + res = true; + } + } else { + HudPos pos1 = HudPos.valueOf(pos); + switch (pos1) { + case info: + obj.EnableInfo = !obj.EnableInfo; + break; + case list: + obj.EnableList = !obj.EnableList; + break; + case lyric: + obj.EnableLyric = !obj.EnableLyric; + break; + case pic: + obj.EnablePic = !obj.EnablePic; + break; + } + } + } + clearHud(player); + addAndSave(player, obj); + AllMusic.save(); + HudUtils.sendHudPos(player); + if (pos == null) { + return res; + } else { + HudPos pos1 = HudPos.valueOf(pos); + switch (pos1) { + case info: + return obj.EnableInfo; + case list: + return obj.EnableList; + case lyric: + return obj.EnableLyric; + case pic: + return obj.EnablePic; + } + } + return false; + } + + /** + * 清空Hud数据 + */ + public static void clearHud() { + AllMusic.side.clearHud(); + } + + /** + * 清空Hud数 + * + * @param player 用户名 + */ + public static void clearHud(String player) { + AllMusic.side.clearHud(player); + } + + /** + * 发送Hud位置信息 + * + * @param player 用户名 + */ + public static void sendHudPos(String player) { + AllMusic.side.runTask(() -> { + try { + SaveObj obj = get(player); + if (obj == null) { + obj = AllMusic.getConfig().DefaultHud.copy(); + addAndSave(player, obj); + AllMusic.save(); + } + String data = new Gson().toJson(obj); + AllMusic.side.send(data, player); + } catch (Exception e1) { + AllMusic.log.warning("§d[AllMusic]§c数据发送发生错误"); + e1.printStackTrace(); + } + }); + } + + /** + * 重置Hud位置 + * + * @param player 用户名 + */ + public static void reset(String player) { + SaveObj obj = AllMusic.getConfig().DefaultHud.copy(); + clearHud(player); + addAndSave(player, obj); + HudUtils.sendHudPos(player); + } + + /** + * 设置Hud的图片大小 + * + * @param player 用户名 + * @param size 大小 + * @return 结果 + */ + public static boolean setPicSize(String player, String size) { + SaveObj obj = get(player); + if (obj == null) + obj = AllMusic.getConfig().DefaultHud.copy(); + if (!Function.isInteger(size)) + return false; + + obj.PicSize = Integer.parseInt(size); + + addAndSave(player, obj); + HudUtils.sendHudPos(player); + return true; + } + + /** + * 图片旋转开关 + * @param player 用户名 + * @param open 开关 + * @return 结果 + */ + public static boolean setPicRotate(String player, String open) { + SaveObj obj = get(player); + if (obj == null) + obj = AllMusic.getConfig().DefaultHud.copy(); + + obj.EnablePicRotate = Boolean.parseBoolean(open); + + addAndSave(player, obj); + HudUtils.sendHudPos(player); + return obj.EnablePicRotate; + } + + /** + * 图片旋转速度设置 + * @param player 用户名 + * @param size 大小 + * @return 结果 + */ + public static boolean setPicRotateSpeed(String player, String size){ + SaveObj obj = get(player); + if (obj == null) + obj = AllMusic.getConfig().DefaultHud.copy(); + if (!Function.isInteger(size)) + return false; + + obj.PicRotateSpeed = Integer.parseInt(size); + + addAndSave(player, obj); + HudUtils.sendHudPos(player); + return true; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/APIMain.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/APIMain.java new file mode 100644 index 00000000..f9057b23 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/APIMain.java @@ -0,0 +1,342 @@ +package coloryr.allmusic.core.music.api; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.enums.EncryptType; +import coloryr.allmusic.core.music.play.LyricDo; +import coloryr.allmusic.core.music.play.LyricSave; +import coloryr.allmusic.core.music.play.PlayMusic; +import coloryr.allmusic.core.objs.HttpResObj; +import coloryr.allmusic.core.objs.SearchMusicObj; +import coloryr.allmusic.core.objs.api.music.info.InfoObj; +import coloryr.allmusic.core.objs.api.music.list.DataObj; +import coloryr.allmusic.core.objs.api.music.lyric.WLyricObj; +import coloryr.allmusic.core.objs.api.music.search.SearchDataObj; +import coloryr.allmusic.core.objs.api.music.search.songs; +import coloryr.allmusic.core.objs.api.music.trialinfo.TrialInfoObj; +import coloryr.allmusic.core.objs.api.program.info.PrInfoObj; +import coloryr.allmusic.core.objs.music.SearchPageObj; +import coloryr.allmusic.core.objs.music.SongInfoObj; +import coloryr.allmusic.core.utils.Logs; +import com.google.gson.JsonObject; +import okhttp3.Cookie; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import java.util.concurrent.CopyOnWriteArrayList; + +public class APIMain { + + public int PlayNow = 0; + public boolean isUpdata; + + public APIMain() { + AllMusic.log.info("§d[AllMusic]§e正在初始化网络爬虫"); + HttpClientUtil.init(); + HttpResObj res = HttpClientUtil.get("https://music.163.com", ""); + if (res == null || !res.ok) { + AllMusic.log.info("§d[AllMusic]§c初始化网络爬虫连接失败"); + } + } + + /** + * 获取手机验证码 + * + * @param sender 发送者 + */ + public void sendCode(Object sender) { + JsonObject params = new JsonObject(); + params.addProperty("ctcode", "86"); + params.addProperty("cellphone", AllMusic.getConfig().LoginUser); + HttpResObj res = HttpClientUtil.post("https://music.163.com/api/sms/captcha/sent", params, EncryptType.WEAPI, null); + AllMusic.side.sendMessage(sender, "§d[AllMusic]§d已发送验证码\n" + res.data); + } + + /** + * 登录 + * + * @param sender 发送者 + * @param code 手机验证码 + */ + public void login(Object sender, String code) { + JsonObject params = new JsonObject(); + params.addProperty("rememberLogin", "true"); + if (AllMusic.cookie.cookieStore.containsKey("music.163.com")) { + List cookies = AllMusic.cookie.cookieStore.get("music.163.com"); + for (Cookie item : cookies) { + if (item.name().equalsIgnoreCase("os")) { + cookies.remove(item); + break; + } + } + for (Cookie item : cookies) { + if (item.name().equalsIgnoreCase("appver")) { + cookies.remove(item); + break; + } + } + List cookies1 = new CopyOnWriteArrayList<>(); + cookies1.addAll(cookies); + cookies1.add(new Cookie.Builder().name("os").value("pc").domain("music.163.com").build()); + cookies1.add(new Cookie.Builder().name("appver").value("2.10.6").domain("music.163.com").build()); + AllMusic.cookie.cookieStore.put("music.163.com", cookies1); + AllMusic.saveCookie(); + } + params.addProperty("countrycode", "86"); + params.addProperty("phone", AllMusic.getConfig().LoginUser); + params.addProperty("captcha", code); + HttpResObj res = HttpClientUtil.post("https://music.163.com/eapi/w/login/cellphone", params, EncryptType.WEAPI, null); + if (res == null || !res.ok) { + if (sender == null) + AllMusic.log.info("§d[AllMusic]§c登录失败"); + else + AllMusic.side.sendMessage(sender, "§d[AllMusic]§c登录失败"); + return; + } + if (res.data.contains("200")) { + if (sender == null) + AllMusic.log.info("§d[AllMusic]§d已登录"); + else + AllMusic.side.sendMessage(sender, "§d[AllMusic]§d已登录"); + } else { + if (sender == null) + AllMusic.log.info("§d[AllMusic]§c登录失败:账号或密码错误\n" + res.data); + else + AllMusic.side.sendMessage(sender, "§d[AllMusic]§c登录失败:账号或密码错误\n" + res.data); + } + } + + /** + * 获取音乐详情 + * + * @param id 音乐ID + * @param player 用户名 + * @param isList 是否是空闲列表 + * @return 结果 + */ + private SongInfoObj getMusicDetail(String id, String player, boolean isList) { + JsonObject params = new JsonObject(); + params.addProperty("c", "[{\"id\":" + id + "}]"); + + HttpResObj res = HttpClientUtil.post("https://music.163.com/api/v3/song/detail", params, EncryptType.WEAPI, null); + if (res != null && res.ok) { + InfoObj temp = AllMusic.gson.fromJson(res.data, InfoObj.class); + if (temp.isOk()) { + params = new JsonObject(); + params.addProperty("ids", "[" + id + "]"); + params.addProperty("br", "320000"); + res = HttpClientUtil.post("https://music.163.com/weapi/song/enhance/player/url", params, EncryptType.WEAPI, null); + if (res == null || !res.ok) { + AllMusic.log.warning("§d[AllMusic]§c版权检索失败"); + return null; + } + TrialInfoObj obj = AllMusic.gson.fromJson(res.data, TrialInfoObj.class); + return new SongInfoObj(temp.getAuthor(), temp.getName(), + id, temp.getAlia(), player, temp.getAl(), isList, temp.getLength(), + temp.getPicUrl(), obj.isTrial(), obj.getFreeTrialInfo()); + } + } + return null; + } + + /** + * 获取音乐数据 + * + * @param id 音乐ID + * @param player 用户名 + * @param isList 是否是空闲列表 + * @return 结果 + */ + public SongInfoObj getMusic(String id, String player, boolean isList) { + SongInfoObj info = getMusicDetail(id, player, isList); + if (info != null) + return info; + JsonObject params = new JsonObject(); + params.addProperty("id", id); + HttpResObj res = HttpClientUtil.post("https://music.163.com/api/dj/program/detail", params, EncryptType.WEAPI, null); + if (res != null && res.ok) { + PrInfoObj temp = AllMusic.gson.fromJson(res.data, PrInfoObj.class); + if (temp.isOk()) { + return new SongInfoObj(temp.getAuthor(), temp.getName(), + temp.getId(), temp.getAlia(), player, "电台", isList, temp.getLength(), + null, false, null); + } else { + AllMusic.log.warning("§d[AllMusic]§c歌曲信息获取为空"); + } + } + return info; + } + + /** + * 获取播放链接 + * + * @param id 音乐ID + * @return 结果 + */ + public String getPlayUrl(String id) { + JsonObject params = new JsonObject(); + params.addProperty("ids", "[" + id + "]"); + params.addProperty("br", AllMusic.getConfig().MusicBR); + HttpResObj res = HttpClientUtil.post("https://music.163.com/weapi/song/enhance/player/url", params, EncryptType.WEAPI, null); + if (res != null && res.ok) { + try { + TrialInfoObj obj = AllMusic.gson.fromJson(res.data, TrialInfoObj.class); + return obj.getUrl(); + } catch (Exception e) { + Logs.logWrite(res.data); + AllMusic.log.warning("§d[AllMusic]§c播放连接解析错误"); + e.printStackTrace(); + } + } + return null; + } + + /** + * 添加空闲歌单 + * + * @param id 歌单id + * @param sender 发送者 + */ + public void setList(String id, Object sender) { + final Thread thread = new Thread(() -> { + JsonObject params = new JsonObject(); + params.addProperty("id", id); + params.addProperty("n", 100000); + params.addProperty("s", 8); + HttpResObj res = HttpClientUtil.post("https://music.163.com/api/v6/playlist/detail", params, EncryptType.API, null); + if (res != null && res.ok) + try { + isUpdata = true; + DataObj obj = AllMusic.gson.fromJson(res.data, DataObj.class); + AllMusic.getConfig().PlayList.addAll(obj.getPlaylist()); + AllMusic.save(); + AllMusic.side.sendMessaget(sender, AllMusic.getMessage().MusicPlay.ListMusic.Get.replace("%ListName%", obj.getName())); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c歌曲列表获取错误"); + e.printStackTrace(); + } + isUpdata = false; + }, "AllMusic_setList"); + thread.start(); + } + + /** + * 获取歌词 + * + * @param id 歌曲id + * @return 结果 + */ + public LyricSave getLyric(String id) { + LyricSave lyric = new LyricSave(); + JsonObject params = new JsonObject(); + params.addProperty("id", id); + params.addProperty("cp", false); + params.addProperty("tv", 0); + params.addProperty("lv", 0); + params.addProperty("rv", 0); + params.addProperty("kv", 0); + params.addProperty("yv", 0); + params.addProperty("ytv", 0); + params.addProperty("rtv", 0); + HttpResObj res = HttpClientUtil.post("https://interface3.music.163.com/eapi/song/lyric/v1", + params, EncryptType.EAPI, "/api/song/lyric/v1"); + if (res != null && res.ok) { + try { + WLyricObj obj = AllMusic.gson.fromJson(res.data, WLyricObj.class); + LyricDo temp = new LyricDo(); + for (int times = 0; times < 3; times++) { + if (temp.check(obj)) { + AllMusic.log.warning("§d[AllMusic]§c歌词解析错误,正在进行第" + times + "重试"); + } else { + if (temp.isHave) { + lyric.setHaveLyric(AllMusic.getConfig().SendLyric); + lyric.setLyric(temp.getTemp()); + if (temp.isHaveK) { + lyric.setKlyric(temp.getKLyric()); + } + } + return lyric; + } + Thread.sleep(1000); + } + AllMusic.log.warning("§d[AllMusic]§c歌词解析失败"); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c歌词解析错误"); + e.printStackTrace(); + } + } + return lyric; + } + + /** + * 搜歌 + * + * @param name 关键字 + * @param isDefault 是否是默认方式 + * @return 结果 + */ + public SearchPageObj search(String[] name, boolean isDefault) { + List resData = new ArrayList<>(); + int maxpage; + + StringBuilder name1 = new StringBuilder(); + for (int a = isDefault ? 0 : 1; a < name.length; a++) { + name1.append(name[a]).append(" "); + } + String MusicName = name1.toString(); + MusicName = MusicName.substring(0, MusicName.length() - 1); + + JsonObject params = new JsonObject(); + params.addProperty("s", MusicName); + params.addProperty("type", 1); + params.addProperty("limit", 30); + params.addProperty("offset", 0); + + HttpResObj res = HttpClientUtil.post("https://music.163.com/weapi/search/get", params, EncryptType.WEAPI, null); + if (res != null && res.ok) { + SearchDataObj obj = AllMusic.gson.fromJson(res.data, SearchDataObj.class); + if (obj != null && obj.isOk()) { + List res1 = obj.getResult(); + SearchMusicObj item; + for (songs temp : res1) { + item = new SearchMusicObj(String.valueOf(temp.getId()), temp.getName(), temp.getArtists(), temp.getAlbum()); + resData.add(item); + } + maxpage = res1.size() / 10; + return new SearchPageObj(resData, maxpage); + } else { + AllMusic.log.warning("§d[AllMusic]§c歌曲搜索出现错误"); + + } + } + return null; + } + + /** + * 获取空闲歌单的一首歌 + * + * @return 结果 + */ + public String getListMusic() { + if (PlayMusic.error >= 10) + return null; + if (!isUpdata && AllMusic.getConfig().PlayList.size() != 0) { + String ID; + if (AllMusic.getConfig().PlayListRandom) { + if (AllMusic.getConfig().PlayList.size() == 0) + return null; + else if (AllMusic.getConfig().PlayList.size() == 1) + return AllMusic.getConfig().PlayList.get(0); + ID = AllMusic.getConfig().PlayList.get(new Random().nextInt(AllMusic.getConfig().PlayList.size())); + } else { + ID = AllMusic.getConfig().PlayList.get(PlayNow); + if (PlayNow == AllMusic.getConfig().PlayList.size() - 1) + PlayNow = 0; + else + PlayNow++; + } + return ID; + } + return null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/CryptoUtil.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/CryptoUtil.java new file mode 100644 index 00000000..2e7bb5d7 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/CryptoUtil.java @@ -0,0 +1,137 @@ +package coloryr.allmusic.core.music.api; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.objs.api.EncResObj; +import com.google.gson.JsonObject; + +import javax.crypto.Cipher; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Base64; + +public class CryptoUtil { + + private static final String presetKey = "0CoJUm6Qyw8W8jud"; + private static final String iv = "0102030405060708"; + private static final String base62 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + private final static char[] hexArray = "0123456789ABCDEF".toCharArray(); + private static final String eapiKey = "e82ckenh8dichen8"; + + private static String createSecretKey(int size) { + StringBuilder key = new StringBuilder(); + for (int i = 0; i < size; i++) { + double index = Math.floor(Math.random() * base62.length()); + key.append(base62.charAt((int) index)); + } + return key.toString(); + } + + public static String byteArrToHex(byte[] bytes) { + char[] hexChars = new char[bytes.length * 2]; + for (int j = 0; j < bytes.length; j++) { + int v = bytes[j] & 0xFF; + hexChars[j * 2] = hexArray[v >>> 4]; + hexChars[j * 2 + 1] = hexArray[v & 0x0F]; + } + return new String(hexChars); + } + + private static String aesEncrypt(String content, String key, String iv) { + String result = null; + if (content == null || key == null) + return result; + try { + Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); + byte[] bytes = content.getBytes(StandardCharsets.UTF_8); + byte[] keys = key.getBytes(StandardCharsets.UTF_8); + byte[] ivs = iv.getBytes(StandardCharsets.UTF_8); + cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(keys, "AES"), + new IvParameterSpec(ivs)); + bytes = cipher.doFinal(bytes); + result = Base64.getEncoder().encodeToString(bytes); + + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } + + private static String aesEncrypt(String content, String key) { + String result = null; + if (content == null || key == null) + return result; + try { + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + byte[] bytes = content.getBytes(StandardCharsets.UTF_8); + byte[] keys = key.getBytes(StandardCharsets.UTF_8); + cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(keys, "AES")); + bytes = cipher.doFinal(bytes); + result = byteArrToHex(bytes).toUpperCase(); + + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } + + private static String zFill(String str) { + StringBuilder strBuilder = new StringBuilder(str); + while (strBuilder.length() < 256) { + strBuilder.insert(0, "0"); + } + str = strBuilder.toString(); + return str; + } + + private static String rsaEncrypt(String text) { + text = new StringBuffer(text).reverse().toString(); + + BigInteger biText = new BigInteger(strToHex(text), 16); + BigInteger biEx = new BigInteger("010001", 16); + BigInteger biMod = new BigInteger("00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7", 16); + BigInteger biRet = biText.modPow(biEx, biMod); + + return zFill(biRet.toString(16)); + } + + private static String strToHex(String s) { + StringBuilder str = new StringBuilder(); + for (int i = 0; i < s.length(); i++) { + int ch = s.charAt(i); + String s4 = Integer.toHexString(ch); + str.append(s4); + } + return str.toString(); + } + + public static EncResObj weapiEncrypt(String content) { + String key = createSecretKey(16); + String encText = aesEncrypt(aesEncrypt(content, presetKey, iv), key, iv); + String encSecKey = rsaEncrypt(key); + return new EncResObj(encText, encSecKey); + } + + public static EncResObj eapi(String url, JsonObject object) { + String text = AllMusic.gson.toJson(object); + String message = "nobody" + url + "use" + text + "md5forencrypt"; + String digest = getMd5(message); + String data = url + "-36cd479b6b5-" + text + "-36cd479b6b5-" + digest; + return new EncResObj(aesEncrypt(data, eapiKey), ""); + } + + public static String getMd5(String plainText) { + byte[] secretBytes; + try { + MessageDigest digest = MessageDigest.getInstance("md5"); + digest.update(plainText.getBytes(StandardCharsets.UTF_8)); + secretBytes = digest.digest(); + } catch (NoSuchAlgorithmException e) { + throw new RuntimeException("没有这个md5算法!"); + } + return byteArrToHex(secretBytes); + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/HttpClientUtil.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/HttpClientUtil.java new file mode 100644 index 00000000..d2eda7dd --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/HttpClientUtil.java @@ -0,0 +1,171 @@ +package coloryr.allmusic.core.music.api; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.enums.EncryptType; +import coloryr.allmusic.core.objs.HttpResObj; +import coloryr.allmusic.core.objs.api.EncResObj; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import okhttp3.*; + +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +public class HttpClientUtil { + + private static final int CONNECT_TIMEOUT = 5; + private static final int READ_TIMEOUT = 7; + private static OkHttpClient client; + + public static void init() { + try { + synchronized (OkHttpClient.class) { + client = new OkHttpClient.Builder().cookieJar(new MyCookieJar()) + .connectTimeout(CONNECT_TIMEOUT, TimeUnit.SECONDS) + .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS) + .build(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static HttpResObj get(String path, String data) { + try { + data = URLEncoder.encode(data, "UTF-8"); + Request request = new Request.Builder().url(path + data) + .addHeader("referer", "https://music.163.com") + .addHeader("content-type", "application/json;charset=UTF-8") + .addHeader("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.41") + .get() + .build(); + Response response = client.newCall(request).execute(); + int httpCode = response.code(); + ResponseBody body = response.body(); + if (body == null) { + AllMusic.log.warning("§d[AllMusic]§c获取网页错误"); + return null; + } + InputStream inputStream = body.byteStream(); + boolean ok = httpCode == 200; + ByteArrayOutputStream result = new ByteArrayOutputStream(); + byte[] buffer = new byte[4096]; + int length; + while ((length = inputStream.read(buffer)) != -1) { + result.write(buffer, 0, length); + } + String data1 = result.toString(StandardCharsets.UTF_8.name()); + if (!ok) { + AllMusic.log.warning("§d[AllMusic]§c服务器返回错误:" + data1); + } + return new HttpResObj(data1, ok); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c获取网页错误"); + e.printStackTrace(); + } + return null; + } + + public static HttpResObj post(String url, JsonObject data, EncryptType type, String ourl) { + try { + RequestBody formBody; + Request.Builder request = new Request.Builder(); + request = request.addHeader("Content-Type", "application/x-www-form-urlencoded"); + request = request.addHeader("Referer", "https://music.163.com"); + EncResObj res; + List cookies = new ArrayList<>(); + if (AllMusic.cookie.cookieStore.containsKey("music.163.com")) { + cookies = AllMusic.cookie.cookieStore.get("music.163.com"); + } + if (type == EncryptType.WEAPI) { + request = request.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/13.10586"); + String csrfToken = ""; + for (Cookie item : cookies) { + if (item.name().equalsIgnoreCase("__csrf")) { + csrfToken = item.value(); + } + } + data.addProperty("csrf_token", csrfToken); + res = CryptoUtil.weapiEncrypt(AllMusic.gson.toJson(data)); + url = url.replaceFirst("\\w*api", "weapi"); + request = request.url(url); + formBody = new FormBody.Builder() + .add("params", res.params) + .add("encSecKey", res.encSecKey) + .build(); + } else if (type == EncryptType.EAPI) { + request = request.addHeader("User-Agent", "Mozilla/5.0 (Linux; Android 9; PCT-AL10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 HuaweiBrowser/10.0.3.311 Mobile Safari/537.36"); + JsonObject header = new JsonObject(); + header.addProperty("appver", "8.0.0"); + header.addProperty("versioncode", "140"); + header.addProperty("buildver", new Date().toString().substring(0, 10)); + header.addProperty("resolution", "1920x1080"); + header.addProperty("os", "android"); + String requestId = "0000" + (new Date() + "_" + Math.floor(Math.random() * 1000)); + header.addProperty("requestId", requestId); + for (Cookie item : cookies) { + if (item.name().equalsIgnoreCase("MUSIC_U")) { + header.addProperty("MUSIC_U", item.value()); + } else if (item.name().equalsIgnoreCase("MUSIC_A")) { + header.addProperty("MUSIC_A", item.value()); + } else if (item.name().equalsIgnoreCase("channel")) { + header.addProperty("channel", item.value()); + } else if (item.name().equalsIgnoreCase("mobilename")) { + header.addProperty("mobilename", item.value()); + } else if (item.name().equalsIgnoreCase("osver")) { + header.addProperty("osver", item.value()); + } else if (item.name().equalsIgnoreCase("__csrf")) { + header.addProperty("__csrf", item.value()); + } + } + + data.add("header", header); + res = CryptoUtil.eapi(ourl, data); + url = url.replaceFirst("\\w*api", "eapi"); + request = request.url(url); + formBody = new FormBody.Builder() + .add("params", res.params) + .build(); + } else { + request = request.url(url); + FormBody.Builder builder = new FormBody.Builder(); + for (Map.Entry item : data.entrySet()) { + builder = builder.add(item.getKey(), item.getValue().getAsString()); + } + formBody = builder.build(); + } + request = request.post(formBody); + Response response = client.newCall(request.build()).execute(); + int httpCode = response.code(); + ResponseBody body = response.body(); + if (body == null) { + AllMusic.log.warning("§d[AllMusic]§c获取网页错误"); + return null; + } + InputStream inputStream = body.byteStream(); + boolean ok = httpCode == 200; + ByteArrayOutputStream result = new ByteArrayOutputStream(); + byte[] buffer = new byte[4096]; + int length; + while ((length = inputStream.read(buffer)) != -1) { + result.write(buffer, 0, length); + } + String data1 = result.toString(StandardCharsets.UTF_8.name()); + if (!ok) { + AllMusic.log.warning("§d[AllMusic]§c服务器返回错误:" + data1); + } + return new HttpResObj(data1, ok); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c获取网页错误"); + e.printStackTrace(); + } + return null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/MyCookieJar.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/MyCookieJar.java new file mode 100644 index 00000000..b9ebaa26 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/api/MyCookieJar.java @@ -0,0 +1,38 @@ +package coloryr.allmusic.core.music.api; + +import coloryr.allmusic.core.AllMusic; +import okhttp3.Cookie; +import okhttp3.CookieJar; +import okhttp3.HttpUrl; +import org.jetbrains.annotations.NotNull; + +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + +public class MyCookieJar implements CookieJar { + @Override + public void saveFromResponse(HttpUrl httpUrl, @NotNull List list) { + if (AllMusic.cookie.cookieStore.containsKey(httpUrl.host())) { + List cookies = AllMusic.cookie.cookieStore.get(httpUrl.host()); + for (Cookie item : list) { + for (Cookie item1 : cookies) { + if (item.name().equalsIgnoreCase(item1.name())) { + cookies.remove(item1); + break; + } + } + cookies.add(item); + } + AllMusic.cookie.cookieStore.put(httpUrl.host(), cookies); + } else { + AllMusic.cookie.cookieStore.put(httpUrl.host(), list); + } + AllMusic.saveCookie(); + } + + @Override + public @NotNull List loadForRequest(HttpUrl httpUrl) { + List cookies = AllMusic.cookie.cookieStore.get(httpUrl.host()); + return cookies != null ? cookies : new CopyOnWriteArrayList<>(); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricDo.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricDo.java new file mode 100644 index 00000000..67b293bc --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricDo.java @@ -0,0 +1,171 @@ +package coloryr.allmusic.core.music.play; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.objs.api.music.lyric.WLyricObj; +import coloryr.allmusic.core.objs.music.LyricItemObj; +import coloryr.allmusic.core.utils.Function; + +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class LyricDo { + private static final Pattern p = Pattern.compile("\\(([0-9]+),[0-9]+.[0-9]\\)"); + private final Map temp = new LinkedHashMap<>(); + public boolean isHave = false; + public boolean isHaveK = false; + public Map kly = new LinkedHashMap<>(); + + public Map getTemp() { + return temp; + } + + public Map getKLyric() { + return kly; + } + + /** + * 检查歌词 + * + * @param obj 歌词 + * @return 结果 + */ + public boolean check(WLyricObj obj) { + String[] lyric; + + boolean haveT = false; + if (!obj.isOk()) + return true; + else if (obj.isNone()) + return false; + lyric = obj.getLyric().split("\n"); + + Map temp = getTime(Arrays.asList(lyric)); + Map temp1 = new HashMap<>(); + + if (obj.getTlyric() != null) { + List tlyric = Arrays.asList(obj.getTlyric().split("\n")); + haveT = true; + temp1 = getTime(tlyric); + } + + String temp2 = obj.getYrc() == null ? obj.getKlyric() : obj.getYrc(); + + if (temp2 != null && !temp2.isEmpty()) { + String[] klyric = temp2.split("\n"); + for (String item : klyric) { + Map temp4 = getKTime(item, obj.getVersion()); + if (temp4 != null) { + kly.putAll(temp4); + } + } + isHaveK = true; + } + + for (Map.Entry item : temp.entrySet()) { + this.temp.put(item.getKey(), new LyricItemObj(item.getValue(), + haveT ? temp1.get(item.getKey()) : null)); + } + + + isHave = true; + return false; + } + + /** + * 将歌词转换成时间 字 + * + * @param lyric 歌词 + * @return 结果 + */ + private Map getTime(List lyric) { + Map res = new LinkedHashMap<>(); + String min; + String sec; + String mil; + int time; + int milt; + for (String s : lyric) { + if (!s.startsWith("[")) + continue; + String temp = Function.getString(s, "[", "]"); + if (!temp.contains(".") || !temp.contains(":")) + continue; + if (Function.countChar(temp, ':') > 1) { + String[] a = s.split(":"); + min = a[0].substring(1); + sec = a[1]; + mil = a[2]; + } else { + min = Function.getString(s, "[", ":"); + sec = Function.getString(s, ":", "."); + mil = Function.getString(s, ".", "]"); + } + if (!Function.isInteger(min)) + continue; + if (!Function.isInteger(sec)) + continue; + if (!Function.isInteger(mil)) + continue; + if (min.isEmpty() || sec.isEmpty() || mil.isEmpty()) + continue; + milt = Integer.parseInt(mil); + if (mil.length() == 3) { + milt /= 10; + } + time = Integer.parseInt(min) * 60 * 1000 + Integer.parseInt(sec) * 1000 + milt * 10; + if (time > 0 && time + AllMusic.getConfig().Delay > 0) + time += AllMusic.getConfig().Delay / 10 * 10; + res.put(time, Function.getString(s, "]", null)); + } + return res; + } + + private Map getKTime(String lyric, boolean yrc) { + Map res = new LinkedHashMap<>(); + if (!lyric.startsWith("[") || !lyric.contains("](")) + return null; + + String[] datas = lyric.split("\\(([0-9]+),[0-9]+.[0-9]\\)"); + Matcher m = p.matcher(lyric); + List temp1111 = new ArrayList<>(); + while (m.find()) { + temp1111.add(m.group() + .replace("(", "") + .replace(")", "")); + } + if (datas.length == 1) + return null; + + String temp = Function.getString(lyric, "[", "]"); + String[] temp11 = temp.split(","); + int now = Integer.parseInt(temp11[0]) / 10 * 10; + for (int a = 1; a < datas.length; a++) { + String data = datas[a]; + String temp3 = temp1111.get(a - 1); + String[] temp8 = temp3.split(","); + int temp5; + if (yrc) { + temp5 = (Integer.parseInt(temp8[0]) / 10 * 10); + if (temp5 > 0 && temp5 + AllMusic.getConfig().KDelay > 0) + temp5 += (AllMusic.getConfig().KDelay / 10 * 10); + res.put(temp5, data); + } else { + try { + temp5 = (Integer.parseInt(temp8[1]) / 10 * 10); + } catch (Exception e) { + AllMusic.log.warning("不支持的Ktv歌词"); + AllMusic.log.warning("请带上音乐ID联系开发者"); + return null; + } + + if (temp5 > 0 && temp5 + AllMusic.getConfig().KDelay > 0) + temp5 += (AllMusic.getConfig().KDelay / 10 * 10); + res.put(now, data); + now += temp5; + } + } + + return res; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricSave.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricSave.java new file mode 100644 index 00000000..f53dc76b --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/LyricSave.java @@ -0,0 +1,110 @@ +package coloryr.allmusic.core.music.play; + +import coloryr.allmusic.core.objs.music.LyricItemObj; + +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; + +public class LyricSave { + public int lastIndex = 0; + protected boolean haveLyric; + protected String lly; + protected String kly; + protected String tly; + private Map lyric; + private Map klyric; + private LyricItemObj now; + private int last; + private String kNow; + + public LyricSave() { + haveLyric = false; + lyric = new HashMap<>(); + } + + public void setKlyric(Map klyric) { + this.klyric = klyric; + } + + public boolean isHaveLyric() { + return haveLyric; + } + + public void setHaveLyric(boolean haveLyric) { + this.haveLyric = haveLyric; + } + + public String getLyric() { + return lly; + } + + public void setLyric(Map lyric) { + this.lyric = lyric; + } + + public String getTlyric() { + return tly; + } + + public String getKly() { + return kly; + } + + public boolean kUpdate() { + if (lastIndex >= now.lyric.length()) { + kly = now.lyric; + lly = ""; + } else if (kNow != null) { + int index = now.lyric.toLowerCase(Locale.ROOT).indexOf(kNow, lastIndex); + if (index != -1) { + lastIndex = index + kNow.length(); + + kly = now.lyric.substring(0, lastIndex); + lly = now.lyric.substring(lastIndex); + return true; + } + } else { + kly = ""; + } + + return false; + } + + public boolean ktv(int time) { + if (last == time || klyric == null) + return false; + + String temp = klyric.get(time); + if (temp != null) { + kNow = temp.toLowerCase(Locale.ROOT); + last = time; + return kUpdate(); + } + + return false; + } + + public boolean checkTime(int playNow, boolean ktv) { + if (lyric == null) + return false; + + boolean res = false; + LyricItemObj temp = lyric.get(playNow); + if (temp != null) { + now = temp; + lly = now.lyric; + tly = now.tlyric; + kly = null; + lastIndex = 0; + kUpdate(); + return true; + } + + if (ktv && now != null) { + res = ktv(playNow); + } + + return res; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/MusicSearch.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/MusicSearch.java new file mode 100644 index 00000000..9b4e206b --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/MusicSearch.java @@ -0,0 +1,51 @@ +package coloryr.allmusic.core.music.play; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.command.CommandEX; +import coloryr.allmusic.core.objs.music.MusicObj; +import coloryr.allmusic.core.objs.music.SearchPageObj; + +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; + +public class MusicSearch { + private static final Queue tasks = new ConcurrentLinkedQueue<>(); + private static boolean isRun; + + private static void task() { + while (isRun) { + try { + MusicObj obj = tasks.poll(); + if (obj != null) { + SearchPageObj search = AllMusic.getMusicApi().search(obj.args, obj.isDefault); + if (search == null) + AllMusic.side.sendMessaget(obj.sender, AllMusic.getMessage().Search + .CantSearch.replace("%Music%", obj.isDefault ? obj.args[0] : obj.args[1])); + else { + AllMusic.side.sendMessaget(obj.sender, AllMusic.getMessage().Search.Res); + AllMusic.addSearch(obj.name, search); + AllMusic.side.runTask(() -> CommandEX.showSearch(obj.sender, search)); + } + } + Thread.sleep(100); + } catch (Exception e) { + AllMusic.log.warning("搜歌出现问题"); + e.printStackTrace(); + } + } + } + + public static void start() { + Thread taskT = new Thread(MusicSearch::task, "AllMusic_search"); + isRun = true; + taskT.start(); + } + + public static void stop() { + isRun = false; + } + + public static void addSearch(MusicObj obj) { + tasks.add(obj); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayGo.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayGo.java new file mode 100644 index 00000000..0ceadd3a --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayGo.java @@ -0,0 +1,230 @@ +package coloryr.allmusic.core.music.play; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.hud.HudUtils; +import coloryr.allmusic.core.objs.music.MusicObj; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +public class PlayGo { + /** + * 播放链接 + */ + public static String url; + /** + * 倒数计数器 + */ + private static int count = 0; + private static boolean isRun; + /** + * 歌曲更新计数器 + */ + private static int times = 0; + private static ScheduledExecutorService service; + private static ScheduledExecutorService service1; + private static ScheduledExecutorService service2; + + /** + * 启动歌曲工作 + */ + public static void start() { + Thread taskT = new Thread(PlayGo::task, "AllMusic_Play"); + isRun = true; + taskT.start(); + + service2 = Executors.newSingleThreadScheduledExecutor(); + service2.scheduleAtFixedRate(PlayGo::time3, 0, 10, TimeUnit.SECONDS); + } + + /** + * 停止歌曲工作 + */ + public static void stop() { + closeTimer(); + isRun = false; + PlayMusic.musicLessTime = 0; + } + + private static void closeTimer() { + if (service != null) { + service.shutdown(); + service = null; + } + if (service1 != null) { + service1.shutdown(); + service1 = null; + } + if (service2 != null) { + service2.shutdown(); + service2 = null; + } + } + + private static void startTimer() { + service = Executors.newSingleThreadScheduledExecutor(); + service.scheduleAtFixedRate(PlayGo::time1, 0, 10, TimeUnit.MILLISECONDS); + if (PlayMusic.lyric != null && PlayMusic.lyric.isHaveLyric()) { + service1 = Executors.newSingleThreadScheduledExecutor(); + service1.scheduleAtFixedRate(PlayGo::time2, 0, 2, TimeUnit.MILLISECONDS); + } + } + + /** + * 清空歌曲数据 + */ + private static void clear() { + closeTimer(); + PlayMusic.musicNowTime = 0; + PlayMusic.musicAllTime = 0; + PlayMusic.musicLessTime = 0; + PlayMusic.lyric = null; + PlayMusic.nowPlayMusic = null; + AllMusic.side.updateInfo(); + HudUtils.clearHud(); + } + + private static void time1() { + PlayMusic.musicNowTime += 10; + count++; + if (count == 100) { + PlayMusic.musicLessTime--; + count = 0; + } + } + + private static void time2() { + try { + if (PlayMusic.lyric == null) + return; + boolean res = PlayMusic.lyric + .checkTime(PlayMusic.musicNowTime, AllMusic.getConfig().KtvMode); + if (res) { + times = 0; + HudUtils.sendHudLyricData(); + AllMusic.side.updateLyric(); + } else { + times++; + if (times == 500 && PlayMusic.lyric != null) { + times = 0; + HudUtils.sendHudLyricData(); + AllMusic.side.updateLyric(); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + private static void time3() { + AllMusic.side.ping(); + } + + private static void task() { + while (isRun) { + try { + if (PlayMusic.getSize() == 0) { + HudUtils.sendHudNowData(); + HudUtils.sendHudLyricData(); + HudUtils.sendHudListData(); + if (AllMusic.side.needPlay()) { + String ID = AllMusic.getMusicApi().getListMusic(); + if (ID != null) { + MusicObj obj = new MusicObj(); + obj.sender = ID; + obj.name = "空闲列表"; + obj.isDefault = true; + PlayMusic.addMusic(null, ID, "空闲列表", true); + } + } + Thread.sleep(50); + } else { + AllMusic.side.sendHudUtilsAll(); + PlayMusic.nowPlayMusic = PlayMusic.remove(0); + if (AllMusic.side.onMusicPlay(PlayMusic.nowPlayMusic)) { + AllMusic.side.bqt(AllMusic.getMessage().MusicPlay.Cancel); + continue; + } + + url = PlayMusic.nowPlayMusic.getPlayerUrl() == null ? + AllMusic.getMusicApi().getPlayUrl(PlayMusic.nowPlayMusic.getID()) : + PlayMusic.nowPlayMusic.getPlayerUrl(); + if (url == null) { + String data = AllMusic.getMessage().MusicPlay.NoCanPlay; + AllMusic.side.bqt(data.replace("%MusicID%", PlayMusic.nowPlayMusic.getID())); + PlayMusic.nowPlayMusic = null; + continue; + } + + if (PlayMusic.nowPlayMusic.getPlayerUrl() == null) + PlayMusic.lyric = AllMusic.getMusicApi().getLyric(PlayMusic.nowPlayMusic.getID()); + else + PlayMusic.lyric = new LyricSave(); + + if (PlayMusic.nowPlayMusic.getLength() != 0) { + PlayMusic.musicAllTime = PlayMusic.musicLessTime = (PlayMusic.nowPlayMusic.getLength() / 1000) + 3; + if (!AllMusic.getConfig().MutePlayMessage) { + String info = AllMusic.getMessage().MusicPlay.Play; + info = info.replace("%MusicName%", PlayMusic.nowPlayMusic.getName()) + .replace("%MusicAuthor%", PlayMusic.nowPlayMusic.getAuthor()) + .replace("%MusicAl%", PlayMusic.nowPlayMusic.getAl()) + .replace("%MusicAlia%", PlayMusic.nowPlayMusic.getAlia()) + .replace("%PlayerName%", PlayMusic.nowPlayMusic.getCall()); + if (AllMusic.getConfig().ShowInBar) + AllMusic.side.sendBar(info); + else + AllMusic.side.bqt(info); + } + startTimer(); + AllMusic.side.sendMusic(url); + if (!PlayMusic.nowPlayMusic.isUrl() && PlayMusic.nowPlayMusic.getPicUrl() != null) { + AllMusic.side.sendPic(PlayMusic.nowPlayMusic.getPicUrl()); + } + if (PlayMusic.nowPlayMusic.isTrial()) { + AllMusic.side.bqt(AllMusic.getMessage().MusicPlay.Trail); + PlayMusic.musicLessTime = PlayMusic.nowPlayMusic.getTrialInfo().getEnd(); + PlayMusic.musicNowTime = PlayMusic.nowPlayMusic.getTrialInfo().getStart(); + } + + AllMusic.side.updateInfo(); + + while (PlayMusic.musicLessTime > 0) { + HudUtils.sendHudNowData(); + HudUtils.sendHudListData(); + if (!AllMusic.side.needPlay()) { + PlayMusic.musicLessTime = 1; + } + if (PlayMusic.voteTime > 0) { + PlayMusic.voteTime--; + if (PlayMusic.voteTime == 0) { + AllMusic.clearVote(); + AllMusic.side.bqt(AllMusic.getMessage().Vote.TimeOut); + } else { + int players = AllMusic.side.getAllPlayer(); + if (AllMusic.getVoteCount() >= AllMusic.getConfig().MinVote + || (players <= AllMusic.getConfig().MinVote + && players <= AllMusic.getVoteCount())) { + AllMusic.side.bqt(AllMusic.getMessage().Vote.Do); + AllMusic.clearVote(); + PlayMusic.voteTime = 0; + break; + } + } + } + Thread.sleep(1000); + } + AllMusic.side.sendStop(); + } else { + String data = AllMusic.getMessage().MusicPlay.NoCanPlay; + AllMusic.side.bqt(data.replace("%MusicID%", PlayMusic.nowPlayMusic.getID())); + } + clear(); + } + } catch (InterruptedException e) { + AllMusic.log.warning("§c歌曲播放出现错误"); + e.printStackTrace(); + } + } + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayMusic.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayMusic.java new file mode 100644 index 00000000..aec4624f --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/PlayMusic.java @@ -0,0 +1,263 @@ +package coloryr.allmusic.core.music.play; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.decoder.Bitstream; +import coloryr.allmusic.core.decoder.Header; +import coloryr.allmusic.core.objs.music.MusicObj; +import coloryr.allmusic.core.objs.music.SongInfoObj; +import coloryr.allmusic.core.utils.Logs; + +import java.io.BufferedInputStream; +import java.net.URL; +import java.net.URLConnection; +import java.util.ArrayList; +import java.util.List; +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.CopyOnWriteArrayList; + +public class PlayMusic { + + /** + * 播放列表 + */ + private static final List playList = new CopyOnWriteArrayList<>(); + private static final Queue tasks = new ConcurrentLinkedQueue<>(); + /** + * 投票时间 + */ + public static int voteTime = 0; + /** + * 总歌曲长度 + */ + public static int musicAllTime = 0; + /** + * 剩余歌曲长度 + */ + public static int musicLessTime = 0; + /** + * 歌曲现在位置 + */ + public static int musicNowTime = 0; + /** + * 当前歌曲信息 + */ + public static SongInfoObj nowPlayMusic; + /** + * 当前歌词信息 + */ + public static LyricSave lyric; + /** + * 错误次数 + */ + public static int error; + private static boolean isRun; + + /** + * 停止歌曲逻辑 + */ + public static void stop() { + PlayMusic.clear(); + isRun = false; + } + + /** + * 开始歌曲逻辑 + */ + public static void start() { + Thread addT = new Thread(PlayMusic::task, "AllMusic_list"); + isRun = true; + addT.start(); + } + + /** + * 添加点歌任务 + * + * @param obj 歌曲 + */ + public static void addTask(MusicObj obj) { + tasks.add(obj); + } + + private static void task() { + while (isRun) { + try { + MusicObj obj = tasks.poll(); + if (obj != null) { + if (obj.isUrl) { + addUrl(obj.url); + } else { + addMusic(obj.sender, obj.id, obj.name, obj.isDefault); + } + } + Thread.sleep(10); + } catch (Exception e) { + AllMusic.log.warning("歌曲处理出现问题"); + e.printStackTrace(); + } + } + } + + /** + * 添加歌曲 + * + * @param sender 发送者 + * @param id 歌曲ID + * @param player 用户名 + * @param isList 是否是空闲歌单 + */ + public static void addMusic(Object sender, String id, String player, boolean isList) { + if (isHave(id)) + return; + if (sender != null) { + String text = AllMusic.getMessage().MusicPlay.CheckMusic; + text = text.replace("%MusicID%", id); + AllMusic.side.sendMessaget(sender, text); + } + Logs.logWrite("玩家:" + player + " 点歌:" + id); + try { + SongInfoObj info = AllMusic.getMusicApi().getMusic(id, player, isList); + if (info == null) { + if (sender != null) { + String data = AllMusic.getMessage().MusicPlay.NoCanPlay; + AllMusic.side.sendMessaget(sender, data.replace("%MusicID%", id)); + } + return; + } + if (info.getLength() / 1000 > AllMusic.getConfig().MaxMusicTime) { + AllMusic.side.sendMessaget(sender, AllMusic.getMessage().AddMusic.TimeOut); + return; + } + playList.add(info); + if (!AllMusic.getConfig().MuteAddMessage) { + String data = AllMusic.getMessage().MusicPlay.AddMusic; + data = data.replace("%MusicName%", info.getName()) + .replace("%MusicAuthor%", info.getAuthor()) + .replace("%MusicAl%", info.getAl()) + .replace("%MusicAlia%", info.getAlia()); + if (AllMusic.getConfig().ShowInBar) { + AllMusic.side.sendBar(data); + } else { + AllMusic.side.bqt(data); + } + } + if (AllMusic.getConfig().PlayListSwitch + && (PlayMusic.nowPlayMusic != null && PlayMusic.nowPlayMusic.isList())) { + PlayMusic.musicLessTime = 1; + if (!isList) + AllMusic.side.bqt(AllMusic.getMessage().MusicPlay.Switch); + } + error = 0; + } catch (Exception e) { + if (isList) { + error++; + } + AllMusic.log.warning("§d[AllMusic]§c歌曲信息解析错误"); + e.printStackTrace(); + } + } + + /** + * 获取播放列表长度 + * + * @return 长度 + */ + public static int getSize() { + return playList.size(); + } + + /** + * 获取当前播放列表 + * + * @return 播放列表 + */ + public static List getList() { + return new ArrayList<>(playList); + } + + /** + * 清理播放列表 + */ + public static void clear() { + playList.clear(); + } + + /** + * 从播放列表删除 + * + * @param index 标号 + * @return 结果 + */ + public static SongInfoObj remove(int index) { + return playList.remove(index); + } + + /** + * 获取播放列表所有信息 + * + * @return 信息 + */ + public static String getAllList() { + StringBuilder list = new StringBuilder(); + String a; + SongInfoObj info; + for (int i = 0; i < playList.size(); i++) { + info = playList.get(i); + a = AllMusic.getMessage().MusicPlay.ListMusic.Item; + a = a.replace("%index%", "" + (i + 1)) + .replace("%MusicName%", info.getName()) + .replace("%MusicAuthor%", info.getAuthor()) + .replace("%MusicAl%", info.getAl()) + .replace("%MusicAlia%", info.getAlia()); + list.append(a).append("\n"); + } + String temp = list.toString(); + if (temp.isEmpty()) + return ""; + return temp.substring(0, temp.length() - 1); + } + + /** + * 是否在播放列表中 + * + * @param id 音乐ID + * @return 结果 + */ + public static boolean isHave(String id) { + if (nowPlayMusic != null && nowPlayMusic.getID().equalsIgnoreCase(id)) + return true; + for (SongInfoObj item : playList) { + if (item.getID().equalsIgnoreCase(id)) + return true; + } + return false; + } + + /** + * 添加Url歌曲 + * + * @param url 链接 + */ + private static void addUrl(String url) { + try { + URL urlfile = new URL(url); + URLConnection con = urlfile.openConnection(); + int b = con.getContentLength();// 得到音乐文件的总长度 + BufferedInputStream bis = new BufferedInputStream(con.getInputStream()); + Bitstream bt = new Bitstream(bis); + Header h = bt.readFrame(); + int le = 6000000; + if (h == null) { + AllMusic.side.bqt("§d[AllMusic]§c未知音乐类型"); + } else { + le = (int) h.total_ms(b); + } + SongInfoObj info = new SongInfoObj(AllMusic.getMessage().Custom.Info, url, le); + playList.add(info); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c歌曲信息解析错误"); + e.printStackTrace(); + } + } +} + diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/TopLyricSave.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/TopLyricSave.java new file mode 100644 index 00000000..553a86f3 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/music/play/TopLyricSave.java @@ -0,0 +1,28 @@ +package coloryr.allmusic.core.music.play; + +public class TopLyricSave extends LyricSave { + + public void setTlyric(String data) { + tly = data; + } + + public void setLyric(String data) { + lly = data; + } + + public void setKly(String data) { + kly = data; + } + + public void setHaveK(boolean data) { + if (!data) { + kly = null; + } + } + + public void setHaveT(boolean data) { + if (!data) { + tly = null; + } + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/ConfigObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/ConfigObj.java new file mode 100644 index 00000000..7df3e2da --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/ConfigObj.java @@ -0,0 +1,248 @@ +package coloryr.allmusic.core.objs; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.objs.config.EconomyObj; +import coloryr.allmusic.core.objs.config.FunConfigObj; +import coloryr.allmusic.core.objs.hud.SaveObj; + +import java.util.ArrayList; +import java.util.List; + +/** + * 配置文件对象 + */ +public class ConfigObj { + /** + * 最大歌曲数 + */ + public int MaxList; + /** + * 最小通过投票数 + */ + public int MinVote; + /** + * 歌曲延迟 + */ + public int Delay; + /** + * 搜歌花费 + */ + public int SearchCost; + /** + * 点歌花费 + */ + public int AddMusicCost; + /** + * 默认添加歌曲方式 + */ + public int DefaultAddMusic; + /** + * 消息限制长度 + */ + public int MessageLimitSize; + /** + * 最长音乐长度 + */ + public int MaxMusicTime; + /** + * KTV模式歌词加时 + */ + public int KDelay; + + /** + * 管理员ID列表 + */ + public List Admin; + /** + * 不参与点歌的服务器列表 + */ + public List NoMusicServer; + /** + * 不参与点歌的玩家列表 + */ + public List NoMusicPlayer; + /** + * 禁止点歌ID列表 + */ + public List BanMusic; + /** + * 空闲歌单列表 + */ + public List PlayList; + + /** + * 玩家点歌后是否直接从空闲歌单切换至玩家歌曲 + */ + public boolean PlayListSwitch; + /** + * 空闲歌单随机播放 + */ + public boolean PlayListRandom; + /** + * 显示歌词 + */ + public boolean SendLyric; + /** + * 指令需要权限 + */ + public boolean NeedPermission; + /** + * 开启花钱点歌 + */ + public boolean UseCost; + /** + * 顶层模式,用于和BC交换数据 + */ + public boolean TopPAPI; + /** + * 开启信息长度限制 + */ + public boolean MessageLimit; + /** + * 不发送播放信息 + */ + public boolean MutePlayMessage; + /** + * 不发送点歌信息 + */ + public boolean MuteAddMessage; + /** + * 将信息限制在bar处 + */ + public boolean ShowInBar; + /** + * K歌歌词 + */ + public boolean KtvMode; + + /** + * 登录的用户 + */ + public String LoginUser; + /** + * 歌曲音质 + */ + public String MusicBR; + /** + * 配置文件版本号 + */ + public String Version; + + /** + * 默认的Hud配置 + */ + public SaveObj DefaultHud; + /** + * 经济插件挂钩 + */ + public EconomyObj Economy; + /** + * 娱乐选项 + */ + public FunConfigObj FunConfig; + + public static ConfigObj makeDefault(){ + return new ConfigObj(){{ + MaxList = 10; + MinVote = 3; + Delay = 0; + Admin = new ArrayList() {{ + this.add("CONSOLE"); + }}; + NoMusicServer = new ArrayList<>(); + NoMusicPlayer = new ArrayList<>(); + BanMusic = new ArrayList<>(); + PlayList = new ArrayList<>(); + PlayListSwitch = true; + PlayListRandom = true; + SendLyric = true; + NeedPermission = false; + DefaultHud = new SaveObj(); + + UseCost = false; + SearchCost = 20; + MutePlayMessage = false; + MuteAddMessage = false; + ShowInBar = false; + AddMusicCost = 10; + + DefaultAddMusic = 0; + LoginUser = ""; + + MusicBR = "320000"; + + MaxMusicTime = 600; + + TopPAPI = false; + MessageLimit = false; + MessageLimitSize = 40; + + Economy = new EconomyObj(); + FunConfig = new FunConfigObj(); + + KtvMode = true; + KDelay = 0; + + Version = AllMusic.version; + }}; + } + + public void addBanID(String ID) { + if (!BanMusic.contains(ID)) + BanMusic.add(ID); + AllMusic.save(); + } + + public void AddNoMusicPlayer(String ID) { + if (!NoMusicPlayer.contains(ID)) + NoMusicPlayer.add(ID); + AllMusic.save(); + } + + public void RemoveNoMusicPlayer(String ID) { + NoMusicPlayer.remove(ID); + AllMusic.save(); + } + + public boolean check() { + boolean saveConfig = false; + if (PlayList == null) { + saveConfig = true; + PlayList = new ArrayList<>(); + } + if (Admin == null) { + saveConfig = true; + Admin = new ArrayList<>(); + } + if (BanMusic == null) { + saveConfig = true; + BanMusic = new ArrayList<>(); + } + if (DefaultHud == null) { + saveConfig = true; + DefaultHud = new SaveObj(); + } + if (NoMusicPlayer == null) { + saveConfig = true; + NoMusicPlayer = new ArrayList<>(); + } + if (NoMusicServer == null) { + saveConfig = true; + NoMusicServer = new ArrayList<>(); + } + if (Economy == null) { + saveConfig = true; + Economy = new EconomyObj(); + } else if (Economy.check()) { + saveConfig = true; + Economy = new EconomyObj(); + } + + if (FunConfig == null) { + saveConfig = true; + FunConfig = new FunConfigObj(); + } + + return saveConfig; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/CookieObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/CookieObj.java new file mode 100644 index 00000000..28d69bbd --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/CookieObj.java @@ -0,0 +1,10 @@ +package coloryr.allmusic.core.objs; + +import okhttp3.Cookie; + +import java.util.HashMap; +import java.util.List; + +public class CookieObj { + public HashMap> cookieStore = new HashMap<>(); +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/HttpResObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/HttpResObj.java new file mode 100644 index 00000000..103a44f7 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/HttpResObj.java @@ -0,0 +1,11 @@ +package coloryr.allmusic.core.objs; + +public class HttpResObj { + public final String data; + public final boolean ok; + + public HttpResObj(String data, boolean ok) { + this.data = data; + this.ok = ok; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/MessageObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/MessageObj.java new file mode 100644 index 00000000..aebc1ca2 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/MessageObj.java @@ -0,0 +1,108 @@ +package coloryr.allmusic.core.objs; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.objs.message.SearchObj; +import coloryr.allmusic.core.objs.message.*; + +public class MessageObj { + public MusicPlayObj MusicPlay; + public AddMusicObj AddMusic; + public PageObj Page; + public LyricObj Lyric; + public VoteObj Vote; + public SearchObj Search; + public HudObj Hud; + public HudListObj HudList; + public CommandObj Command; + public CustomObj Custom; + public PAPIObj PAPI; + public CostObj Cost; + public ClickObj Click; + public HelpObj Help; + public FunObj Fun; + public String Version; + + public MessageObj() { + MusicPlay = new MusicPlayObj(); + AddMusic = new AddMusicObj(); + Page = new PageObj(); + Lyric = new LyricObj(); + Vote = new VoteObj(); + Search = new SearchObj(); + Hud = new HudObj(); + Command = new CommandObj(); + HudList = new HudListObj(); + Custom = new CustomObj(); + PAPI = new PAPIObj(); + Cost = new CostObj(); + Click = new ClickObj(); + Help = new HelpObj(); + Fun = new FunObj(); + Version = AllMusic.configVersion; + } + + public boolean check() { + boolean saveConfig = false; + if (MusicPlay == null || MusicPlay.check()) { + saveConfig = true; + MusicPlay = new MusicPlayObj(); + } + if (AddMusic == null || AddMusic.check()) { + saveConfig = true; + AddMusic = new AddMusicObj(); + } + if (Page == null || Page.check()) { + saveConfig = true; + Page = new PageObj(); + } + if (Lyric == null || Lyric.check()) { + saveConfig = true; + Lyric = new LyricObj(); + } + if (Vote == null || Vote.check()) { + saveConfig = true; + Vote = new VoteObj(); + } + if (Search == null || Search.check()) { + saveConfig = true; + Search = new SearchObj(); + } + if (Hud == null || Hud.check()) { + saveConfig = true; + Hud = new HudObj(); + } + if (HudList == null || HudList.check()) { + saveConfig = true; + HudList = new HudListObj(); + } + if (Command == null || Command.check()) { + saveConfig = true; + Command = new CommandObj(); + } + if (Custom == null || Custom.check()) { + saveConfig = true; + Custom = new CustomObj(); + } + if (PAPI == null || PAPI.check()) { + saveConfig = true; + PAPI = new PAPIObj(); + } + if (Cost == null || Cost.check()) { + saveConfig = true; + Cost = new CostObj(); + } + if (Click == null || Click.check()) { + saveConfig = true; + Click = new ClickObj(); + } + if (Help == null || Help.check()) { + saveConfig = true; + Help = new HelpObj(); + } + if (Fun == null || Fun.check()) { + saveConfig = true; + Fun = new FunObj(); + } + return saveConfig; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/SearchMusicObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/SearchMusicObj.java new file mode 100644 index 00000000..e0d70963 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/SearchMusicObj.java @@ -0,0 +1,15 @@ +package coloryr.allmusic.core.objs; + +public class SearchMusicObj { + public final String id; + public final String name; + public final String author; + public final String al; + + public SearchMusicObj(String ID, String Name, String Author, String Al) { + this.id = ID; + this.name = Name; + this.author = Author; + this.al = Al; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/EncResObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/EncResObj.java new file mode 100644 index 00000000..7409dad0 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/EncResObj.java @@ -0,0 +1,11 @@ +package coloryr.allmusic.core.objs.api; + +public class EncResObj { + public String params; + public String encSecKey; + + public EncResObj(String params, String encSecKey) { + this.encSecKey = encSecKey; + this.params = params; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/InfoObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/InfoObj.java new file mode 100644 index 00000000..67ad7a31 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/InfoObj.java @@ -0,0 +1,127 @@ +package coloryr.allmusic.core.objs.api.music.info; + +import java.util.List; + +public class InfoObj { + private List songs; + + public boolean isOk() { + return (songs != null && songs.size() != 0); + } + + public String getName() { + if (songs == null || songs.size() == 0) + return ""; + return songs.get(0).getName(); + } + + public String getAuthor() { + StringBuilder Author = new StringBuilder(); + if (songs.size() == 0) + return ""; + for (ar ar : songs.get(0).getAr()) { + Author.append(ar.getName()).append(","); + } + if (Author.length() != 0) { + Author = new StringBuilder(Author.substring(0, Author.length() - 1)); + } + return Author.toString(); + } + + public String getAlia() { + StringBuilder Alia = new StringBuilder(); + for (String alia : songs.get(0).getAlia()) { + Alia.append(alia).append(","); + } + if (Alia.length() != 0) { + Alia = new StringBuilder(Alia.substring(0, Alia.length() - 1)); + } + return Alia.toString(); + } + + public String getAl() { + return songs.get(0).getAl(); + } + + public int getLength() { + if (songs == null) + return 0; + return songs.get(0).getLength(); + } + + public String getPicUrl() { + if (songs == null) + return null; + return songs.get(0).getPicUrl(); + } +} + +class Songs { + private String name; + private List ar; + private List alia; + private al al; + private h l; + private h m; + private h h; + + public int getLength() { + if (l != null) + return l.getLength(); + if (m != null) + return m.getLength(); + if (h != null) + return h.getLength(); + return 0; + } + + public String getName() { + return name == null ? "" : name; + } + + public List getAr() { + return ar; + } + + public List getAlia() { + return alia; + } + + public String getAl() { + return al.getName() == null ? "" : al.getName(); + } + + public String getPicUrl() { + return al.getPicUrl(); + } +} + +class ar { + private String name; + + public String getName() { + return name == null ? "" : name; + } +} + +class al { + private String name; + private String picUrl; + + public String getName() { + return name == null ? "" : name; + } + + public String getPicUrl() { + return picUrl == null ? "" : picUrl; + } +} + +class h { + private int br; + private int size; + + public int getLength() { + return size / br * 8000; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/PlayObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/PlayObj.java new file mode 100644 index 00000000..3901e43f --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/info/PlayObj.java @@ -0,0 +1,30 @@ +package coloryr.allmusic.core.objs.api.music.info; + +import java.util.List; + +public class PlayObj { + private List data; + private int code; + + public String getData() { + if (data == null) + return null; + if (data.size() == 0) + return null; + obj obj = data.get(0); + return obj.getUrl(); + } + + public int getCode() { + return code; + } +} + +class obj { + private String url; + + public String getUrl() { + return url; + } +} + diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/list/DataObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/list/DataObj.java new file mode 100644 index 00000000..4620e9ca --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/list/DataObj.java @@ -0,0 +1,41 @@ +package coloryr.allmusic.core.objs.api.music.list; + +import java.util.ArrayList; +import java.util.List; + +public class DataObj { + private playlist playlist; + + public List getPlaylist() { + List list = new ArrayList<>(); + for (track item : playlist.getTracks()) { + list.add(item.getId()); + } + return list; + } + + public String getName() { + return playlist.getName(); + } +} + +class track { + private int id; + + public String getId() { + return String.valueOf(id); + } +} + +class playlist { + private List trackIds; + private String name; + + public List getTracks() { + return trackIds; + } + + public String getName() { + return name; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/lyric/WLyricObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/lyric/WLyricObj.java new file mode 100644 index 00000000..7822afd7 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/lyric/WLyricObj.java @@ -0,0 +1,86 @@ +package coloryr.allmusic.core.objs.api.music.lyric; + +public class WLyricObj { + private lrc lrc; + private tlyric tlyric; + private klyric klyric; + private yrc yrc; + private boolean nolyric; + private boolean uncollected; + + public boolean isOk() { + return lrc != null || isNone(); + } + + public String getLyric() { + return lrc.getLyric(); + } + + public String getTlyric() { + if (tlyric == null) + return null; + return tlyric.getLyric(); + } + + public String getKlyric() { + if (klyric == null) + return null; + return klyric.getLyric(); + } + + public String getYrc() { + if (yrc == null) + return null; + return yrc.getLyric(); + } + + public boolean getVersion() { + return yrc != null; + } + + public boolean isNone() { + return nolyric || uncollected; + } +} + +class lrc { + private String lyric; + + public String getLyric() { + return lyric == null ? "" : lyric; + } +} + +class tlyric { + private String lyric; + + public String getLyric() { + return lyric; + } +} + +class klyric { + private String lyric; + private int version; + + public int getVersion() { + return version; + } + + public String getLyric() { + return lyric == null ? "" : lyric; + } +} + +class yrc { + private int version; + private String lyric; + + public int getVersion() { + return version; + } + + public String getLyric() { + return lyric == null ? "" : lyric; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/SearchDataObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/SearchDataObj.java new file mode 100644 index 00000000..89f269e7 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/SearchDataObj.java @@ -0,0 +1,40 @@ +package coloryr.allmusic.core.objs.api.music.search; + +import java.util.List; + +public class SearchDataObj { + private result result; + + public boolean isOk() { + return result != null && result.getSongs() != null; + } + + public List getResult() { + return result.getSongs(); + } +} + +class result { + private List songs; + + public List getSongs() { + return songs; + } +} + + +class artists { + private String name; + + public String getName() { + return name; + } +} + +class album { + private String name; + + public String getName() { + return name; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/songs.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/songs.java new file mode 100644 index 00000000..8364dbd8 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/search/songs.java @@ -0,0 +1,30 @@ +package coloryr.allmusic.core.objs.api.music.search; + +import java.util.List; + +public class songs { + private int id; + private String name; + private List artists; + private album album; + + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public String getAlbum() { + return album.getName(); + } + + public String getArtists() { + StringBuilder a = new StringBuilder(); + for (artists temp : artists) { + a.append(temp.getName()).append(","); + } + return a.substring(0, a.length() - 1); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/TrialInfoObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/TrialInfoObj.java new file mode 100644 index 00000000..009f8bf2 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/TrialInfoObj.java @@ -0,0 +1,46 @@ +package coloryr.allmusic.core.objs.api.music.trialinfo; + +import java.util.List; + +public class TrialInfoObj { + private List data; + + public boolean isTrial() { + if (data.size() == 0) + return false; + song song = data.get(0); + return song.getCode() != 200; + } + + public freeTrialInfo getFreeTrialInfo() { + song song = data.get(0); + return song.getFreeTrialInfo() == null ? new freeTrialInfo() {{ + this.setEnd(30); + }} : song.getFreeTrialInfo(); + } + + public String getUrl() { + if (data.size() == 0) + return null; + song song = data.get(0); + return song.getUrl(); + } +} + +class song { + private freeTrialInfo freeTrialInfo; + private int code; + private String url; + + public String getUrl() { + return url; + } + + public int getCode() { + return code; + } + + public freeTrialInfo getFreeTrialInfo() { + return freeTrialInfo; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/freeTrialInfo.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/freeTrialInfo.java new file mode 100644 index 00000000..3753496b --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/music/trialinfo/freeTrialInfo.java @@ -0,0 +1,18 @@ +package coloryr.allmusic.core.objs.api.music.trialinfo; + +public class freeTrialInfo { + private int start; + private int end; + + public int getEnd() { + return end; + } + + public void setEnd(int end) { + this.end = end; + } + + public int getStart() { + return start; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/program/info/PrInfoObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/program/info/PrInfoObj.java new file mode 100644 index 00000000..e8692207 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/api/program/info/PrInfoObj.java @@ -0,0 +1,99 @@ +package coloryr.allmusic.core.objs.api.program.info; + +public class PrInfoObj { + + private program program; + + public boolean isOk() { + return (program != null && program.getMainSong().getName() != null); + } + + public String getId() { + + return String.valueOf(program.getMainSong().getId()); + } + + public String getName() { + + return program.getMainSong().getName(); + } + + public String getAlia() { + if (program.getDj() == null) + return null; + return program.getDj().getBrand(); + } + + public int getLength() { + return program.getMainSong().getLength(); + } + + public String getAuthor() { + return program.getDj().getNickname(); + } +} + +class mainSong { + + private String name; + private int id; + private hMusic hMusic; + private hMusic mMusic; + private hMusic lMusic; + private hMusic bMusic; + + public int getLength() { + if (hMusic != null) + return hMusic.getLength(); + else if (mMusic != null) + return mMusic.getLength(); + else if (lMusic != null) + return lMusic.getLength(); + else if (bMusic != null) + return bMusic.getLength(); + return 0; + } + + public int getId() { + return id; + } + + public String getName() { + return name; + } +} + +class program { + private dj dj; + private mainSong mainSong; + + public dj getDj() { + return dj; + } + + public mainSong getMainSong() { + return mainSong; + } +} + +class dj { + private String brand; + private String nickname; + + public String getNickname() { + return nickname; + } + + public String getBrand() { + return brand; + } +} + +class hMusic { + private int size; + private int bitrate; + + public int getLength() { + return size / bitrate * 8000; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/EconomyObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/EconomyObj.java new file mode 100644 index 00000000..c570345d --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/EconomyObj.java @@ -0,0 +1,18 @@ +package coloryr.allmusic.core.objs.config; + +public class EconomyObj { + public String MysqlUrl; + public boolean Vault; + + public EconomyObj() { + MysqlUrl = "jdbc:mysql://localhost:3306/minecraft?autoReconnect=true&autoReconnectForPools=true"; + Vault = true; + } + + public boolean check() { + boolean res = MysqlUrl == null; + + return res; + } + +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/FunConfigObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/FunConfigObj.java new file mode 100644 index 00000000..7a675e24 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/config/FunConfigObj.java @@ -0,0 +1,11 @@ +package coloryr.allmusic.core.objs.config; + +public class FunConfigObj { + public boolean Rain; + public int RainRate; + + public FunConfigObj(){ + Rain = true; + RainRate = 10; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/PosObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/PosObj.java new file mode 100644 index 00000000..bc1890af --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/PosObj.java @@ -0,0 +1,19 @@ +package coloryr.allmusic.core.objs.hud; + +public class PosObj { + public int x; + public int y; + + public PosObj() { + + } + + public PosObj(int x, int y) { + this.x = x; + this.y = y; + } + + public PosObj copy() { + return new PosObj(this.x, this.y); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/SaveObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/SaveObj.java new file mode 100644 index 00000000..d5345761 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/hud/SaveObj.java @@ -0,0 +1,45 @@ +package coloryr.allmusic.core.objs.hud; + +public class SaveObj { + public PosObj List; + public PosObj Lyric; + public PosObj Info; + public PosObj Pic; + public int PicSize; + public int PicRotateSpeed; + public boolean EnablePicRotate; + public boolean EnableList; + public boolean EnableLyric; + public boolean EnableInfo; + public boolean EnablePic; + + public SaveObj() { + EnableList = true; + EnableLyric = true; + EnableInfo = true; + EnablePic = true; + EnablePicRotate = true; + PicRotateSpeed = 10; + List = new PosObj(); + Lyric = new PosObj(); + Info = new PosObj(); + Pic = new PosObj(); + PicSize = 70; + } + + public SaveObj copy() { + SaveObj obj1 = new SaveObj(); + obj1.EnableInfo = this.EnableInfo; + obj1.EnableList = this.EnableList; + obj1.EnableLyric = this.EnableLyric; + obj1.EnablePic = this.EnablePic; + obj1.Info = this.Info.copy(); + obj1.List = this.List.copy(); + obj1.Lyric = this.Lyric.copy(); + obj1.Pic = this.Pic.copy(); + obj1.PicSize = this.PicSize; + obj1.EnablePicRotate = this.EnablePicRotate; + obj1.PicRotateSpeed = this.PicRotateSpeed; + return obj1; + } +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/AddMusicObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/AddMusicObj.java new file mode 100644 index 00000000..e5c41c2c --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/AddMusicObj.java @@ -0,0 +1,41 @@ +package coloryr.allmusic.core.objs.message; + +public class AddMusicObj { + public String ListFull; + public String BanMusic; + public String ExistMusic; + public String Success; + public String NoPlayer; + public String NoID; + public String Cancel; + public String TimeOut; + + public AddMusicObj() { + ListFull = "§d[AllMusic]§c错误,队列已满"; + BanMusic = "§d[AllMusic]§c错误,这首歌被禁点了"; + ExistMusic = "§d[AllMusic]§c错误,这首歌已经存在了"; + Success = "§d[AllMusic]§2点歌成功"; + NoPlayer = "§d[AllMusic]§c没有播放的玩家"; + NoID = "§d[AllMusic]§c错误,请输入歌曲数字ID"; + Cancel = "§d[AllMusic]§e点歌被取消"; + TimeOut = "§d[AllMusic]§e点歌被取消,音乐长度过长"; + } + + public boolean check() { + if (ListFull == null) + return true; + if (BanMusic == null) + return true; + if (ExistMusic == null) + return true; + if (Success == null) + return true; + if (NoPlayer == null) + return true; + if (NoID == null) + return true; + if (Cancel == null) + return true; + return TimeOut == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ClickObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ClickObj.java new file mode 100644 index 00000000..2df00562 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ClickObj.java @@ -0,0 +1,17 @@ +package coloryr.allmusic.core.objs.message; + +public class ClickObj { + public String This; + public String Check; + + public ClickObj() { + This = "§b[§n点我选择§r§b]"; + Check = "§b[§n点我查看§r§b]"; + } + + public boolean check() { + if (This == null) + return true; + return Check == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CommandObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CommandObj.java new file mode 100644 index 00000000..6f528da6 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CommandObj.java @@ -0,0 +1,17 @@ +package coloryr.allmusic.core.objs.message; + +public class CommandObj { + public String Error; + public String NoPer; + + public CommandObj() { + Error = "§d[AllMusic]§c参数错误,请输入/music help获取帮助"; + NoPer = "§d[AllMusic]§c你没有权限点歌"; + } + + public boolean check() { + if (Error == null) + return true; + return NoPer == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CostObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CostObj.java new file mode 100644 index 00000000..f02a6ef0 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CostObj.java @@ -0,0 +1,25 @@ +package coloryr.allmusic.core.objs.message; + +public class CostObj { + public String Search; + public String AddMusic; + public String NoMoney; + public String CostFail; + + public CostObj() { + Search = "§d[ALLMusic]§2你搜歌花费了%Cost%"; + AddMusic = "§d[ALLMusic]§2你点歌花费了%Cost%"; + NoMoney = "§d[ALLMusic]§c你没有足够的钱"; + CostFail = "§d[ALLMusic]§c扣钱过程中错误"; + } + + public boolean check() { + if (Search == null) + return true; + if (AddMusic == null) + return true; + if (NoMoney == null) + return true; + return CostFail == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CustomObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CustomObj.java new file mode 100644 index 00000000..c555efc1 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/CustomObj.java @@ -0,0 +1,13 @@ +package coloryr.allmusic.core.objs.message; + +public class CustomObj { + public String Info; + + public CustomObj() { + Info = "自定义音乐"; + } + + public boolean check() { + return Info == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/FunObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/FunObj.java new file mode 100644 index 00000000..c39776d1 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/FunObj.java @@ -0,0 +1,20 @@ +package coloryr.allmusic.core.objs.message; + +public class FunObj { + public String Rain; + + public FunObj() + { + Rain = "§d[AllMusic]§e天空开始变得湿润"; + } + + public boolean check(){ + boolean res =false; + if(Rain == null) + { + res = true; + } + + return res; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpAdminObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpAdminObj.java new file mode 100644 index 00000000..74e67bbb --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpAdminObj.java @@ -0,0 +1,41 @@ +package coloryr.allmusic.core.objs.message; + +public class HelpAdminObj { + public String Reload; + public String Next; + public String Ban; + public String Url; + public String Delete; + public String AddList; + public String ClearList; + public String Login; + + public HelpAdminObj() { + Reload = "§d[AllMusic]§2使用/music reload 重读配置文件"; + Next = "§d[AllMusic]§2使用/music next 强制切歌"; + Ban = "§d[AllMusic]§2使用/music ban [ID] 禁止点这首歌"; + Url = "§d[AllMusic]§2使用/music url [url] 播放一首自定义歌曲"; + Delete = "§d[AllMusic]§2使用/music delete [序号] 删除队列中的歌曲"; + AddList = "§d[AllMusic]§2使用/music addlist [歌单ID] 添加歌单到空闲列表"; + ClearList = "§d[AllMusic]§2使用/music clearlist 清空空闲歌单"; + Login = "§d[AllMusic]§2使用/music login 重新登录账户"; + } + + public boolean check() { + if (Reload == null) + return true; + if (Next == null) + return true; + if (Ban == null) + return true; + if (Url == null) + return true; + if (Delete == null) + return true; + if (AddList == null) + return true; + if (ClearList == null) + return true; + return Login == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpNormalObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpNormalObj.java new file mode 100644 index 00000000..6e8fe501 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpNormalObj.java @@ -0,0 +1,61 @@ +package coloryr.allmusic.core.objs.message; + +public class HelpNormalObj { + public String Head; + public String Base; + public String Stop; + public String List; + public String Vote; + public String NoMusic; + public String Search; + public String Select; + public String Hud1; + public String Hud2; + public String Hud3; + public String Hud4; + public String Hud5; + + public HelpNormalObj() { + Head = "§d[AllMusic]§2帮助手册"; + Base = "§d[AllMusic]§2使用/music [音乐ID] 来点歌"; + Stop = "§d[AllMusic]§2使用/music stop 停止播放歌曲"; + List = "§d[AllMusic]§2使用/music list 查看歌曲队列"; + Vote = "§d[AllMusic]§2使用/music vote 投票切歌"; + NoMusic = "§d[AllMusic]§2使用/music nomusic 不再参与点歌"; + Search = "§d[AllMusic]§2使用/music search [歌名] 搜索歌曲"; + Select = "§d[AllMusic]§2使用/music select [序列] 选择歌曲"; + Hud1 = "§d[AllMusic]§2使用/music hud enable [位置] 启用关闭Hud"; + Hud2 = "§d[AllMusic]§2使用/music hud [位置] [x] [y] 设置某个Hud的位置"; + Hud3 = "§d[AllMusic]§2使用/music hud picsize [尺寸] 设置图片尺寸"; + Hud4 = "§d[AllMusic]§e使用/music hud picrotate [开关] 设置图片旋转模式"; + Hud5 = "§d[AllMusic]§e使用/music hud picrotatespeed [数值] 设置图片旋转速度"; + } + + public boolean check() { + if (Head == null) + return true; + if (Base == null) + return true; + if (Stop == null) + return true; + if (List == null) + return true; + if (Vote == null) + return true; + if (NoMusic == null) + return true; + if (Search == null) + return true; + if (Select == null) + return true; + if (Hud1 == null) + return true; + if (Hud2 == null) + return true; + if (Hud3 == null) + return true; + if (Hud4 == null) + return true; + return Hud5 == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpObj.java new file mode 100644 index 00000000..f25cecc9 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HelpObj.java @@ -0,0 +1,24 @@ +package coloryr.allmusic.core.objs.message; + +public class HelpObj { + public HelpNormalObj Normal; + public HelpAdminObj Admin; + + public HelpObj() { + Normal = new HelpNormalObj(); + Admin = new HelpAdminObj(); + } + + public boolean check() { + boolean save = false; + if (Normal == null) { + save = true; + Normal = new HelpNormalObj(); + } + if (Admin == null) { + save = true; + Admin = new HelpAdminObj(); + } + return save; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudListObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudListObj.java new file mode 100644 index 00000000..0df96d75 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudListObj.java @@ -0,0 +1,50 @@ +package coloryr.allmusic.core.objs.message; + +public class HudListObj { + public String List; + public String Lyric; + public String Info; + public String All; + public String Pic; + public String PicRoute; + public String PicRouteSpeed; + + public HudListObj() { + List = "待播放列表"; + Lyric = "歌词"; + Info = "歌曲信息"; + Pic = "图片"; + All = "所有位置"; + PicRoute = "图片旋转"; + PicRouteSpeed = "图片旋转速度"; + } + + public boolean check() { + if (List == null) + return true; + if (Lyric == null) + return true; + if (Info == null) + return true; + if (All == null) + return true; + if (PicRoute == null) + return true; + if (PicRouteSpeed == null) + return true; + return Pic == null; + } + + public String Get(String data) { + if (data.equalsIgnoreCase("List")) { + return List; + } else if (data.equalsIgnoreCase("Lyric")) { + return Lyric; + } else if (data.equalsIgnoreCase("Info")) { + return Info; + } else if (data.equalsIgnoreCase("Pic")) { + return Pic; + } + return null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudObj.java new file mode 100644 index 00000000..3a05de9f --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/HudObj.java @@ -0,0 +1,61 @@ +package coloryr.allmusic.core.objs.message; + +public class HudObj { + public String State; + public String Set; + public String Reset; + public String NoMusic; + public String NoList; + public String NoLyric; + public String PicSize; + public String PicRotate; + public String PicRotateSpeed; + public String Music; + public String Lyric; + public String List; + public String Ktv; + + public HudObj() { + State = "§d[AllMusic]§2设置信息位置:%Hud%,状态:%State%"; + Set = "§d[AllMusic]§2已设置%Hud%的坐标为%x%, %y%"; + Reset = "§d[AllMusic]§2Hud恢复至默认位置"; + NoMusic = "没有播放的音乐"; + NoList = "队列中无歌曲"; + NoLyric = "无歌词"; + PicSize = "§d[AllMusic]§2设置图片尺寸为%Size%"; + PicRotate = "§d[AllMusic]§2设置图片旋转为%State%"; + PicRotateSpeed = "§d[AllMusic]§2设置图片旋转速度为%Size%"; + Music = "%Name% %AllTime%/%NowTime%\n%Author%\n%Alia%\n%Al%\nby: %Player%"; + Lyric = "%Lyric%\n%Tlyric%"; + Ktv = "§e%KLyric%§f%Lyric%§r\n%Tlyric%"; + List = "播放列表里面有%Size%首歌\n%List%"; + } + + public boolean check() { + if (State == null) + return true; + if (Set == null) + return true; + if (Reset == null) + return true; + if (NoMusic == null) + return true; + if (NoList == null) + return true; + if (NoLyric == null) + return true; + if (PicSize == null) + return true; + if (Music == null) + return true; + if (Lyric == null) + return true; + if (List == null) + return true; + if (PicRotate == null) + return true; + if (PicRotateSpeed == null) + return true; + return Ktv == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ListMusicObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ListMusicObj.java new file mode 100644 index 00000000..8eca85a8 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/ListMusicObj.java @@ -0,0 +1,23 @@ +package coloryr.allmusic.core.objs.message; + +public class ListMusicObj { + public String Head; + public String Item; + public String Get; + + public ListMusicObj() { + Head = "§d[AllMusic]§2队列中有歌曲数:&Count&"; + Item = "§2%index%->%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia%"; + Get = "§d[AllMusic]§2歌曲列表%ListName%获取成功"; + } + + public boolean check() { + boolean res = Head == null; + if (Item == null) + res = true; + if (Get == null) + res = true; + + return res; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/LyricObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/LyricObj.java new file mode 100644 index 00000000..79d718c0 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/LyricObj.java @@ -0,0 +1,17 @@ +package coloryr.allmusic.core.objs.message; + +public class LyricObj { + public String Data; + public String TData; + + public LyricObj() { + Data = "%Lyric%"; + TData = "%Lyric%(%TLyric%)"; + } + + public boolean check() { + if (Data == null) + return true; + return TData == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/MusicPlayObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/MusicPlayObj.java new file mode 100644 index 00000000..df34eac8 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/MusicPlayObj.java @@ -0,0 +1,63 @@ +package coloryr.allmusic.core.objs.message; + +public class MusicPlayObj { + public String StopPlay; + public String NoMusic; + public String Play; + public String NoPlay; + public ListMusicObj ListMusic; + public String NoCanPlay; + public String NoPlayMusic; + public String Switch; + public String AddMusic; + public String CheckMusic; + public String MusicInfo; + public String Trail; + public String Cancel; + + public MusicPlayObj() { + StopPlay = "§d[AllMusic]§2已停止你的音乐播放"; + NoMusic = "§d[AllMusic]§2无正在播放的歌曲"; + Play = "§d[AllMusic]§2正在播放:%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia% | by: %PlayerName%"; + NoPlay = "§d[AllMusic]§2队列中无歌曲"; + ListMusic = new ListMusicObj(); + NoCanPlay = "§d[AllMusic]§c无法播放歌曲%MusicID%可能该歌曲为VIP歌曲"; + NoPlayMusic = "§d[AllMusic]§2你不会再收到点歌了!想要再次参与点歌就点一首歌吧!"; + Switch = "§d[AllMusic]§2切换到玩家歌曲"; + AddMusic = "§d[AllMusic]§2音乐列表添加%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia%"; + CheckMusic = "§d[AllMusic]§2正在解析歌曲%MusicID%"; + MusicInfo = "%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia% | by: %PlayerName%"; + Trail = "§d[AllMusic]§2该音乐为试听音乐"; + Cancel = "§d[AllMusic]§e播放被取消"; + } + + public boolean check() { + boolean res = StopPlay == null; + if (NoMusic == null) + res = true; + if (Play == null) + res = true; + if (NoPlay == null) + res = true; + if (ListMusic == null || ListMusic.check()) + res = true; + if (NoCanPlay == null) + res = true; + if (NoPlayMusic == null) + res = true; + if (Switch == null) + res = true; + if (AddMusic == null) + res = true; + if (CheckMusic == null) + res = true; + if (MusicInfo == null) + res = true; + if (Trail == null) + res = true; + if (Cancel == null) + res = true; + + return res; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PAPIObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PAPIObj.java new file mode 100644 index 00000000..db3a1975 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PAPIObj.java @@ -0,0 +1,13 @@ +package coloryr.allmusic.core.objs.message; + +public class PAPIObj { + public String NoMusic; + + public PAPIObj() { + NoMusic = "没有播放的音乐"; + } + + public boolean check() { + return NoMusic == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PageObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PageObj.java new file mode 100644 index 00000000..c92f67d4 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/PageObj.java @@ -0,0 +1,23 @@ +package coloryr.allmusic.core.objs.message; + +public class PageObj { + public String Choice; + public String Next; + public String Last; + + public PageObj() { + Choice = "§e[§n点我选择§r§e]§2%index%->%MusicName% | %MusicAuthor% | %MusicAl%"; + Next = "§d[AllMusic]§e[§n点我下一页§r§e]"; + Last = "§d[AllMusic]§e[§n点我上一页§r§e]"; + } + + public boolean check() { + boolean res = Choice == null; + if (Next == null) + res = true; + if (Last == null) + res = true; + + return res; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/SearchObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/SearchObj.java new file mode 100644 index 00000000..e821d0a9 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/SearchObj.java @@ -0,0 +1,45 @@ +package coloryr.allmusic.core.objs.message; + +public class SearchObj { + public String NoPer; + public String CantSearch; + public String Res; + public String NoSearch; + public String ErrorNum; + public String Chose; + public String CantNext; + public String CantLast; + public String StartSearch; + + public SearchObj() { + StartSearch = "§d[AllMusic]§2正在排队搜歌"; + NoPer = "§d[AllMusic]§c你没有权限搜歌"; + CantSearch = "§d[AllMusic]§c无法搜索歌曲:%Music%"; + Res = "§d[AllMusic]§2搜索结果"; + NoSearch = "§d[AllMusic]§c你没有搜索音乐"; + ErrorNum = "§d[AllMusic]§c请输入正确的序号"; + Chose = "§d[AllMusic]§2你选择了序号%Num%"; + CantNext = "§d[AllMusic]§c无法下一页"; + CantLast = "§d[AllMusic]§c无法上一页"; + } + + public boolean check() { + if (NoPer == null) + return true; + if (CantSearch == null) + return true; + if (Res == null) + return true; + if (NoSearch == null) + return true; + if (ErrorNum == null) + return true; + if (Chose == null) + return true; + if (CantNext == null) + return true; + if (CantLast == null) + return true; + return StartSearch == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/VoteObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/VoteObj.java new file mode 100644 index 00000000..7a3150b2 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/message/VoteObj.java @@ -0,0 +1,41 @@ +package coloryr.allmusic.core.objs.message; + +public class VoteObj { + public String NoPermission; + public String DoVote; + public String BQ; + public String Agree; + public String BQAgree; + public String ARAgree; + public String TimeOut; + public String Do; + + public VoteObj() { + NoPermission = "§d[AllMusic]§c你没有权限切歌"; + DoVote = "§d[AllMusic]§2已发起切歌投票"; + BQ = "§d[AllMusic]§2%PlayerName%发起了切歌投票,30秒后结束,输入/music vote 同意切歌。"; + Agree = "§d[AllMusic]§2你同意切歌"; + BQAgree = "§d[AllMusic]§2%PlayerName%同意切歌,共有%Count%名玩家同意切歌。"; + ARAgree = "§d[AllMusic]§2你已申请切歌"; + TimeOut = "§d[AllMusic]§2切歌时间结束"; + Do = "§d[AllMusic]§2已切歌"; + } + + public boolean check() { + if (NoPermission == null) + return true; + if (DoVote == null) + return true; + if (BQ == null) + return true; + if (Agree == null) + return true; + if (BQAgree == null) + return true; + if (ARAgree == null) + return true; + if (TimeOut == null) + return true; + return Do == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/LyricItemObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/LyricItemObj.java new file mode 100644 index 00000000..02a0f3c6 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/LyricItemObj.java @@ -0,0 +1,27 @@ +package coloryr.allmusic.core.objs.music; + +import coloryr.allmusic.core.AllMusic; + +public class LyricItemObj { + public String lyric; + public String tlyric; + + public LyricItemObj(String lyric, String tlyric) { + this.lyric = lyric; + this.tlyric = tlyric; + } + + public String getString() { + if (lyric == null || lyric.isEmpty()) + return ""; + String data; + if (tlyric != null && !tlyric.isEmpty()) { + data = AllMusic.getMessage().Lyric.TData; + return data.replace("%Lyric%", lyric) + .replace("%TLyric%", tlyric); + } + + data = AllMusic.getMessage().Lyric.Data; + return data.replace("%Lyric%", lyric); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/MusicObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/MusicObj.java new file mode 100644 index 00000000..93ebb0a5 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/MusicObj.java @@ -0,0 +1,32 @@ +package coloryr.allmusic.core.objs.music; + +public class MusicObj { + /** + * 发送者 + */ + public Object sender; + /** + * 歌曲ID + */ + public String id; + /** + * 用户名 + */ + public String name; + /** + * 参数 + */ + public String[] args; + /** + * 是否是默认点歌方式 + */ + public boolean isDefault; + /** + * 是否是Url歌曲 + */ + public boolean isUrl; + /** + * 歌曲Url + */ + public String url; +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SearchPageObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SearchPageObj.java new file mode 100644 index 00000000..0170c970 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SearchPageObj.java @@ -0,0 +1,55 @@ +package coloryr.allmusic.core.objs.music; + +import coloryr.allmusic.core.objs.SearchMusicObj; + +import java.util.List; + +public class SearchPageObj { + private final List resData; + private final int maxpage; + private int page = 0; + + public SearchPageObj(List resData, int maxpage) { + this.resData = resData; + this.maxpage = maxpage; + } + + public String getSong(int index) { + return resData.get(index).id; + } + + public SearchMusicObj getRes(int a) { + return resData.get(a); + } + + public boolean nextPage() { + if (!haveNextPage()) + return false; + page++; + return true; + } + + public boolean lastPage() { + if (!haveLastPage()) + return false; + page--; + return true; + } + + public int getIndex() { + int a = resData.size() - page * 10; + return Math.min(a, 10); + } + + public boolean haveNextPage() { + return page != (maxpage - 1); + } + + public boolean haveLastPage() { + return page != 0; + } + + public int getPage() { + return page; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SongInfoObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SongInfoObj.java new file mode 100644 index 00000000..bc98983a --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/SongInfoObj.java @@ -0,0 +1,151 @@ +package coloryr.allmusic.core.objs.music; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.objs.api.music.trialinfo.freeTrialInfo; + +public class SongInfoObj { + /** + * 作者 + */ + protected String author; + /** + * 名字 + */ + protected String name; + /** + * 音乐ID + */ + protected String id; + /** + * 原曲 + */ + protected String alia; + /** + * 点歌者 + */ + protected String call; + /** + * 专辑 + */ + protected String al; + /** + * 播放链接 + */ + protected String playerUrl; + /** + * 图片链接 + */ + protected String picUrl; + /** + * 是否是试听 + */ + protected boolean isTrial; + /** + * 试听数据 + */ + protected freeTrialInfo trialInfo; + /** + * 长度 + */ + + protected int length; + + /** + * 是否是空闲歌单的歌 + */ + protected boolean isList; + /** + * 是否是Url歌曲 + */ + protected boolean isUrl; + + public SongInfoObj(String Name, String Url, int Length) { + this.length = Length; + playerUrl = Url; + this.name = Name; + id = alia = call = al = author = picUrl = ""; + isList = false; + isUrl = true; + } + + public SongInfoObj(String Author, String Name, String ID, String Alia, String Call, String Al, + boolean isList, int Length, String picUrl, boolean isTrial, freeTrialInfo trialInfo) { + this.author = Author; + this.name = Name; + this.id = ID; + this.alia = Alia; + this.call = Call; + this.al = Al; + this.picUrl = picUrl; + this.isList = isList; + this.length = Length; + this.isTrial = isTrial; + this.trialInfo = trialInfo; + } + + public boolean isUrl() { + return isUrl; + } + + public boolean isTrial() { + return isTrial; + } + + public String getPicUrl() { + return picUrl; + } + + public freeTrialInfo getTrialInfo() { + return trialInfo; + } + + public String getPlayerUrl() { + return playerUrl; + } + + public String getAl() { + return al == null ? "" : al; + } + + public String getAlia() { + return alia == null ? "" : alia; + } + + public String getCall() { + return call == null ? "" : call; + } + + public String getAuthor() { + return author == null ? "" : author; + } + + public int getLength() { + return length; + } + + public boolean isList() { + return isList; + } + + public String getName() { + return name == null ? "" : name; + } + + public String getID() { + return id; + } + + public String getInfo() { + String info = AllMusic.getMessage().MusicPlay.MusicInfo; + info = info.replace("%MusicName%", name == null ? "" : name) + .replace("%MusicAuthor%", author == null ? "" : author) + .replace("%MusicAl%", al == null ? "" : al) + .replace("%MusicAlia%", alia == null ? "" : alia) + .replace("%PlayerName%", call == null ? "" : call); + return info; + } + + public boolean isNull() { + return name == null; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/TopSongInfoObj.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/TopSongInfoObj.java new file mode 100644 index 00000000..7869fe4a --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/objs/music/TopSongInfoObj.java @@ -0,0 +1,61 @@ +package coloryr.allmusic.core.objs.music; + +import coloryr.allmusic.core.objs.api.music.trialinfo.freeTrialInfo; + +public class TopSongInfoObj extends SongInfoObj { + public TopSongInfoObj() { + super(null, null, 0); + } + + public void setAl(String al) { + this.al = al; + } + + public void setAlia(String alia) { + this.alia = alia; + } + + public void setAuthor(String author) { + this.author = author; + } + + public void setCall(String call) { + this.call = call; + } + + public void setId(String id) { + this.id = id; + } + + public void setLength(int length) { + this.length = length; + } + + public void setList(boolean list) { + isList = list; + } + + public void setName(String name) { + this.name = name; + } + + public void setPicUrl(String picUrl) { + this.picUrl = picUrl; + } + + public void setPlayerUrl(String playerUrl) { + this.playerUrl = playerUrl; + } + + public void setTrial(boolean trial) { + isTrial = trial; + } + + public void setTrialInfo(freeTrialInfo trialInfo) { + this.trialInfo = trialInfo; + } + + public void setUrl(boolean url) { + isUrl = url; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/ComType.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/ComType.java new file mode 100644 index 00000000..5095dd4b --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/ComType.java @@ -0,0 +1,12 @@ +package coloryr.allmusic.core.side; + +public class ComType { + public static final String lyric = "[Lyric]"; + public static final String info = "[Info]"; + public static final String list = "[List]"; + public static final String play = "[Play]"; + public static final String img = "[Img]"; + public static final String stop = "[Stop]"; + public static final String clear = "[clear]"; + public static final String pos = "[Pos]"; +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/IMyLogger.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/IMyLogger.java new file mode 100644 index 00000000..427829e4 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/IMyLogger.java @@ -0,0 +1,7 @@ +package coloryr.allmusic.core.side; + +public interface IMyLogger { + void warning(String data); + + void info(String data); +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/ISide.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/ISide.java new file mode 100644 index 00000000..22fab1d4 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/side/ISide.java @@ -0,0 +1,246 @@ +package coloryr.allmusic.core.side; + +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.objs.music.MusicObj; +import coloryr.allmusic.core.objs.music.SongInfoObj; + +public abstract class ISide { + /** + * 重载 + */ + public abstract void reload(); + + /** + * 获取当前玩家数量 + * + * @return 数量 + */ + public abstract int getAllPlayer(); + + /** + * 主线程运行任务 + * + * @param run 任务 + */ + public abstract void runTask(Runnable run); + + /** + * 主线程延迟任务 + * + * @param run 任务 + * @param delay 延迟 + */ + public abstract void runTask(Runnable run, int delay); + + /** + * 检查权限 + * + * @param player 用户名 + * @param permission 权限 + * @return 是否有权限 + */ + public abstract boolean checkPermission(String player, String permission); + + /** + * 是否需要播放 + * + * @return 结果 + */ + public abstract boolean needPlay(); + + + /** + * 发送AllMusic插件信道消息 + * + * @param data 数据 + * @param player 用户名 + */ + public abstract void send(String data, String player); + + /** + * 发送停止指令 + */ + public final void sendStop() { + AllMusic.clearNowPlayer(); + topSendStop(); + } + + protected abstract void topSendStop(); + + /** + * 发送停止指令 + * + * @param name 用户名 + */ + public final void sendStop(String name) { + AllMusic.removeNowPlayPlayer(name); + topSendStop(name); + } + + protected abstract void topSendStop(String name); + + /** + * 发送播放歌曲指令 + * + * @param url 歌曲Url + */ + public abstract void sendMusic(String url); + + public final void sendMusic(String player, String url) { + AllMusic.addNowPlayPlayer(player); + topSendMusic(player, url); + } + + protected abstract void topSendMusic(String player, String url); + + /** + * 发送图片数据指令 + * + * @param url 图片地址 + */ + public abstract void sendPic(String url); + + /** + * 发送图片数据指令 + * + * @param player 用户名 + * @param url 图片地址 + */ + public abstract void sendPic(String player, String url); + + /** + * 发送歌曲位置信息 + * + * @param player 用户名 + * @param pos 歌曲位置 + */ + public abstract void sendPos(String player, int pos); + + /** + * 发送Hud的歌词数据 + * + * @param data 数据 + */ + public abstract void sendHudLyric(String data); + + /** + * 发送Hud的信息数据 + * + * @param data 数据 + */ + public abstract void sendHudInfo(String data); + + /** + * 发送Hud的歌曲列表数据 + * + * @param data 数据 + */ + public abstract void sendHudList(String data); + + /** + * 发送Hud位置数据 + */ + public abstract void sendHudUtilsAll(); + + /** + * 发送Bar数据 + * + * @param data 数据 + */ + public abstract void sendBar(String data); + + /** + * 清理Hud数据 + * + * @param player 用户名 + */ + public abstract void clearHud(String player); + + /** + * 清理Hud数据 + */ + public abstract void clearHud(); + + /** + * 广播消息 + * + * @param data 消息 + */ + public abstract void bq(String data); + + /** + * 在主线程中广播消息 + * + * @param data 消息 + */ + public abstract void bqt(String data); + + /** + * 在主线程发送消息 + * + * @param obj 接受对象 + * @param message 消息 + */ + public abstract void sendMessaget(Object obj, String message); + + /** + * 发送消息 + * + * @param obj 接受对象 + * @param message 消息 + */ + public abstract void sendMessage(Object obj, String message); + + /** + * 发送执行指令 + * + * @param obj 接受对象 + * @param message 消息 + * @param end 结尾 + * @param command 指令 + */ + public abstract void sendMessageRun(Object obj, String message, String end, String command); + + /** + * 发送推荐指令 + * + * @param obj 接受对象 + * @param message 消息 + * @param end 结尾 + * @param command 指令 + */ + public abstract void sendMessageSuggest(Object obj, String message, String end, String command); + + /** + * 当歌曲添加时触发的事件 + * + * @param obj 歌曲信息 + * @return 是否阻止播放 + */ + public abstract boolean onMusicPlay(SongInfoObj obj); + + /** + * 当歌曲播放时触发的事件 + * + * @param obj 发送者 + * @param music 歌曲信息 + * @return 是否阻止添加 + */ + public abstract boolean onMusicAdd(Object obj, MusicObj music); + + + /** + * 更新信息 + */ + public abstract void updateInfo(); + + /** + * 更新歌词 + */ + public abstract void updateLyric(); + + /** + * 发送BC的ping包 + */ + public abstract void ping(); +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/sql/IEconomy.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/sql/IEconomy.java new file mode 100644 index 00000000..385d16f3 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/sql/IEconomy.java @@ -0,0 +1,7 @@ +package coloryr.allmusic.core.sql; + +public interface IEconomy { + boolean check(String name, int cost); + + boolean cost(String name, int cost); +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/sql/MysqlConn.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/sql/MysqlConn.java new file mode 100644 index 00000000..c482cfb6 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/sql/MysqlConn.java @@ -0,0 +1,68 @@ +//package coloryr.allmusic.sql; +// +//import coloryr.allmusic.AllMusic; +//import org.apache.commons.dbcp2.BasicDataSource; +// +//import javax.sql.DataSource; +//import java.sql.*; +// +//public abstract class MysqlConn implements IEconomy{ +// //建立连接的驱动驱动名称 +// public final String DRIVER_CLASS_NAME = "com.mysql.cj.jdbc.Driver"; +// //最大空闲链接 +// private final int MAX_IDLE = 20; +// //最大空闲连接 +// private final int MinIdle = 8; +// //最大等待时间 +// private final long MAX_WAIT_Millis = 5000; +// //最大活动链接 +// private final int MAX_TOTAl = 5; +// //初始化时链接池的数量 +// private final int INITIAL_SIZE = 10; +// //一个被抛弃连接可以被移除的超时时间 +// private final int RemoveAbandonedTimeout = 180; +// //只会发现当前连接失效,再创建一个连接供当前查询使用 +// private final boolean TOBESTNORROW = true; +// private BasicDataSource DATA_SOURCE; +// +// public boolean start() { +// try { +// DATA_SOURCE = new BasicDataSource(); +// DATA_SOURCE.setDriverClassName(DRIVER_CLASS_NAME); +// DATA_SOURCE.setUrl(AllMusic.getConfig().getEconomys().getMysqlUrl()); +// DATA_SOURCE.setMaxTotal(MAX_TOTAl); +// DATA_SOURCE.setInitialSize(INITIAL_SIZE); +// DATA_SOURCE.setMinIdle(MinIdle); +// DATA_SOURCE.setMaxIdle(MAX_IDLE); +// DATA_SOURCE.setMaxWaitMillis(MAX_WAIT_Millis); +// DATA_SOURCE.setTestOnBorrow(TOBESTNORROW); +// DATA_SOURCE.setRemoveAbandonedTimeout(RemoveAbandonedTimeout); +// +// getConnection().createStatement().close(); +// +// return test(); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return false; +// } +// +// public abstract boolean test(); +// +// public DataSource getDateSource() { +// return DATA_SOURCE; +// } +// +// //提供获得链接 +// public Connection getConnection() throws SQLException { +// return DATA_SOURCE.getConnection(); +// } +// +// public void stop() { +// try { +// DATA_SOURCE.close(); +// } catch (SQLException e) { +// e.printStackTrace(); +// } +// } +//} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/utils/Function.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/utils/Function.java new file mode 100644 index 00000000..58809d80 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/utils/Function.java @@ -0,0 +1,30 @@ +package coloryr.allmusic.core.utils; + +import java.util.regex.Pattern; + +public class Function { + public static boolean isInteger(String str) { + Pattern pattern = Pattern.compile("^[-+]?[\\d]*$"); + return pattern.matcher(str).matches(); + } + + public static String getString(String a, String b, String c) { + int x = a.indexOf(b) + b.length(); + int y; + if (c != null) + y = a.indexOf(c); + else y = a.length(); + if (x < 0 || y < 0) + return a; + return a.substring(x, y); + } + + public static int countChar(String a, char b) { + int count = 0; + for (char t : a.toCharArray()) { + if (t == b) + count++; + } + return count; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/core/utils/Logs.java b/forge_1_18_2/src/main/java/coloryr/allmusic/core/utils/Logs.java new file mode 100644 index 00000000..60bb3af5 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/core/utils/Logs.java @@ -0,0 +1,42 @@ +package coloryr.allmusic.core.utils; + +import coloryr.allmusic.core.AllMusic; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Date; + +public class Logs { + private static final Date date = new Date(); + public static File file; + private static FileWriter fw; + private static PrintWriter pw; + + public static void logWrite(String text) { + try { + if (fw == null) + fw = new FileWriter(file, true); + String year = String.format("%tF", date); + String time = String.format("%tT", date); + String write = "[" + year + "]" + "[" + time + "]" + text; + if (pw == null) + pw = new PrintWriter(fw); + pw.println(write); + pw.flush(); + fw.flush(); + + } catch (IOException e) { + AllMusic.log.warning("§c日志文件写入失败"); + e.printStackTrace(); + } + } + + public static void stop() throws IOException { + if (fw != null) + pw.close(); + if (fw != null) + fw.close(); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/CommandForge.java b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/CommandForge.java new file mode 100644 index 00000000..773a7d16 --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/CommandForge.java @@ -0,0 +1,70 @@ +package coloryr.allmusic.side.forge; + +import coloryr.allmusic.core.command.CommandEX; +import coloryr.allmusic.core.command.TabCommand; +import com.mojang.brigadier.Command; +import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.arguments.StringArgumentType; +import com.mojang.brigadier.context.CommandContext; +import com.mojang.brigadier.suggestion.SuggestionProvider; +import com.mojang.brigadier.suggestion.Suggestions; +import com.mojang.brigadier.suggestion.SuggestionsBuilder; +import net.minecraft.commands.CommandSourceStack; +import net.minecraft.commands.Commands; + +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Predicate; + +public class CommandForge implements Command, Predicate, SuggestionProvider { + public static CommandForge instance = new CommandForge(); + + public void register(CommandDispatcher dispatcher) { + dispatcher.register(((Commands.literal("music").requires(this)).executes(this)) + .then(Commands.argument("args", StringArgumentType.greedyString()) + .suggests(this).executes(this))); + } + + @Override + public int run(CommandContext context) { + var item = context.getSource(); + + var input = context.getInput(); + var temp = input.split(" "); + var arg = new String[temp.length - 1]; + System.arraycopy(temp, 1, arg, 0, arg.length); + + try { + CommandEX.ex(item.getPlayerOrException(), context.getSource().getTextName(), arg); + } catch (Exception e) { + + } + + return 0; + } + + @Override + public boolean test(CommandSourceStack stack) { + return true; + } + + @Override + public CompletableFuture getSuggestions(CommandContext context, SuggestionsBuilder builder) { + var input = context.getInput(); + var temp = input.split(" "); + var arg = new String[input.endsWith(" ") ? temp.length : temp.length - 1]; + System.arraycopy(temp, 1, arg, 0, temp.length - 1); + + if (input.endsWith(" ")) + builder = builder.createOffset(builder.getInput().lastIndexOf(32) + 1); + + List results = TabCommand.getTabList(context.getSource().getTextName(), arg); + + for (String s : results) { + builder.suggest(s); + } + + return builder.buildFuture(); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/ForgeApi.java b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/ForgeApi.java new file mode 100644 index 00000000..af818cca --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/ForgeApi.java @@ -0,0 +1,31 @@ +package coloryr.allmusic.side.forge; + +import net.minecraft.commands.CommandSource; +import net.minecraft.commands.arguments.ComponentArgument; +import net.minecraft.commands.arguments.EntityArgument; +import net.minecraft.network.chat.*; +import net.minecraft.network.protocol.game.ClientboundSetActionBarTextPacket; +import net.minecraft.server.level.ServerPlayer; + +import java.util.UUID; + +public class ForgeApi { + public static void sendMessageRun(Object obj, String message, String command) { + CommandSource sender = (CommandSource) obj; + MutableComponent send = new TextComponent(message); + send.getStyle().withClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command)); + sender.sendMessage(send, UUID.randomUUID()); + } + + public static void sendMessageSuggest(Object obj, String message, String command) { + CommandSource sender = (CommandSource) obj; + MutableComponent send = new TextComponent(message); + send.getStyle().withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, command)); + sender.sendMessage(send, UUID.randomUUID()); + } + + public static void sendBar(ServerPlayer player, String message) { + var pack = new ClientboundSetActionBarTextPacket(new TextComponent(message)); + player.connection.send(pack); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/LogForge.java b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/LogForge.java new file mode 100644 index 00000000..4c2705ea --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/LogForge.java @@ -0,0 +1,16 @@ +package coloryr.allmusic.side.forge; + +import coloryr.allmusic.AllMusicForge; +import coloryr.allmusic.core.side.IMyLogger; + +public class LogForge implements IMyLogger { + @Override + public void warning(String data) { + AllMusicForge.LOGGER.warn(data); + } + + @Override + public void info(String data) { + AllMusicForge.LOGGER.info(data); + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/SideForge.java b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/SideForge.java new file mode 100644 index 00000000..b2fdc98a --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/SideForge.java @@ -0,0 +1,385 @@ +package coloryr.allmusic.side.forge; + +import coloryr.allmusic.AllMusicForge; +import coloryr.allmusic.TaskItem; +import coloryr.allmusic.Tasks; +import coloryr.allmusic.core.AllMusic; +import coloryr.allmusic.core.hud.HudUtils; +import coloryr.allmusic.core.objs.hud.SaveObj; +import coloryr.allmusic.core.objs.music.MusicObj; +import coloryr.allmusic.core.objs.music.SongInfoObj; +import coloryr.allmusic.core.side.ComType; +import coloryr.allmusic.core.side.ISide; +import coloryr.allmusic.side.forge.event.MusicAddEvent; +import coloryr.allmusic.side.forge.event.MusicPlayEvent; +import com.google.gson.Gson; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import net.minecraft.commands.CommandSource; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Player; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.network.PacketDistributor; + +import java.io.File; +import java.nio.charset.StandardCharsets; +import java.util.Locale; +import java.util.UUID; + +public class SideForge extends ISide { + + @Override + public void reload() { + String path = String.format(Locale.ROOT, "config/%s/", "AllMusic"); + new AllMusic().init(new File(path)); + } + + @Override + public int getAllPlayer() { + return AllMusicForge.server.getPlayerCount(); + } + + @Override + public void runTask(Runnable run) { + AllMusicForge.server.execute(run); + } + + @Override + public void runTask(Runnable run1, int delay) { + Tasks.taskItems.add(new TaskItem() {{ + tick = delay; + run = run1; + }}); + } + + @Override + public boolean checkPermission(String player, String permission) { + var player1 = AllMusicForge.server.getPlayerList().getPlayerByName(player); + if (player1 == null) + return false; + + return player1.hasPermissions(2); + } + + @Override + public boolean needPlay() { + int online = getAllPlayer(); + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + if (AllMusic.getConfig().NoMusicPlayer.contains(player.getName().getString())) { + online--; + } + } + return online > 0; + } + + @Override + public void send(String data, String player) { + send(AllMusicForge.server.getPlayerList().getPlayerByName(player), data); + } + + @Override + protected void topSendStop() { + try { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + send(player, ComType.stop); + } + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c停止指令发送出错"); + e.printStackTrace(); + } + } + + @Override + protected void topSendStop(String name) { + try { + var player = AllMusicForge.server.getPlayerList().getPlayerByName(name); + if (player == null) + return; + send(player, ComType.stop); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c停止指令发送出错"); + e.printStackTrace(); + } + } + + @Override + public void sendMusic(String url) { + try { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + if (AllMusic.isOK(player.getName().getString(), null, false)) + continue; + send(player, ComType.play + url); + AllMusic.addNowPlayPlayer(player.getName().getString()); + } + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c歌曲指令发送出错"); + e.printStackTrace(); + } + } + + @Override + protected void topSendMusic(String player, String url) { + try { + var player1 = AllMusicForge.server.getPlayerList().getPlayerByName(player); + if (player1 == null) + return; + if (AllMusic.isOK(player, null, false)) + return; + send(ComType.play + url, player); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c歌曲指令发送出错"); + e.printStackTrace(); + } + } + + @Override + public void sendPic(String url) { + try { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + if (AllMusic.isOK(player.getName().getString(), null, true)) + continue; + String name = player.getName().getString(); + SaveObj obj = HudUtils.get(name); + if (!obj.EnablePic) + continue; + send(player, ComType.img + url); + } + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c图片指令发送出错"); + e.printStackTrace(); + } + } + + @Override + public void sendPic(String player, String url) { + try { + var player1 = AllMusicForge.server.getPlayerList().getPlayerByName(player); + if (player1 == null) + return; + if (AllMusic.isOK(player1.getName().getString(), null, true)) + return; + send(ComType.img + url, player); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c图片指令发送出错"); + e.printStackTrace(); + } + } + + @Override + public void sendPos(String player, int pos) { + try { + var player1 = AllMusicForge.server.getPlayerList().getPlayerByName(player); + if (player1 == null) + return; + if (AllMusic.isOK(player1.getName().getString(), null, true)) + return; + send(ComType.pos + pos, player); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c清空Hud发生出错"); + e.printStackTrace(); + } + } + + @Override + public void sendHudLyric(String data) { + try { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + if (AllMusic.isOK(player.getName().getString(), null, true)) + continue; + String name = player.getName().getString(); + SaveObj obj = HudUtils.get(name); + if (!obj.EnableLyric) + continue; + send(player, ComType.lyric + data); + } + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c歌词发送出错"); + e.printStackTrace(); + } + } + + @Override + public void sendHudInfo(String data) { + try { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + if (AllMusic.isOK(player.getName().getString(), null, true)) + continue; + String name = player.getName().getString(); + SaveObj obj = HudUtils.get(name); + if (!obj.EnableInfo) + continue; + send(player, ComType.info + data); + } + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c歌词信息发送出错"); + e.printStackTrace(); + } + } + + @Override + public void sendHudList(String data) { + try { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + if (AllMusic.isOK(player.getName().getString(), null, true)) + continue; + String name = player.getName().getString(); + SaveObj obj = HudUtils.get(name); + if (!obj.EnableList) + continue; + send(player, ComType.list + data); + } + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c歌曲列表发送出错"); + e.printStackTrace(); + } + } + + @Override + public void sendHudUtilsAll() { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + String Name = player.getName().getString(); + try { + SaveObj obj = HudUtils.get(Name); + String data = new Gson().toJson(obj); + send(player, data); + } catch (Exception e1) { + AllMusic.log.warning("§d[AllMusic]§c数据发送发生错误"); + e1.printStackTrace(); + } + } + } + + @Override + public void sendBar(String data) { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + try { + if (AllMusic.isOK(player.getName().getString(), null, true)) + continue; + ForgeApi.sendBar(player, data); + } catch (Exception e1) { + AllMusic.log.warning("§d[AllMusic]§c数据发送发生错误"); + e1.printStackTrace(); + } + } + } + + @Override + public void clearHud(String player) { + try { + send(ComType.clear, player); + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c清空Hud发生出错"); + e.printStackTrace(); + } + } + + @Override + public void clearHud() { + try { + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + send(player, ComType.clear); + } + } catch (Exception e) { + AllMusic.log.warning("§d[AllMusic]§c清空Hud发生出错"); + e.printStackTrace(); + } + } + + @Override + public void bq(String data) { + if (AllMusic.getConfig().MessageLimit + && data.length() > AllMusic.getConfig().MessageLimitSize) { + data = data.substring(0, AllMusic.getConfig().MessageLimitSize - 1) + "..."; + } + for (var player : AllMusicForge.server.getPlayerList().getPlayers()) { + if (!AllMusic.getConfig().NoMusicPlayer.contains(player.getName().getString())) { + player.sendMessage(new TextComponent(data), UUID.randomUUID()); + } + } + } + + @Override + public void bqt(String data) { + if (AllMusic.getConfig().MessageLimit + && data.length() > AllMusic.getConfig().MessageLimitSize) { + data = data.substring(0, AllMusic.getConfig().MessageLimitSize - 1) + "..."; + } + var finalData = new TextComponent(data); + runTask(() -> { + for (Player player : AllMusicForge.server.getPlayerList().getPlayers()) { + if (!AllMusic.getConfig().NoMusicPlayer.contains(player.getName().getString())) { + player.sendMessage(finalData, UUID.randomUUID()); + } + } + }); + } + + @Override + public void sendMessaget(Object obj, String message) { + runTask(() -> ((CommandSource) obj).sendMessage(new TextComponent(message), UUID.randomUUID())); + } + + @Override + public void sendMessage(Object obj, String message) { + CommandSource sender = (CommandSource) obj; + sender.sendMessage(new TextComponent(message), UUID.randomUUID()); + } + + @Override + public void sendMessageRun(Object obj, String message, String end, String command) { + ForgeApi.sendMessageRun(obj, message + end, command); + } + + @Override + public void sendMessageSuggest(Object obj, String message, String end, String command) { + ForgeApi.sendMessageSuggest(obj, message + end, command); + } + + @Override + public boolean onMusicPlay(SongInfoObj obj) { + MusicPlayEvent event = new MusicPlayEvent(obj); + return MinecraftForge.EVENT_BUS.post(event); + } + + @Override + public boolean onMusicAdd(Object obj, MusicObj music) { + MusicAddEvent event = new MusicAddEvent(music, (ServerPlayer) obj); + return MinecraftForge.EVENT_BUS.post(event); + } + + @Override + public void updateInfo() { + + } + + @Override + public void updateLyric() { + + } + + @Override + public void ping() { + + } + + private void send(ServerPlayer players, String data) { + if (players == null) + return; + try { +// byte[] bytes = data.getBytes(StandardCharsets.UTF_8); +// ByteBuf buf = Unpooled.buffer(bytes.length + 1); +// buf.writeByte(666); +// buf.writeBytes(bytes); + + runTask(() -> AllMusicForge.channel.send(PacketDistributor.PLAYER.with( + () -> players + ), data)); + } catch (Exception e) { + AllMusic.log.warning("§c数据发送发生错误"); + e.printStackTrace(); + } + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/event/MusicAddEvent.java b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/event/MusicAddEvent.java new file mode 100644 index 00000000..eeb0addf --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/event/MusicAddEvent.java @@ -0,0 +1,31 @@ +package coloryr.allmusic.side.forge.event; + +import coloryr.allmusic.core.objs.music.MusicObj; +import net.minecraft.server.level.ServerPlayer; +import net.minecraftforge.eventbus.api.Cancelable; +import net.minecraftforge.eventbus.api.Event; + +@Cancelable +public class MusicAddEvent extends Event { + /** + * 添加的音乐 + */ + private final MusicObj music; + /** + * 添加者 + */ + private final ServerPlayer player; + + public MusicAddEvent(MusicObj id, ServerPlayer player) { + this.music = id; + this.player = player; + } + + public ServerPlayer getPlayer() { + return player; + } + + public MusicObj getMusic() { + return music; + } +} diff --git a/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/event/MusicPlayEvent.java b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/event/MusicPlayEvent.java new file mode 100644 index 00000000..4b455faa --- /dev/null +++ b/forge_1_18_2/src/main/java/coloryr/allmusic/side/forge/event/MusicPlayEvent.java @@ -0,0 +1,18 @@ +package coloryr.allmusic.side.forge.event; + +import coloryr.allmusic.core.objs.music.SongInfoObj; +import net.minecraftforge.eventbus.api.Cancelable; +import net.minecraftforge.eventbus.api.Event; + +@Cancelable +public class MusicPlayEvent extends Event { + private final SongInfoObj music; + + public MusicPlayEvent(SongInfoObj music) { + this.music = music; + } + + public SongInfoObj getMusic() { + return music; + } +} diff --git a/forge_1_18_2/src/main/resources/META-INF/mods.toml b/forge_1_18_2/src/main/resources/META-INF/mods.toml new file mode 100644 index 00000000..7bcb4e66 --- /dev/null +++ b/forge_1_18_2/src/main/resources/META-INF/mods.toml @@ -0,0 +1,58 @@ +# This is an example mods.toml file. It contains the data relating to the loading mods. +# There are several mandatory fields (#mandatory), and many more that are optional (#optional). +# The overall format is standard TOML format, v0.5.0. +# Note that there are a couple of TOML lists in this file. +# Find more information on toml format here: https://github.com/toml-lang/toml +# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml +modLoader="javafml" #mandatory +# A version range to match for said mod loader - for regular FML @Mod it will be the forge version +loaderVersion="[40,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. +# The license for you mod. This is mandatory metadata and allows for easier comprehension of your redistributive properties. +# Review your options at https://choosealicense.com/. All rights reserved is the default copyright stance, and is thus the default here. +license="All rights reserved" +# A URL to refer people to when problems occur with this mod +#issueTrackerURL="https://change.me.to.your.issue.tracker.example.invalid/" #optional +# A list of mods - how many allowed here is determined by the individual mod loader +[[mods]] #mandatory +# The modid of the mod +modId="allmusic" #mandatory +# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it +# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata +# see the associated build.gradle script for how to populate this completely automatically during a build +version="${file.jarVersion}" #mandatory + # A display name for the mod +displayName="AllMusic" #mandatory +# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ +#updateJSONURL="https://change.me.example.invalid/updates.json" #optional +# A URL for the "homepage" for this mod, displayed in the mod UI +#displayURL="https://change.me.to.your.mods.homepage.example.invalid/" #optional +# A file name (in the root of the mod JAR) containing a logo for display +logoFile="icon.png" #optional +# A text field displayed in the mod UI +credits="AllMusic Server Mod" #optional +# A text field displayed in the mod UI +authors="Color_yr" #optional +# The description text for the mod (multi line!) (#mandatory) +description=''' +AllMusic Server Mod +''' +# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. +[[dependencies.allmusic]] #optional + # the modid of the dependency + modId="forge" #mandatory + # Does this dependency have to exist - if not, ordering below must be specified + mandatory=true #mandatory + # The version range of the dependency + versionRange="[40,)" #mandatory + # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory + ordering="NONE" + # Side this dependency is applied on - BOTH, CLIENT or SERVER + side="SERVER" +# Here's another dependency +[[dependencies.allmusic]] + modId="minecraft" + mandatory=true +# This version range declares a minimum of the current minecraft version up to but not including the next major version + versionRange="[1.18.2,1.19)" + ordering="NONE" + side="SERVER" diff --git a/forge_1_18_2/src/main/resources/config.json b/forge_1_18_2/src/main/resources/config.json new file mode 100644 index 00000000..ec568863 --- /dev/null +++ b/forge_1_18_2/src/main/resources/config.json @@ -0,0 +1,62 @@ +{ + "MaxList": 10, + "MinVote": 3, + "Delay": 0, + "KDelay": 0, + "Admin": ["CONSOLE","Color_yr"], + "LoginUser": "", + "NoMusicServer": [], + "NoMusicPlayer": [], + "BanMusic": [], + "PlayList": [], + "PlayListSwitch": true, + "PlayListRandom": true, + "SendLyric": true, + "NeedPermission": false, + "DefaultAddMusic": 0, + "TopPAPI": false, + "MessageLimit": false, + "MessageLimitSize": 40, + "MutePlayMessage": false, + "MuteAddMessage": false, + "ShowInBar": false, + "DefaultHud": { + "List": { + "x": 2, + "y": 74 + }, + "Lyric": { + "x": 74, + "y": 53 + }, + "Info": { + "x": 74, + "y": 2 + }, + "Pic": { + "x": 2, + "y": 2 + }, + "PicRotateSpeed": 10, + "EnablePicRotate": true, + "EnableList": true, + "EnableLyric": true, + "EnableInfo": true, + "EnablePic": true + }, + "Economys": { + "MysqlUrl": "jdbc:mysql://localhost:3306/minecraft?autoReconnect=true&autoReconnectForPools=true", + "Vault": true + }, + "UseCost": false, + "SearchCost": 20, + "AddMusicCost": 10, + "MaxMusicTime": 600, + "KtvMode": true, + "MusicBR": "320000", + "FunConfig": { + "Rain": true, + "RainRate": 10 + }, + "Version": "103" +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/resources/icon.png b/forge_1_18_2/src/main/resources/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b2b5fa790ca8e14661cd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cJuCnEiEovqXHwM@h;BI+6SI~+|J@)52rCbEeNmI&Jmg>Ospkkt&>Ewtc);4+cJfU zu%Mr$1=uAd&LI5LYvZMo);@$R-3i2EPZIH!_7lE8OSR~eKW+}xoMy<5%uM^j4`cL@ z%$2jskyK8O*VstfRjVQcw^wQlP-GrtQq;SYhD?WA*0mg0{ZyUW@IorZr_70xbdr0+ zl-0O}L=OY$Lms+RypSNm>g}5vuu9!}e^e5wWfHW1zUGrf5)f3X7ic>Jj0^?SwR*U` zp7T{dZD7?dCV{iIx`A0r`uTyHch_4{iYyczoIP_2KVra7?b3$YA$*AfQZEyzP;X;x z!(X5cqw4kBiVhTR6;n>JYGt^nG+(&z2tWHkfc&h16_9!5_s_)8_2|MT!<1Q z^3Y!}<)2RS_UT>*lA!4coxB0TwZf%!a{ZFHyjj-_f{Y{wDj1DOr*KPs@Ll~;NKfSG zNTsS5Uv1>3`qmzN!J`=2rI|89NFp8_3tJ`Hkj3=5hPK`d3>czVkcX_LVNK4!z?cCs z24IHhKl2tXzLZkp}r2p*5*(-b$n2d@Q^VJPQC1L{`^@#08>83Frl6n zf}|OnwW3vWOZMpbOD-6E zDvLN?UkC%Cr%xV}Y2zEVkO8>EMWPbRbf7k_x4h~L_KC;$Ke07*qoM6N<$f}Y2R=Kufz literal 0 HcmV?d00001 diff --git a/forge_1_18_2/src/main/resources/message.json b/forge_1_18_2/src/main/resources/message.json new file mode 100644 index 00000000..6a435a90 --- /dev/null +++ b/forge_1_18_2/src/main/resources/message.json @@ -0,0 +1,136 @@ +{ + "MusicPlay": { + "StopPlay": "§d[AllMusic]§e已停止你的音乐播放", + "NoMusic": "§d[AllMusic]§e无正在播放的歌曲", + "Play": "§d[AllMusic]§e正在播放:%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia% | by: %PlayerName%", + "NoPlay": "§d[AllMusic]§e队列中无歌曲", + "ListMusic": { + "Head": "§d[AllMusic]§e队列中有歌曲数:&Count&", + "Item": "§e%index%->%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia%", + "Get": "§d[AllMusic]§e歌曲列表%ListName%获取成功" + }, + "NoCanPlay": "§d[AllMusic]§c无法播放歌曲%MusicID%可能该歌曲为VIP歌曲", + "NoPlayMusic": "§d[AllMusic]§e你不会再收到点歌了!想要再次参与点歌就点一首歌或者参与切歌投票吧!", + "Switch": "§d[AllMusic]§e切换到玩家歌曲", + "AddMusic": "§d[AllMusic]§e音乐列表添加%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia%", + "CheckMusic": "§d[AllMusic]§2正在解析歌曲%MusicID%", + "MusicInfo": "%MusicName% | %MusicAuthor% | %MusicAl% | %MusicAlia% | by: %PlayerName%", + "Trail": "§d[AllMusic]§e该音乐为试听音乐", + "Cancel": "§d[AllMusic]§e播放被取消" + }, + "AddMusic": { + "ListFull": "§d[AllMusic]§c错误,队列已满", + "BanMusic": "§d[AllMusic]§c错误,这首歌被禁点了", + "ExistMusic": "§d[AllMusic]§c错误,这首歌已经存在了", + "Success": "§d[AllMusic]§e点歌成功", + "NoPlayer": "§d[AllMusic]§c没有播放的玩家", + "NoID": "§d[AllMusic]§c错误,请输入歌曲数字ID", + "Cancel": "§d[AllMusic]§e点歌被取消", + "TimeOut": "§d[AllMusic]§e点歌被取消,音乐长度过长" + }, + "Page": { + "Choice": "§e%index%->%MusicName% | %MusicAuthor% | %MusicAl%", + "Next": "§e[§n点我下一页§r§e]", + "Last": "§e[§n点我上一页§r§e]" + }, + "Lyric": { + "Data": "%Lyric%", + "TData": "%Lyric%(%TLyric%)" + }, + "Vote": { + "NoPermission": "§d[AllMusic]§c你没有权限切歌", + "DoVote": "§d[AllMusic]§e已发起切歌投票", + "BQ": "§d[AllMusic]§e%PlayerName%发起了切歌投票,30秒后结束,输入/music vote 同意切歌。", + "Agree": "§d[AllMusic]§e你同意切歌", + "BQAgree": "§d[AllMusic]§e%PlayerName%同意切歌,共有%Count%名玩家同意切歌。", + "ARAgree": "§d[AllMusic]§e你已申请切歌", + "TimeOut": "§d[AllMusic]§e切歌时间结束", + "Do": "§d[AllMusic]§e已切歌" + }, + "Search": { + "StartSearch": "§d[AllMusic]§e正在排队搜歌", + "NoPer": "§d[AllMusic]§c你没有权限搜歌", + "CantSearch": "§d[AllMusic]§c无法搜索歌曲:%Music%", + "Res": "§d[AllMusic]§e搜索结果", + "NoSearch": "§d[AllMusic]§c你没有搜索音乐", + "ErrorNum": "§d[AllMusic]§c请输入正确的序号", + "Chose": "§d[AllMusic]§e你选择了序号%Num%", + "CantNext": "§d[AllMusic]§c无法下一页", + "CantLast": "§d[AllMusic]§c无法上一页" + }, + "Hud": { + "State": "§d[AllMusic]§e设置信息位置:%Hud%,状态:%State%", + "Set": "§d[AllMusic]§e已设置%Hud%的坐标为%x%, %y%", + "Reset": "§d[AllMusic]§eHud恢复至默认位置", + "NoMusic": "没有播放的音乐", + "NoList": "队列中无歌曲", + "NoLyric": "无歌词", + "PicSize": "§d[ALLMusic]§e设置图片尺寸为%Size%", + "PicRotate": "§d[AllMusic]§2设置图片旋转为%State%", + "PicRotateSpeed": "§d[AllMusic]§2设置图片旋转速度为%Size%", + "Music": "%Name% %AllTime%/%NowTime%\n%Author%\n%Alia%\n%Al%\nby: %Player%", + "Lyric": "%Lyric%\n%Tlyric%", + "Ktv": "§e%KLyric%§f%Lyric%§r\n%Tlyric%", + "List": "播放列表里面有%Size%首歌\n%List%" + }, + "Command": { + "Error": "§d[AllMusic]§c参数错误,请输入/music help获取帮助", + "NoPer": "§d[AllMusic]§c你没有权限点歌" + }, + "HudList": { + "List": "待播放列表", + "Lyric": "歌词", + "Info": "歌曲信息", + "Pic": "图片", + "All": "所有位置", + "PicRoute": "图片旋转", + "PicRouteSpeed": "图片旋转速度" + }, + "Custom": { + "Info": "自定义音乐" + }, + "PAPI": { + "NoMusic": "没有播放的音乐" + }, + "Cost": { + "Search": "§d[AllMusic]§e你搜歌花费了%Cost%", + "AddMusic": "§d[AllMusic]§e你点歌花费了%Cost%", + "NoMoney": "§d[AllMusic]§c你没有足够的钱", + "CostFail": "§d[ALLMusic]§c扣钱过程中错误" + }, + "Click": { + "This": "§b[§n点我选择§r§b]", + "Check": "§b[§n点我查看§r§b]" + }, + "Help": { + "Normal": { + "Head": "§d[AllMusic]§e帮助手册", + "Base": "§d[AllMusic]§e使用/music [音乐ID] 来点歌", + "Stop": "§d[AllMusic]§e使用/music stop 停止播放歌曲", + "List": "§d[AllMusic]§e使用/music list 查看歌曲队列", + "Vote": "§d[AllMusic]§e使用/music vote 投票切歌", + "NoMusic": "§d[AllMusic]§e使用/music nomusic 不再参与点歌", + "Search": "§d[AllMusic]§e使用/music search [歌名] 搜索歌曲", + "Select": "§d[AllMusic]§e使用/music select [序列] 选择歌曲", + "Hud1": "§d[AllMusic]§e使用/music hud enable [位置] 启用关闭Hud", + "Hud2": "§d[AllMusic]§e使用/music hud [位置] [x] [y] 设置某个Hud的位置", + "Hud3": "§d[AllMusic]§e使用/music hud picsize [尺寸] 设置图片尺寸", + "Hud4": "§d[AllMusic]§e使用/music hud picrotate [开关] 设置图片旋转模式", + "Hud5": "§d[AllMusic]§e使用/music hud picrotatespeed [数值] 设置图片旋转速度" + }, + "Admin": { + "Reload": "§d[AllMusic]§e使用/music reload 重读配置文件", + "Next": "§d[AllMusic]§e使用/music next 强制切歌", + "Ban": "§d[AllMusic]§e使用/music ban [ID] 禁止点这首歌", + "Url": "§d[AllMusic]§e使用/music url [url] 播放一首自定义歌曲", + "Delete": "§d[AllMusic]§e使用/music delete [序号] 删除队列中的歌曲", + "AddList": "§d[AllMusic]§e使用/music addlist [歌单ID] 添加歌单到空闲列表", + "ClearList": "§d[AllMusic]§e使用/music clearlist 清空空闲歌单", + "Login": "§d[AllMusic]§e使用/music login 重新登录账户" + } + }, + "Fun": { + "Rain": "§d[AllMusic]§e天空开始变得湿润" + }, + "Version": "103" +} \ No newline at end of file diff --git a/forge_1_18_2/src/main/resources/pack.mcmeta b/forge_1_18_2/src/main/resources/pack.mcmeta new file mode 100644 index 00000000..6f2f48b7 --- /dev/null +++ b/forge_1_18_2/src/main/resources/pack.mcmeta @@ -0,0 +1,8 @@ +{ + "pack": { + "description": "examplemod resources", + "pack_format": 9, + "forge:resource_pack_format": 8, + "forge:data_pack_format": 9 + } +} diff --git a/link.cmd b/link.cmd index 1623efdb..3e028a8b 100644 --- a/link.cmd +++ b/link.cmd @@ -1,5 +1,6 @@ mklink /j "server/src/main/java/coloryr/allmusic/core" "core" mklink /j "forge_1_19_3/src/main/java/coloryr/allmusic/core" "core" +mklink /j "forge_1_18_2/src/main/java/coloryr/allmusic/core" "core" mklink /j "forge_1_16_5/src/main/java/coloryr/allmusic/core" "core" mklink /j "fabric_1_19_3/src/main/java/coloryr/allmusic/core" "core" mklink /j "fabric_1_19_2/src/main/java/coloryr/allmusic/core" "core" @@ -8,6 +9,7 @@ mklink /j "fabric_1_16_5/src/main/java/coloryr/allmusic/core" "core" mklink /j "server/build" "build" mklink /j "forge_1_19_3/build" "build" +mklink /j "forge_1_18_2/build" "build" mklink /j "forge_1_16_5/build" "build" mklink /j "fabric_1_19_3/build" "build" mklink /j "fabric_1_19_2/build" "build" @@ -16,6 +18,7 @@ mklink /j "fabric_1_16_5/build" "build" mklink /j "server/.gradle" ".gradle" mklink /j "forge_1_19_3/.gradle" ".gradle" +mklink /j "forge_1_18_2/.gradle" ".gradle" mklink /j "forge_1_16_5/.gradle" ".gradle" mklink /j "fabric_1_19_3/.gradle" ".gradle" mklink /j "fabric_1_19_2/.gradle" ".gradle"