4 Commits

Author SHA1 Message Date
LiuEnder
a3f3a23c42 perf(recipe): 将永久魔镜配方中烈焰棒替换为回响碎片,提升配方稀有度;版本号升至1.0.2
All checks were successful
Build / build (push) Successful in 8m20s
2026-04-27 18:58:17 +08:00
LiuEnder
6b558f34b4 发布 1.0.1
Some checks failed
Build / build (push) Has been cancelled
2026-04-26 21:11:38 +08:00
LiuEnder
0a0333faed 修复服务端加载客户端界面类崩溃
Some checks failed
Build / build (push) Has been cancelled
2026-04-26 20:24:59 +08:00
LiuEnder
a88ac00cde 修正工作流错误
Some checks failed
Build / build (push) Has been cancelled
2026-04-26 17:49:54 +08:00
7 changed files with 29 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ jobs:
distribution: 'temurin' distribution: 'temurin'
- name: Setup Gradle - name: Setup Gradle
uses: gradle/actions/setup-gradle@v4 uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew build run: ./gradlew build

View File

@@ -43,7 +43,7 @@ mod包名为com.le.teleportmirror 。
### 永久回城魔镜 ### 永久回城魔镜
潜影壳 紫颂果 潜影壳 潜影壳 紫颂果 潜影壳
末影珍珠 高级回城魔镜 末影珍珠 末影珍珠 高级回城魔镜 末影珍珠
潜影壳 烈焰棒 潜影壳 潜影壳 回响碎片 潜影壳
## 传送魔镜 ## 传送魔镜
### 初级传送魔镜 ### 初级传送魔镜
@@ -64,7 +64,7 @@ mod包名为com.le.teleportmirror 。
### 永久传送魔镜 ### 永久传送魔镜
潜影壳 紫颂果 潜影壳 潜影壳 紫颂果 潜影壳
末影珍珠 高级传送魔镜 末影珍珠 末影珍珠 高级传送魔镜 末影珍珠
潜影壳 烈焰棒 潜影壳 潜影壳 回响碎片 潜影壳
# 五、特殊机制 # 五、特殊机制
待定(保留接口,暂时不实装):一次性魔镜:低成本、低副作用(例如红石+青金石合成),用后即毁。 待定(保留接口,暂时不实装):一次性魔镜:低成本、低副作用(例如红石+青金石合成),用后即毁。

View File

@@ -32,7 +32,7 @@ mod_name=Teleport Mirror
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT mod_license=MIT
# The mod version. See https://semver.org/ # The mod version. See https://semver.org/
mod_version=1.0.0 mod_version=1.0.2
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources. # This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html # See https://maven.apache.org/guides/mini/guide-naming-conventions.html

View File

@@ -1,7 +1,5 @@
package com.le.teleportmirror; package com.le.teleportmirror;
import com.le.teleportmirror.screen.PlayerSelectionScreen;
import net.minecraft.client.Minecraft;
import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec; import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
@@ -63,9 +61,13 @@ public class MirrorNetwork {
private static void handleOpenSelection(OpenPlayerSelectionPayload payload, IPayloadContext context) { private static void handleOpenSelection(OpenPlayerSelectionPayload payload, IPayloadContext context) {
context.enqueueWork(() -> { context.enqueueWork(() -> {
Minecraft client = Minecraft.getInstance(); try {
MirrorTier tier = MirrorTier.valueOf(payload.tierName.toUpperCase()); Class<?> clientHandlerClass = Class.forName("com.le.teleportmirror.MirrorNetworkClient");
client.setScreen(new PlayerSelectionScreen(payload.playerNames, payload.playerUuids, tier)); clientHandlerClass.getMethod("openPlayerSelection", OpenPlayerSelectionPayload.class)
.invoke(null, payload);
} catch (ReflectiveOperationException e) {
throw new RuntimeException("Failed to open player selection screen", e);
}
}); });
} }

View File

@@ -0,0 +1,16 @@
package com.le.teleportmirror;
import com.le.teleportmirror.screen.PlayerSelectionScreen;
import net.minecraft.client.Minecraft;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public class MirrorNetworkClient {
public static void openPlayerSelection(MirrorNetwork.OpenPlayerSelectionPayload payload) {
Minecraft client = Minecraft.getInstance();
MirrorTier tier = MirrorTier.valueOf(payload.tierName().toUpperCase());
client.setScreen(new PlayerSelectionScreen(payload.playerNames(), payload.playerUuids(), tier));
}
}

View File

@@ -10,7 +10,7 @@
"C": { "item": "minecraft:chorus_fruit" }, "C": { "item": "minecraft:chorus_fruit" },
"E": { "item": "minecraft:ender_pearl" }, "E": { "item": "minecraft:ender_pearl" },
"R": { "item": "teleportmirror:advanced_return_mirror" }, "R": { "item": "teleportmirror:advanced_return_mirror" },
"B": { "item": "minecraft:blaze_rod" } "B": { "item": "minecraft:echo_shard" }
}, },
"result": { "result": {
"id": "teleportmirror:permanent_return_mirror", "id": "teleportmirror:permanent_return_mirror",

View File

@@ -10,7 +10,7 @@
"C": { "item": "minecraft:chorus_fruit" }, "C": { "item": "minecraft:chorus_fruit" },
"E": { "item": "minecraft:ender_pearl" }, "E": { "item": "minecraft:ender_pearl" },
"R": { "item": "teleportmirror:advanced_teleport_mirror" }, "R": { "item": "teleportmirror:advanced_teleport_mirror" },
"B": { "item": "minecraft:blaze_rod" } "B": { "item": "minecraft:echo_shard" }
}, },
"result": { "result": {
"id": "teleportmirror:permanent_teleport_mirror", "id": "teleportmirror:permanent_teleport_mirror",