mirror of
https://github.com/Coloryr/AllMusic.git
synced 2026-11-08 18:54:44 +00:00
添加onejar,修复26.1关闭游戏问题
This commit is contained in:
1 parent
f607dcde63
commit
2fe0c71d72
46 files changed
+665
-112
No files matched your search
@@ -8,6 +8,7 @@ import com.coloryr.allmusic.client.core.render.TextureRender;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -188,5 +189,7 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
RenderSystem.recordRenderCall(AllMusicCore::renderInit);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.coloryr.allmusic.client.core.render.TextFrameBuffer;
|
||||
import com.coloryr.allmusic.client.core.render.TextureRender;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -122,5 +123,7 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
RenderSystem.recordRenderCall(AllMusicCore::renderInit);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.coloryr.allmusic.client.core.render.TextureRender;
|
||||
import com.coloryr.allmusic.comm.MusicCodec;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -122,6 +123,8 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
});
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
RenderSystem.recordRenderCall(() -> AllMusicCore.renderInit());
|
||||
RenderSystem.recordRenderCall(AllMusicCore::renderInit);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.coloryr.allmusic.client.core.render.TextFrameBuffer;
|
||||
import com.coloryr.allmusic.client.core.render.TextureRender;
|
||||
import com.coloryr.allmusic.comm.MusicCodec;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -119,5 +120,7 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
});
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.coloryr.allmusic.client.core.render.TextureRender;
|
||||
import com.coloryr.allmusic.comm.MusicCodec;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -122,6 +123,8 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
});
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
RenderSystem.recordRenderCall(() -> AllMusicCore.renderInit());
|
||||
RenderSystem.recordRenderCall(AllMusicCore::renderInit);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.coloryr.allmusic.client.core.render.TextureRender;
|
||||
import com.coloryr.allmusic.comm.MusicCodec;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -122,6 +123,8 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
});
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
RenderSystem.recordRenderCall(() -> AllMusicCore.renderInit());
|
||||
RenderSystem.recordRenderCall(AllMusicCore::renderInit);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.coloryr.allmusic.client.core.render.TextFrameBuffer;
|
||||
import com.coloryr.allmusic.client.core.render.TextureRender;
|
||||
import com.coloryr.allmusic.comm.MusicCodec;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -117,5 +118,7 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
});
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.coloryr.allmusic.client.core.render.TextFrameBuffer;
|
||||
import com.coloryr.allmusic.client.core.render.TextureRender;
|
||||
import com.coloryr.allmusic.comm.MusicCodec;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -117,5 +118,7 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
});
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,9 @@ import com.coloryr.allmusic.comm.MusicCodec;
|
||||
import com.mojang.blaze3d.textures.GpuTexture;
|
||||
import com.mojang.blaze3d.textures.GpuTextureView;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiGraphicsExtractor;
|
||||
@@ -26,9 +28,7 @@ import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
public static final String MODID = "allmusic_client";
|
||||
public static final Identifier ID = Identifier.fromNamespaceAndPath("allmusic", "channel");
|
||||
public static final Logger LOGGER = LogManager.getLogger("AllMusic Client");
|
||||
public static boolean modui;
|
||||
public static GuiGraphicsExtractor context;
|
||||
|
||||
public static void update(GuiGraphicsExtractor draw) {
|
||||
@@ -117,17 +117,10 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
ClientPlayNetworking.registerGlobalReceiver(MusicCodec.ID, (pack, handler) -> {
|
||||
AllMusicCore.packDo(pack.pack());
|
||||
});
|
||||
|
||||
if (FabricLoader.getInstance().isModLoaded("modernui")) {
|
||||
modui = true;
|
||||
}
|
||||
if (FabricLoader.getInstance().isModLoaded("modernui")) {
|
||||
modui = true;
|
||||
}
|
||||
ClientPlayNetworking.registerGlobalReceiver(MusicCodec.ID, (pack, handler) -> AllMusicCore.packDo(pack.pack()));
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.coloryr.allmusic.client.others;
|
||||
|
||||
import icyllis.modernui.mc.text.ModernPreparedText;
|
||||
import net.minecraft.client.gui.Font;
|
||||
import net.minecraft.client.gui.navigation.ScreenRectangle;
|
||||
import net.minecraft.client.renderer.state.gui.GuiRenderState;
|
||||
import org.joml.Matrix3x2fc;
|
||||
|
||||
public class ModernUI {
|
||||
public static void text(Font.PreparedText preparedText, GuiRenderState state, Matrix3x2fc pose, ScreenRectangle scissor) {
|
||||
if (preparedText instanceof ModernPreparedText) {
|
||||
((ModernPreparedText) preparedText).submitRuns(state, pose, scissor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ dependencies {
|
||||
|
||||
implementation("net.fabricmc.fabric-api:fabric-api:0.152.1+26.2")
|
||||
|
||||
// compileOnly("icyllis.modernui:ModernUI-Fabric:26.1.2-3.13.0.4")
|
||||
compileOnly("de.maxhenkel.voicechat:voicechat-api:2.6.0")
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.coloryr.allmusic.comm.MusicCodec;
|
||||
import com.mojang.blaze3d.textures.GpuTexture;
|
||||
import com.mojang.blaze3d.textures.GpuTextureView;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -26,9 +27,7 @@ import java.nio.charset.StandardCharsets;
|
||||
|
||||
public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
public static final String MODID = "allmusic_client";
|
||||
public static final Identifier ID = Identifier.fromNamespaceAndPath("allmusic", "channel");
|
||||
public static final Logger LOGGER = LogManager.getLogger("AllMusic Client");
|
||||
public static boolean modui;
|
||||
public static GuiGraphicsExtractor context;
|
||||
|
||||
public static void update(GuiGraphicsExtractor draw) {
|
||||
@@ -117,17 +116,10 @@ public class AllMusicClient implements ClientModInitializer, AllMusicBridge {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
ClientPlayNetworking.registerGlobalReceiver(MusicCodec.ID, (pack, handler) -> {
|
||||
AllMusicCore.packDo(pack.pack());
|
||||
});
|
||||
|
||||
if (FabricLoader.getInstance().isModLoaded("modernui")) {
|
||||
modui = true;
|
||||
}
|
||||
if (FabricLoader.getInstance().isModLoaded("modernui")) {
|
||||
modui = true;
|
||||
}
|
||||
ClientPlayNetworking.registerGlobalReceiver(MusicCodec.ID, (pack, handler) -> AllMusicCore.packDo(pack.pack()));
|
||||
|
||||
AllMusicCore.init(FabricLoader.getInstance().getConfigDir(), this);
|
||||
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register((a) -> AllMusicCore.stop());
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
//package com.coloryr.allmusic.client.others;
|
||||
//
|
||||
//import icyllis.modernui.mc.text.ModernPreparedText;
|
||||
//import net.minecraft.client.gui.Font;
|
||||
//import net.minecraft.client.gui.navigation.ScreenRectangle;
|
||||
//import net.minecraft.client.renderer.state.gui.GuiRenderState;
|
||||
//import org.joml.Matrix3x2fc;
|
||||
//
|
||||
//public class ModernUI {
|
||||
// public static void text(Font.PreparedText preparedText, GuiRenderState state, Matrix3x2fc pose, ScreenRectangle scissor) {
|
||||
// if (preparedText instanceof ModernPreparedText) {
|
||||
// ((ModernPreparedText) preparedText).submitRuns(state, pose, scissor);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -134,6 +134,15 @@ public class AllMusicCore {
|
||||
ctx.updateLoggers(config);
|
||||
}
|
||||
|
||||
public static void stop() {
|
||||
if (player != null) {
|
||||
player.stop();
|
||||
}
|
||||
if (hud != null) {
|
||||
hud.stop();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化核心
|
||||
*
|
||||
|
||||
@@ -77,9 +77,10 @@ public class AllMusicHud {
|
||||
private float lyricState = 0.0f;
|
||||
private long lyricTime = -1;
|
||||
private int lyricWidth;
|
||||
private int pgOffset;
|
||||
private float picScale;
|
||||
private final int pgOffset;
|
||||
private final float picScale;
|
||||
private BufferedImage bg2;
|
||||
private boolean isRun;
|
||||
|
||||
/**
|
||||
* 是否有图片
|
||||
@@ -105,6 +106,8 @@ public class AllMusicHud {
|
||||
public AllMusicHud(int size) {
|
||||
this.size = size;
|
||||
|
||||
isRun = true;
|
||||
|
||||
Thread thread = new Thread(this::run);
|
||||
thread.setName("allmusic_pic");
|
||||
thread.start();
|
||||
@@ -146,6 +149,10 @@ public class AllMusicHud {
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
isRun = false;
|
||||
}
|
||||
|
||||
public static BufferedImage resizeImage(BufferedImage originalImage, int targetWidth, int targetHeight) {
|
||||
Image resultingImage = originalImage.getScaledInstance(targetWidth, targetHeight, Image.SCALE_AREA_AVERAGING);
|
||||
BufferedImage outputImage = new BufferedImage(targetWidth, targetHeight, BufferedImage.TYPE_INT_ARGB);
|
||||
@@ -376,10 +383,22 @@ public class AllMusicHud {
|
||||
* 网络线程
|
||||
*/
|
||||
private void run() {
|
||||
if (isRun) {
|
||||
return;
|
||||
}
|
||||
while (true) {
|
||||
try {
|
||||
if (!isRun) {
|
||||
return;
|
||||
}
|
||||
semaphore.acquire();
|
||||
if (!isRun) {
|
||||
return;
|
||||
}
|
||||
while (!urlList.isEmpty()) {
|
||||
if (!isRun) {
|
||||
return;
|
||||
}
|
||||
String picUrl = urlList.poll();
|
||||
if (picUrl != null) {
|
||||
loadPic(picUrl);
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.coloryr.allmusic.client.core.player.decoder.mp3.Mp3Decoder;
|
||||
import com.coloryr.allmusic.client.core.player.decoder.ogg.OggDecoder;
|
||||
import org.apache.hc.client5.http.classic.methods.HttpGet;
|
||||
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
|
||||
import org.apache.hc.core5.http.ConnectionClosedException;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.apache.hc.core5.io.CloseMode;
|
||||
import org.lwjgl.BufferUtils;
|
||||
@@ -18,8 +17,6 @@ import org.lwjgl.openal.AL10;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
@@ -33,7 +30,7 @@ public class AllMusicPlayer extends InputStream {
|
||||
|
||||
private final Stack<PlayTaskObj> tasks = new Stack<>();
|
||||
private final Semaphore semaphore = new Semaphore(0);
|
||||
private final Semaphore semaphore1 = new Semaphore(0);
|
||||
private final Semaphore semaphoreReload = new Semaphore(0);
|
||||
|
||||
private PlayTaskObj nowTask;
|
||||
private CloseableHttpResponse response;
|
||||
@@ -44,8 +41,6 @@ public class AllMusicPlayer extends InputStream {
|
||||
private boolean isPlay = false;
|
||||
private boolean wait = false;
|
||||
private int index = -1;
|
||||
private int frequency;
|
||||
private int channels;
|
||||
private IntBuffer source;
|
||||
private long local;
|
||||
private boolean isRun;
|
||||
@@ -57,17 +52,24 @@ public class AllMusicPlayer extends InputStream {
|
||||
this.source = source;
|
||||
new Thread(this::run, "allmusic_run").start();
|
||||
scheduler = Executors.newSingleThreadScheduledExecutor();
|
||||
scheduler.scheduleAtFixedRate(this::run1, 0, 10, TimeUnit.MILLISECONDS);
|
||||
scheduler.scheduleAtFixedRate(this::timerTick, 0, 10, TimeUnit.MILLISECONDS);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
isRun = false;
|
||||
semaphore.release();
|
||||
semaphoreReload.release();
|
||||
scheduler.close();
|
||||
}
|
||||
|
||||
public void setChat() {
|
||||
isChat = true;
|
||||
}
|
||||
|
||||
public void run1() {
|
||||
public void timerTick() {
|
||||
if (isPlay && nowTask != null) {
|
||||
nowTask.time += 10;
|
||||
}
|
||||
@@ -134,7 +136,13 @@ public class AllMusicPlayer extends InputStream {
|
||||
isRun = true;
|
||||
while (true) {
|
||||
try {
|
||||
if (!isRun) {
|
||||
return;
|
||||
}
|
||||
semaphore.acquire();
|
||||
if (!isRun) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (index == -1) {
|
||||
index = AL10.alGenSources();
|
||||
@@ -182,8 +190,8 @@ public class AllMusicPlayer extends InputStream {
|
||||
}
|
||||
|
||||
isPlay = true;
|
||||
frequency = decoder.getOutputFrequency();
|
||||
channels = decoder.getOutputChannels();
|
||||
int frequency = decoder.getOutputFrequency();
|
||||
int channels = decoder.getOutputChannels();
|
||||
if (channels != 1 && channels != 2) continue;
|
||||
if (nowTask.time != 0) {
|
||||
decoder.set(nowTask.time);
|
||||
@@ -266,7 +274,10 @@ public class AllMusicPlayer extends InputStream {
|
||||
|
||||
if (!reload) {
|
||||
wait = true;
|
||||
if (semaphore1.tryAcquire(500, TimeUnit.MILLISECONDS)) {
|
||||
if (semaphoreReload.tryAcquire(500, TimeUnit.MILLISECONDS)) {
|
||||
if (!isRun) {
|
||||
break;
|
||||
}
|
||||
if (reload) {
|
||||
tasks.push(nowTask);
|
||||
semaphore.release();
|
||||
@@ -298,7 +309,7 @@ public class AllMusicPlayer extends InputStream {
|
||||
public void tick() {
|
||||
if (wait) {
|
||||
wait = false;
|
||||
semaphore1.release();
|
||||
semaphoreReload.release();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@ plugins {
|
||||
id("fabric-loom") version Versions.fabricLoom
|
||||
}
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||
java.targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
// 直接引用 client 和 server 模块的源码目录,无需手动复制
|
||||
val clientSourceDir = project(":client:fabric_1_20_1").projectDir.resolve("src/main/java")
|
||||
val serverSourceDir = project(":server:fabric_1_20_1").projectDir.resolve("src/main/java")
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
plugins {
|
||||
id("fabric-loom") version Versions.fabricLoom
|
||||
}
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_21
|
||||
java.targetCompatibility = JavaVersion.VERSION_21
|
||||
|
||||
// 直接引用 client 和 server 模块的源码目录,无需手动复制
|
||||
val clientSourceDir = project(":client:fabric_1_21").projectDir.resolve("src/main/java/com/coloryr/allmusic/client")
|
||||
val serverSourceDir = project(":server:fabric_1_21").projectDir.resolve("src/main/java/com/coloryr/allmusic/server")
|
||||
val commSourceDir = project(":server:fabric_1_21").projectDir.resolve("src/main/java/com/coloryr/allmusic/comm")
|
||||
val clientResDir = project(":client:fabric_1_21").projectDir.resolve("src/main/resources")
|
||||
val serverResDir = project(":server:fabric_1_21").projectDir.resolve("src/main/resources")
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
setSrcDirs(listOf(clientSourceDir, serverSourceDir, commSourceDir))
|
||||
}
|
||||
resources {
|
||||
setSrcDirs(listOf(
|
||||
file("src/main/resources"), // onejar 自己的合并资源(fabric.mod.json)
|
||||
clientResDir,
|
||||
serverResDir
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft("com.mojang:minecraft:1.21")
|
||||
mappings(loom.officialMojangMappings())
|
||||
modImplementation("net.fabricmc:fabric-loader:0.16.10")
|
||||
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:0.100.1+1.21")
|
||||
|
||||
modImplementation(include("net.kyori:adventure-platform-fabric:5.14.1")!!)
|
||||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
// onejar 自己的 fabric.mod.json 优先(排在 srcDirs 第一位),
|
||||
// client/server 的 fabric.mod.json 作为重复项被排除
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand(
|
||||
"version" to project.version
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
remapJar {
|
||||
inputFile.set(shadowJar.get().archiveFile)
|
||||
|
||||
archiveFileName.set("[fabric-1.21]AllMusic-${project.version}.jar")
|
||||
destinationDirectory.set(file("${parent!!.projectDir}/../build"))
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(remapJar)
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "allmusic",
|
||||
"version": "${version}",
|
||||
"name": "AllMusic",
|
||||
"description": "AllMusic Mod",
|
||||
"authors": [
|
||||
"Color_yr"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://github.com/Coloryr/AllMusic",
|
||||
"sources": "https://github.com/Coloryr/AllMusic"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"icon": "assets/allmusic/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
],
|
||||
"client": [
|
||||
"com.coloryr.allmusic.client.AllMusicClient"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"allmusic_server.mixins.json",
|
||||
"allmusic_client.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.19.3",
|
||||
"fabric": "*",
|
||||
"minecraft": ">=1.21"
|
||||
},
|
||||
"suggests": {}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
plugins {
|
||||
id("fabric-loom") version Versions.fabricLoom
|
||||
}
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_21
|
||||
java.targetCompatibility = JavaVersion.VERSION_21
|
||||
|
||||
// 直接引用 client 和 server 模块的源码目录,无需手动复制
|
||||
val clientSourceDir = project(":client:fabric_1_21_11").projectDir.resolve("src/main/java/com/coloryr/allmusic/client")
|
||||
val serverSourceDir = project(":server:fabric_1_21_11").projectDir.resolve("src/main/java/com/coloryr/allmusic/server")
|
||||
val commSourceDir = project(":server:fabric_1_21_11").projectDir.resolve("src/main/java/com/coloryr/allmusic/comm")
|
||||
val clientResDir = project(":client:fabric_1_21_11").projectDir.resolve("src/main/resources")
|
||||
val serverResDir = project(":server:fabric_1_21_11").projectDir.resolve("src/main/resources")
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
setSrcDirs(listOf(clientSourceDir, serverSourceDir, commSourceDir))
|
||||
}
|
||||
resources {
|
||||
setSrcDirs(listOf(
|
||||
file("src/main/resources"), // onejar 自己的合并资源(fabric.mod.json)
|
||||
clientResDir,
|
||||
serverResDir
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft("com.mojang:minecraft:1.21.11")
|
||||
mappings(loom.officialMojangMappings())
|
||||
modImplementation("net.fabricmc:fabric-loader:0.18.6")
|
||||
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:0.141.3+1.21.11")
|
||||
|
||||
modImplementation(include("net.kyori:adventure-platform-fabric:6.8.0")!!)
|
||||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
// onejar 自己的 fabric.mod.json 优先(排在 srcDirs 第一位),
|
||||
// client/server 的 fabric.mod.json 作为重复项被排除
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand(
|
||||
"version" to project.version
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
remapJar {
|
||||
inputFile.set(shadowJar.get().archiveFile)
|
||||
|
||||
archiveFileName.set("[fabric-1.21.11]AllMusic-${project.version}.jar")
|
||||
destinationDirectory.set(file("${parent!!.projectDir}/../build"))
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(remapJar)
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "allmusic_client",
|
||||
"version": "${version}",
|
||||
"name": "AllMusic Client",
|
||||
"description": "AllMusic Client Mod",
|
||||
"authors": [
|
||||
"Color_yr"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://github.com/Coloryr/AllMusic",
|
||||
"sources": "https://github.com/Coloryr/AllMusic"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"icon": "assets/allmusic/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
],
|
||||
"client": [
|
||||
"com.coloryr.allmusic.client.AllMusicClient"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
{
|
||||
"config": "allmusic_client.mixins.json",
|
||||
"environment": "client"
|
||||
},
|
||||
{
|
||||
"config": "allmusic_server.mixins.json",
|
||||
"environment": "server"
|
||||
}
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.19.3",
|
||||
"fabric": "*",
|
||||
"minecraft": ">=1.21.11"
|
||||
},
|
||||
"suggests": {}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
plugins {
|
||||
id("fabric-loom") version Versions.fabricLoom
|
||||
}
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_21
|
||||
java.targetCompatibility = JavaVersion.VERSION_21
|
||||
|
||||
// 直接引用 client 和 server 模块的源码目录,无需手动复制
|
||||
val clientSourceDir = project(":client:fabric_1_21_6").projectDir.resolve("src/main/java/com/coloryr/allmusic/client")
|
||||
val serverSourceDir = project(":server:fabric_1_21_6").projectDir.resolve("src/main/java/com/coloryr/allmusic/server")
|
||||
val commSourceDir = project(":server:fabric_1_21_6").projectDir.resolve("src/main/java/com/coloryr/allmusic/comm")
|
||||
val clientResDir = project(":client:fabric_1_21_6").projectDir.resolve("src/main/resources")
|
||||
val serverResDir = project(":server:fabric_1_21_6").projectDir.resolve("src/main/resources")
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
setSrcDirs(listOf(clientSourceDir, serverSourceDir, commSourceDir))
|
||||
}
|
||||
resources {
|
||||
setSrcDirs(listOf(
|
||||
file("src/main/resources"), // onejar 自己的合并资源(fabric.mod.json)
|
||||
clientResDir,
|
||||
serverResDir
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft("com.mojang:minecraft:1.21.6")
|
||||
mappings(loom.officialMojangMappings())
|
||||
modImplementation("net.fabricmc:fabric-loader:0.18.6")
|
||||
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:0.128.2+1.21.6")
|
||||
|
||||
modImplementation(include("net.kyori:adventure-platform-fabric:6.6.0")!!)
|
||||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
// onejar 自己的 fabric.mod.json 优先(排在 srcDirs 第一位),
|
||||
// client/server 的 fabric.mod.json 作为重复项被排除
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand(
|
||||
"version" to project.version
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
remapJar {
|
||||
inputFile.set(shadowJar.get().archiveFile)
|
||||
|
||||
archiveFileName.set("[fabric-1.21.6]AllMusic-${project.version}.jar")
|
||||
destinationDirectory.set(file("${parent!!.projectDir}/../build"))
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(remapJar)
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "allmusic",
|
||||
"version": "${version}",
|
||||
"name": "AllMusic",
|
||||
"description": "AllMusic Mod",
|
||||
"authors": [
|
||||
"Color_yr"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://github.com/Coloryr/AllMusic",
|
||||
"sources": "https://github.com/Coloryr/AllMusic"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"icon": "assets/allmusic/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
],
|
||||
"client": [
|
||||
"com.coloryr.allmusic.client.AllMusicClient"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
{
|
||||
"config": "allmusic_client.mixins.json",
|
||||
"environment": "client"
|
||||
},
|
||||
{
|
||||
"config": "allmusic_server.mixins.json",
|
||||
"environment": "server"
|
||||
}
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.19.3",
|
||||
"fabric": "*",
|
||||
"minecraft": ">=1.21.6"
|
||||
},
|
||||
"suggests": {}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
plugins {
|
||||
id("net.fabricmc.fabric-loom") version Versions.fabricLoom
|
||||
}
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_25
|
||||
java.targetCompatibility = JavaVersion.VERSION_25
|
||||
|
||||
// 直接引用 client 和 server 模块的源码目录,无需手动复制
|
||||
val clientSourceDir = project(":client:fabric_26_1").projectDir.resolve("src/main/java/com/coloryr/allmusic/client")
|
||||
val serverSourceDir = project(":server:fabric_26_1").projectDir.resolve("src/main/java/com/coloryr/allmusic/server")
|
||||
val commSourceDir = project(":server:fabric_26_1").projectDir.resolve("src/main/java/com/coloryr/allmusic/comm")
|
||||
val clientResDir = project(":client:fabric_26_1").projectDir.resolve("src/main/resources")
|
||||
val serverResDir = project(":server:fabric_26_1").projectDir.resolve("src/main/resources")
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
setSrcDirs(listOf(clientSourceDir, serverSourceDir, commSourceDir))
|
||||
}
|
||||
resources {
|
||||
setSrcDirs(listOf(
|
||||
file("src/main/resources"), // onejar 自己的合并资源(fabric.mod.json)
|
||||
clientResDir,
|
||||
serverResDir
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft("com.mojang:minecraft:26.1")
|
||||
implementation("net.fabricmc:fabric-loader:0.18.6")
|
||||
|
||||
implementation("net.fabricmc.fabric-api:fabric-api:0.145.1+26.1")
|
||||
|
||||
compileOnly("icyllis.modernui:ModernUI-Fabric:26.1.2-3.13.0.4")
|
||||
compileOnly("de.maxhenkel.voicechat:voicechat-api:2.6.0")
|
||||
|
||||
implementation(include("net.kyori:adventure-platform-fabric:6.9.0")!!)
|
||||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
// onejar 自己的 fabric.mod.json 优先(排在 srcDirs 第一位),
|
||||
// client/server 的 fabric.mod.json 作为重复项被排除
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand(
|
||||
"version" to project.version
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveFileName.set("[fabric-26.1]AllMusic-${project.version}.jar")
|
||||
destinationDirectory.set(file("${parent!!.projectDir}/../build"))
|
||||
|
||||
// relocate("net.kyori", "com.coloryr.allmusic.libs.net.kyori")
|
||||
// relocate("com.google.gson", "com.coloryr.allmusic.libs.com.google.gson")
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "allmusic",
|
||||
"version": "${version}",
|
||||
"name": "AllMusic",
|
||||
"description": "AllMusic Mod",
|
||||
"authors": [
|
||||
"Color_yr"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://github.com/Coloryr/AllMusic",
|
||||
"sources": "https://github.com/Coloryr/AllMusic"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"icon": "assets/allmusic/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
],
|
||||
"client": [
|
||||
"com.coloryr.allmusic.client.AllMusicClient"
|
||||
],
|
||||
"voicechat": [
|
||||
"com.coloryr.allmusic.client.others.VoiceChat"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
{
|
||||
"config": "allmusic_client.mixins.json",
|
||||
"environment": "client"
|
||||
},
|
||||
{
|
||||
"config": "allmusic_server.mixins.json",
|
||||
"environment": "server"
|
||||
}
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.19.3",
|
||||
"fabric-api": "*",
|
||||
"minecraft": ">=26.1",
|
||||
"adventure-platform-fabric": ">=6.9.0"
|
||||
},
|
||||
"suggests": {
|
||||
"modernui": "*",
|
||||
"voicechat_api": "*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
plugins {
|
||||
id("net.fabricmc.fabric-loom") version Versions.fabricLoom
|
||||
}
|
||||
|
||||
java.sourceCompatibility = JavaVersion.VERSION_25
|
||||
java.targetCompatibility = JavaVersion.VERSION_25
|
||||
|
||||
// 直接引用 client 和 server 模块的源码目录,无需手动复制
|
||||
val clientSourceDir = project(":client:fabric_26_2").projectDir.resolve("src/main/java/com/coloryr/allmusic/client")
|
||||
val serverSourceDir = project(":server:fabric_26_2").projectDir.resolve("src/main/java/com/coloryr/allmusic/server")
|
||||
val commSourceDir = project(":server:fabric_26_2").projectDir.resolve("src/main/java/com/coloryr/allmusic/comm")
|
||||
val clientResDir = project(":client:fabric_26_2").projectDir.resolve("src/main/resources")
|
||||
val serverResDir = project(":server:fabric_26_2").projectDir.resolve("src/main/resources")
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
setSrcDirs(listOf(clientSourceDir, serverSourceDir, commSourceDir))
|
||||
}
|
||||
resources {
|
||||
setSrcDirs(listOf(
|
||||
file("src/main/resources"), // onejar 自己的合并资源(fabric.mod.json)
|
||||
clientResDir,
|
||||
serverResDir
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft("com.mojang:minecraft:26.2")
|
||||
implementation("net.fabricmc:fabric-loader:0.19.3")
|
||||
|
||||
implementation("net.fabricmc.fabric-api:fabric-api:0.152.1+26.2")
|
||||
|
||||
compileOnly("de.maxhenkel.voicechat:voicechat-api:2.6.0")
|
||||
|
||||
implementation(include("net.kyori:adventure-platform-fabric:7.0.0")!!)
|
||||
}
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
// onejar 自己的 fabric.mod.json 优先(排在 srcDirs 第一位),
|
||||
// client/server 的 fabric.mod.json 作为重复项被排除
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand(
|
||||
"version" to project.version
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveFileName.set("[fabric-26.2]AllMusic_Server-${project.version}.jar")
|
||||
destinationDirectory.set(file("${parent!!.projectDir}/../build"))
|
||||
|
||||
// relocate("net.kyori", "com.coloryr.allmusic.libs.net.kyori")
|
||||
// relocate("com.google.gson", "com.coloryr.allmusic.libs.com.google.gson")
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(shadowJar)
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "allmusic",
|
||||
"version": "${version}",
|
||||
"name": "AllMusic",
|
||||
"description": "AllMusic Mod",
|
||||
"authors": [
|
||||
"Color_yr"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://github.com/Coloryr/AllMusic",
|
||||
"sources": "https://github.com/Coloryr/AllMusic"
|
||||
},
|
||||
"license": "GPL-3.0",
|
||||
"icon": "assets/allmusic/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
],
|
||||
"client": [
|
||||
"com.coloryr.allmusic.client.AllMusicClient"
|
||||
],
|
||||
"voicechat": [
|
||||
"com.coloryr.allmusic.client.others.VoiceChat"
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
{
|
||||
"config": "allmusic_client.mixins.json",
|
||||
"environment": "client"
|
||||
},
|
||||
{
|
||||
"config": "allmusic_server.mixins.json",
|
||||
"environment": "server"
|
||||
}
|
||||
],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.19.3",
|
||||
"fabric-api": "*",
|
||||
"minecraft": ">=26.2",
|
||||
"adventure-platform-fabric": ">=7.0.0"
|
||||
},
|
||||
"suggests": {
|
||||
"modernui": "*",
|
||||
"voicechat_api": "*"
|
||||
}
|
||||
}
|
||||
@@ -13,14 +13,12 @@ import org.apache.logging.log4j.Logger;
|
||||
import java.io.File;
|
||||
|
||||
public class AllMusicServer implements ModInitializer {
|
||||
public static final Logger LOGGER = LogManager.getLogger("AllMusic Server");
|
||||
public static final ResourceLocation ID = new ResourceLocation("allmusic", "channel");
|
||||
public static MinecraftServer server;
|
||||
public static FabricServerAudiences audiences;
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
|
||||
AllMusic.log = new LogFabric();
|
||||
AllMusic.side = new SideFabric();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.coloryr.allmusic.server;
|
||||
|
||||
import com.coloryr.allmusic.server.core.AllMusic;
|
||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
@@ -9,12 +9,12 @@ import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class AllMusicServer implements DedicatedServerModInitializer {
|
||||
public class AllMusicServer implements ModInitializer {
|
||||
public static final ResourceLocation ID = new ResourceLocation("allmusic", "channel");
|
||||
public static MinecraftServer server;
|
||||
|
||||
@Override
|
||||
public void onInitializeServer() {
|
||||
public void onInitialize() {
|
||||
AllMusic.log = new LogFabric();
|
||||
AllMusic.side = new SideFabric();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"icon": "assets/allmusic_server/icon.png",
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"server": [
|
||||
"main": [
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -2,17 +2,18 @@ package com.coloryr.allmusic.server;
|
||||
|
||||
import com.coloryr.allmusic.server.core.AllMusic;
|
||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class AllMusicServer implements DedicatedServerModInitializer {
|
||||
public class AllMusicServer implements ModInitializer {
|
||||
public static MinecraftServer server;
|
||||
|
||||
@Override
|
||||
public void onInitializeServer() {
|
||||
public void onInitialize() {
|
||||
AllMusic.log = new LogFabric();
|
||||
AllMusic.side = new SideFabric();
|
||||
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit"
|
||||
],
|
||||
"server": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package com.coloryr.allmusic.server;
|
||||
|
||||
import com.coloryr.allmusic.server.core.AllMusic;
|
||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class AllMusicServer implements DedicatedServerModInitializer {
|
||||
public class AllMusicServer implements ModInitializer {
|
||||
public static MinecraftServer server;
|
||||
|
||||
@Override
|
||||
public void onInitializeServer() {
|
||||
public void onInitialize() {
|
||||
AllMusic.log = new LogFabric();
|
||||
AllMusic.side = new SideFabric();
|
||||
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit"
|
||||
],
|
||||
"server": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
]
|
||||
],
|
||||
},
|
||||
"mixins": [
|
||||
{
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
package com.coloryr.allmusic.server;
|
||||
|
||||
import com.coloryr.allmusic.server.core.AllMusic;
|
||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class AllMusicServer implements DedicatedServerModInitializer {
|
||||
public static final ResourceLocation ID = ResourceLocation.fromNamespaceAndPath("allmusic", "channel");
|
||||
public class AllMusicServer implements ModInitializer {
|
||||
public static MinecraftServer server;
|
||||
|
||||
@Override
|
||||
public void onInitializeServer() {
|
||||
public void onInitialize() {
|
||||
AllMusic.log = new LogFabric();
|
||||
AllMusic.side = new SideFabric();
|
||||
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit"
|
||||
],
|
||||
"server": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
]
|
||||
],
|
||||
},
|
||||
"mixins": [
|
||||
{
|
||||
|
||||
@@ -2,17 +2,18 @@ package com.coloryr.allmusic.server;
|
||||
|
||||
import com.coloryr.allmusic.server.core.AllMusic;
|
||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class AllMusicServer implements DedicatedServerModInitializer {
|
||||
public class AllMusicServer implements ModInitializer {
|
||||
public static MinecraftServer server;
|
||||
|
||||
@Override
|
||||
public void onInitializeServer() {
|
||||
public void onInitialize() {
|
||||
AllMusic.log = new LogFabric();
|
||||
AllMusic.side = new SideFabric();
|
||||
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit"
|
||||
],
|
||||
"server": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
]
|
||||
},
|
||||
@@ -31,7 +29,8 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.19.3",
|
||||
"minecraft": ">=26.1",
|
||||
"fabric-api": "*"
|
||||
"fabric-api": "*",
|
||||
"adventure-platform-fabric": ">=6.9.0"
|
||||
},
|
||||
"suggests": {
|
||||
}
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package com.coloryr.allmusic.server;
|
||||
|
||||
import com.coloryr.allmusic.server.core.AllMusic;
|
||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class AllMusicServer implements DedicatedServerModInitializer {
|
||||
public class AllMusicServer implements ModInitializer {
|
||||
public static MinecraftServer server;
|
||||
|
||||
@Override
|
||||
public void onInitializeServer() {
|
||||
public void onInitialize() {
|
||||
AllMusic.log = new LogFabric();
|
||||
AllMusic.side = new SideFabric();
|
||||
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
"environment": "*",
|
||||
"entrypoints": {
|
||||
"main": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit"
|
||||
],
|
||||
"server": [
|
||||
"com.coloryr.allmusic.comm.AllMusicInit",
|
||||
"com.coloryr.allmusic.server.AllMusicServer"
|
||||
]
|
||||
},
|
||||
@@ -31,7 +29,8 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=0.19.3",
|
||||
"minecraft": ">=26.2",
|
||||
"fabric-api": "*"
|
||||
"fabric-api": "*",
|
||||
"adventure-platform-fabric": ">=7.0.0"
|
||||
},
|
||||
"suggests": {
|
||||
}
|
||||
|
||||
@@ -59,6 +59,11 @@ include(":onejar")
|
||||
|
||||
include(":onejar:fabric_1_16_5")
|
||||
include(":onejar:fabric_1_20_1")
|
||||
include(":onejar:fabric_1_21")
|
||||
include(":onejar:fabric_1_21_6")
|
||||
include(":onejar:fabric_1_21_11")
|
||||
include(":onejar:fabric_26_1")
|
||||
include(":onejar:fabric_26_2")
|
||||
|
||||
pluginManagement {
|
||||
repositories {
|
||||
|
||||
Reference in new issue
Block a user