From 9fe2c5b5dc4e248097233860967fbf807a88a8d4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 20 Jul 2025 02:02:03 +0000 Subject: [PATCH 1/7] Initial plan From 34645acaf5fc5200a0bb279c6cdc5a4ffe6afdf6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 20 Jul 2025 02:10:36 +0000 Subject: [PATCH 2/7] Implement riding entity teleportation feature with localization support Co-authored-by: icceey <33692766+icceey@users.noreply.github.com> --- .../onlytp/command/TeleportCommand.java | 45 ++++++++++++++----- .../resources/assets/onlytp/lang/en_us.json | 1 + .../resources/assets/onlytp/lang/ja_jp.json | 1 + .../resources/assets/onlytp/lang/lzh.json | 1 + .../resources/assets/onlytp/lang/zh_cn.json | 1 + .../resources/assets/onlytp/lang/zh_hk.json | 1 + .../resources/assets/onlytp/lang/zh_tw.json | 1 + 7 files changed, 41 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/icceey/onlytp/command/TeleportCommand.java b/src/main/java/com/icceey/onlytp/command/TeleportCommand.java index 6845462..c3ff521 100644 --- a/src/main/java/com/icceey/onlytp/command/TeleportCommand.java +++ b/src/main/java/com/icceey/onlytp/command/TeleportCommand.java @@ -17,6 +17,7 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.util.RandomSource; +import net.minecraft.world.entity.Entity; import java.util.stream.IntStream; @@ -74,6 +75,10 @@ private static int execute(CommandContext context) throws Co return 0; } + // 检查玩家是否正在骑乘生物 + Entity ridingEntity = executor.getVehicle(); + boolean wasRiding = ridingEntity != null; + // 在原位置播放下界传送门音效 executor.level().playSound( null, // 发送给所有玩家,无需特定玩家 @@ -89,18 +94,38 @@ private static int execute(CommandContext context) throws Co // 在出发点生成末影人粒子效果 spawnTeleportParticles(executor, executor.serverLevel(), ParticleTypes.PORTAL); - // 执行传送 - executor.teleportTo( - targetPlayer.serverLevel(), - targetPlayer.getX(), - targetPlayer.getY(), - targetPlayer.getZ(), - targetPlayer.getYRot(), - targetPlayer.getXRot() - ); + // 目标坐标 + ServerLevel targetLevel = targetPlayer.serverLevel(); + double targetX = targetPlayer.getX(); + double targetY = targetPlayer.getY(); + double targetZ = targetPlayer.getZ(); + float targetYRot = targetPlayer.getYRot(); + float targetXRot = targetPlayer.getXRot(); + + // 如果玩家在骑乘状态,先处理骑乘生物的传送 + if (wasRiding) { + // 让玩家下马(但保持引用) + executor.stopRiding(); + + // 传送骑乘生物到目标位置 + ridingEntity.teleportTo(targetLevel, targetX, targetY, targetZ, targetYRot, targetXRot); + } + + // 执行玩家传送 + executor.teleportTo(targetLevel, targetX, targetY, targetZ, targetYRot, targetXRot); + + // 如果之前在骑乘状态,重新让玩家骑上生物 + if (wasRiding && ridingEntity.isAlive()) { + // 确保骑乘生物在同一个世界且位置正确后,让玩家重新骑上 + executor.startRiding(ridingEntity, true); + } // 发送成功消息 - source.sendSuccess(() -> translatableWithFallback("commands.onlytp.success", targetPlayer.getGameProfile().getName()), true); + if (wasRiding && ridingEntity != null && ridingEntity.isAlive()) { + source.sendSuccess(() -> translatableWithFallback("commands.onlytp.success_with_mount", targetPlayer.getGameProfile().getName()), true); + } else { + source.sendSuccess(() -> translatableWithFallback("commands.onlytp.success", targetPlayer.getGameProfile().getName()), true); + } // 通知目标玩家有人传送到了他那里 targetPlayer.sendSystemMessage(translatableWithFallback("commands.onlytp.notify_target", executor.getGameProfile().getName())); diff --git a/src/main/resources/assets/onlytp/lang/en_us.json b/src/main/resources/assets/onlytp/lang/en_us.json index fad025f..6d0d48a 100644 --- a/src/main/resources/assets/onlytp/lang/en_us.json +++ b/src/main/resources/assets/onlytp/lang/en_us.json @@ -4,6 +4,7 @@ "commands.onlytp.target_dead_offline": "Target player is dead or offline", "commands.onlytp.executor_dead_offline": "You are dead or offline, cannot teleport", "commands.onlytp.success": "Teleported to %s", + "commands.onlytp.success_with_mount": "Teleported to %s with your mount", "commands.onlytp.notify_target": "%s teleported to you" } diff --git a/src/main/resources/assets/onlytp/lang/ja_jp.json b/src/main/resources/assets/onlytp/lang/ja_jp.json index de67203..9b86b6d 100644 --- a/src/main/resources/assets/onlytp/lang/ja_jp.json +++ b/src/main/resources/assets/onlytp/lang/ja_jp.json @@ -4,6 +4,7 @@ "commands.onlytp.target_dead_offline": "対象プレイヤーが死亡またはオフラインです", "commands.onlytp.executor_dead_offline": "あなたは死亡またはオフラインのため、瞬間移動できません", "commands.onlytp.success": "%s にテレポートしました", + "commands.onlytp.success_with_mount": "乗り物と一緒に %s にテレポートしました", "commands.onlytp.notify_target": "%s があなたのところにテレポートしました" } diff --git a/src/main/resources/assets/onlytp/lang/lzh.json b/src/main/resources/assets/onlytp/lang/lzh.json index 20b35ed..0ef1ebf 100644 --- a/src/main/resources/assets/onlytp/lang/lzh.json +++ b/src/main/resources/assets/onlytp/lang/lzh.json @@ -4,5 +4,6 @@ "commands.onlytp.target_dead_offline": "彼身已殁,或形未現", "commands.onlytp.executor_dead_offline": "子身已殁,焉能徙形", "commands.onlytp.success": "已現 %s 之側", + "commands.onlytp.success_with_mount": "攜座騎而現 %s 之側", "commands.onlytp.notify_target": "%s 已臨君側" } \ No newline at end of file diff --git a/src/main/resources/assets/onlytp/lang/zh_cn.json b/src/main/resources/assets/onlytp/lang/zh_cn.json index 4850621..4ba66e5 100644 --- a/src/main/resources/assets/onlytp/lang/zh_cn.json +++ b/src/main/resources/assets/onlytp/lang/zh_cn.json @@ -4,6 +4,7 @@ "commands.onlytp.target_dead_offline": "目标玩家已死亡或已离线", "commands.onlytp.executor_dead_offline": "你已死亡或已离线,无法传送", "commands.onlytp.success": "已传送到 %s", + "commands.onlytp.success_with_mount": "已与坐骑一同传送到 %s", "commands.onlytp.notify_target": "%s 传送到了你这里" } diff --git a/src/main/resources/assets/onlytp/lang/zh_hk.json b/src/main/resources/assets/onlytp/lang/zh_hk.json index dac38e7..1f7568c 100644 --- a/src/main/resources/assets/onlytp/lang/zh_hk.json +++ b/src/main/resources/assets/onlytp/lang/zh_hk.json @@ -4,6 +4,7 @@ "commands.onlytp.target_dead_offline": "目標玩家已死亡或已離線", "commands.onlytp.executor_dead_offline": "你已死亡或已離線,無法傳送", "commands.onlytp.success": "已傳送到 %s", + "commands.onlytp.success_with_mount": "已與坐騎一同傳送到 %s", "commands.onlytp.notify_target": "%s 傳送到了你這裏" } diff --git a/src/main/resources/assets/onlytp/lang/zh_tw.json b/src/main/resources/assets/onlytp/lang/zh_tw.json index d2be29d..b718910 100644 --- a/src/main/resources/assets/onlytp/lang/zh_tw.json +++ b/src/main/resources/assets/onlytp/lang/zh_tw.json @@ -4,6 +4,7 @@ "commands.onlytp.target_dead_offline": "目標玩家已死亡或已離線", "commands.onlytp.executor_dead_offline": "你已死亡或已離線,無法傳送", "commands.onlytp.success": "已傳送到 %s", + "commands.onlytp.success_with_mount": "已與坐騎一同傳送到 %s", "commands.onlytp.notify_target": "%s 傳送到了你這裡" } From d1d99e169e5ec134848bb69dd649c78057cb4ce1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 20 Jul 2025 02:41:39 +0000 Subject: [PATCH 3/7] Fix riding entity teleportation to only teleport living entities and update README Co-authored-by: icceey <33692766+icceey@users.noreply.github.com> --- README.md | 12 ++++++++++++ .../com/icceey/onlytp/command/TeleportCommand.java | 12 +++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4c6ee5d..f1d8cb8 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ A Minecraft Forge mod that provides enhanced teleportation functionality. Easily ## Features - **Simple Commands**: Easy-to-use commands for teleporting players +- **Riding Entity Teleportation**: When teleporting while riding a living entity (horse, pig, etc.), both player and mount are teleported together - **No Dependencies**: This mod does not require any additional libraries or mods to function ## Usage @@ -12,6 +13,17 @@ A Minecraft Forge mod that provides enhanced teleportation functionality. Easily Run the following commands in-game: - `/tlp `: Teleports you to the specified player. +### Riding Entity Teleportation +When you use `/tlp` while riding a living entity (such as a horse, pig, donkey, mule, llama, camel, or strider), both you and your mount will be teleported together to the destination. The riding relationship is maintained after teleportation. + +**Supported Living Entities:** +- Horses, Donkeys, Mules +- Pigs, Striders +- Llamas, Camels +- Any other rideable living entities + +**Note:** Non-living vehicles like boats and minecarts are not teleported - only the player will be teleported in these cases. + **Note**: This mod is not recommended for use on PvP servers as it may provide unfair advantages. ## Compatibility diff --git a/src/main/java/com/icceey/onlytp/command/TeleportCommand.java b/src/main/java/com/icceey/onlytp/command/TeleportCommand.java index c3ff521..375090c 100644 --- a/src/main/java/com/icceey/onlytp/command/TeleportCommand.java +++ b/src/main/java/com/icceey/onlytp/command/TeleportCommand.java @@ -18,6 +18,7 @@ import net.minecraft.sounds.SoundSource; import net.minecraft.util.RandomSource; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; import java.util.stream.IntStream; @@ -78,6 +79,7 @@ private static int execute(CommandContext context) throws Co // 检查玩家是否正在骑乘生物 Entity ridingEntity = executor.getVehicle(); boolean wasRiding = ridingEntity != null; + boolean isRidingLivingEntity = ridingEntity instanceof LivingEntity; // 在原位置播放下界传送门音效 executor.level().playSound( @@ -102,8 +104,8 @@ private static int execute(CommandContext context) throws Co float targetYRot = targetPlayer.getYRot(); float targetXRot = targetPlayer.getXRot(); - // 如果玩家在骑乘状态,先处理骑乘生物的传送 - if (wasRiding) { + // 如果玩家在骑乘状态且骑乘的是生物,先处理骑乘生物的传送 + if (wasRiding && isRidingLivingEntity) { // 让玩家下马(但保持引用) executor.stopRiding(); @@ -114,14 +116,14 @@ private static int execute(CommandContext context) throws Co // 执行玩家传送 executor.teleportTo(targetLevel, targetX, targetY, targetZ, targetYRot, targetXRot); - // 如果之前在骑乘状态,重新让玩家骑上生物 - if (wasRiding && ridingEntity.isAlive()) { + // 如果之前在骑乘生物状态,重新让玩家骑上生物 + if (wasRiding && isRidingLivingEntity && ridingEntity.isAlive()) { // 确保骑乘生物在同一个世界且位置正确后,让玩家重新骑上 executor.startRiding(ridingEntity, true); } // 发送成功消息 - if (wasRiding && ridingEntity != null && ridingEntity.isAlive()) { + if (wasRiding && isRidingLivingEntity && ridingEntity != null && ridingEntity.isAlive()) { source.sendSuccess(() -> translatableWithFallback("commands.onlytp.success_with_mount", targetPlayer.getGameProfile().getName()), true); } else { source.sendSuccess(() -> translatableWithFallback("commands.onlytp.success", targetPlayer.getGameProfile().getName()), true); From 957840bd5fad85a8951ca334ad84a234ebfe58c5 Mon Sep 17 00:00:00 2001 From: icceey Date: Sun, 20 Jul 2025 11:55:44 +0800 Subject: [PATCH 4/7] fix build issue --- .../onlytp/command/TeleportCommand.java | 30 ++++++++----------- .../resources/assets/onlytp/lang/en_us.json | 1 - .../resources/assets/onlytp/lang/ja_jp.json | 1 - .../resources/assets/onlytp/lang/lzh.json | 1 - .../resources/assets/onlytp/lang/zh_cn.json | 1 - .../resources/assets/onlytp/lang/zh_hk.json | 1 - .../resources/assets/onlytp/lang/zh_tw.json | 1 - 7 files changed, 13 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/icceey/onlytp/command/TeleportCommand.java b/src/main/java/com/icceey/onlytp/command/TeleportCommand.java index 375090c..f9edb9e 100644 --- a/src/main/java/com/icceey/onlytp/command/TeleportCommand.java +++ b/src/main/java/com/icceey/onlytp/command/TeleportCommand.java @@ -17,8 +17,8 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.util.RandomSource; -import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.RelativeMovement; import java.util.stream.IntStream; @@ -77,9 +77,10 @@ private static int execute(CommandContext context) throws Co } // 检查玩家是否正在骑乘生物 - Entity ridingEntity = executor.getVehicle(); - boolean wasRiding = ridingEntity != null; - boolean isRidingLivingEntity = ridingEntity instanceof LivingEntity; + LivingEntity livingRidingEntity = null; + if (executor.getVehicle() instanceof LivingEntity ridingEntity) { + livingRidingEntity = ridingEntity; + } // 在原位置播放下界传送门音效 executor.level().playSound( @@ -105,29 +106,24 @@ private static int execute(CommandContext context) throws Co float targetXRot = targetPlayer.getXRot(); // 如果玩家在骑乘状态且骑乘的是生物,先处理骑乘生物的传送 - if (wasRiding && isRidingLivingEntity) { + if (livingRidingEntity != null && livingRidingEntity.isAlive()) { // 让玩家下马(但保持引用) executor.stopRiding(); - + // 传送骑乘生物到目标位置 - ridingEntity.teleportTo(targetLevel, targetX, targetY, targetZ, targetYRot, targetXRot); + livingRidingEntity.teleportTo(targetLevel, targetX, targetY, targetZ, RelativeMovement.ALL, targetYRot, targetXRot); } // 执行玩家传送 executor.teleportTo(targetLevel, targetX, targetY, targetZ, targetYRot, targetXRot); - // 如果之前在骑乘生物状态,重新让玩家骑上生物 - if (wasRiding && isRidingLivingEntity && ridingEntity.isAlive()) { + if (livingRidingEntity != null && livingRidingEntity.isAlive()) { // 确保骑乘生物在同一个世界且位置正确后,让玩家重新骑上 - executor.startRiding(ridingEntity, true); + executor.startRiding(livingRidingEntity, true); } // 发送成功消息 - if (wasRiding && isRidingLivingEntity && ridingEntity != null && ridingEntity.isAlive()) { - source.sendSuccess(() -> translatableWithFallback("commands.onlytp.success_with_mount", targetPlayer.getGameProfile().getName()), true); - } else { - source.sendSuccess(() -> translatableWithFallback("commands.onlytp.success", targetPlayer.getGameProfile().getName()), true); - } + source.sendSuccess(() -> translatableWithFallback("commands.onlytp.success", targetPlayer.getGameProfile().getName()), true); // 通知目标玩家有人传送到了他那里 targetPlayer.sendSystemMessage(translatableWithFallback("commands.onlytp.notify_target", executor.getGameProfile().getName())); @@ -153,8 +149,8 @@ private static int execute(CommandContext context) throws Co /** * 在玩家周围生成传送粒子效果 * - * @param player 作为粒子生成中心的玩家 - * @param level 要在其中生成粒子的世界 + * @param player 作为粒子生成中心的玩家 + * @param level 要在其中生成粒子的世界 * @param particleType 要生成的粒子类型 */ private static void spawnTeleportParticles(ServerPlayer player, ServerLevel level, ParticleOptions particleType) { diff --git a/src/main/resources/assets/onlytp/lang/en_us.json b/src/main/resources/assets/onlytp/lang/en_us.json index 6d0d48a..fad025f 100644 --- a/src/main/resources/assets/onlytp/lang/en_us.json +++ b/src/main/resources/assets/onlytp/lang/en_us.json @@ -4,7 +4,6 @@ "commands.onlytp.target_dead_offline": "Target player is dead or offline", "commands.onlytp.executor_dead_offline": "You are dead or offline, cannot teleport", "commands.onlytp.success": "Teleported to %s", - "commands.onlytp.success_with_mount": "Teleported to %s with your mount", "commands.onlytp.notify_target": "%s teleported to you" } diff --git a/src/main/resources/assets/onlytp/lang/ja_jp.json b/src/main/resources/assets/onlytp/lang/ja_jp.json index 9b86b6d..de67203 100644 --- a/src/main/resources/assets/onlytp/lang/ja_jp.json +++ b/src/main/resources/assets/onlytp/lang/ja_jp.json @@ -4,7 +4,6 @@ "commands.onlytp.target_dead_offline": "対象プレイヤーが死亡またはオフラインです", "commands.onlytp.executor_dead_offline": "あなたは死亡またはオフラインのため、瞬間移動できません", "commands.onlytp.success": "%s にテレポートしました", - "commands.onlytp.success_with_mount": "乗り物と一緒に %s にテレポートしました", "commands.onlytp.notify_target": "%s があなたのところにテレポートしました" } diff --git a/src/main/resources/assets/onlytp/lang/lzh.json b/src/main/resources/assets/onlytp/lang/lzh.json index 0ef1ebf..20b35ed 100644 --- a/src/main/resources/assets/onlytp/lang/lzh.json +++ b/src/main/resources/assets/onlytp/lang/lzh.json @@ -4,6 +4,5 @@ "commands.onlytp.target_dead_offline": "彼身已殁,或形未現", "commands.onlytp.executor_dead_offline": "子身已殁,焉能徙形", "commands.onlytp.success": "已現 %s 之側", - "commands.onlytp.success_with_mount": "攜座騎而現 %s 之側", "commands.onlytp.notify_target": "%s 已臨君側" } \ No newline at end of file diff --git a/src/main/resources/assets/onlytp/lang/zh_cn.json b/src/main/resources/assets/onlytp/lang/zh_cn.json index 4ba66e5..4850621 100644 --- a/src/main/resources/assets/onlytp/lang/zh_cn.json +++ b/src/main/resources/assets/onlytp/lang/zh_cn.json @@ -4,7 +4,6 @@ "commands.onlytp.target_dead_offline": "目标玩家已死亡或已离线", "commands.onlytp.executor_dead_offline": "你已死亡或已离线,无法传送", "commands.onlytp.success": "已传送到 %s", - "commands.onlytp.success_with_mount": "已与坐骑一同传送到 %s", "commands.onlytp.notify_target": "%s 传送到了你这里" } diff --git a/src/main/resources/assets/onlytp/lang/zh_hk.json b/src/main/resources/assets/onlytp/lang/zh_hk.json index 1f7568c..dac38e7 100644 --- a/src/main/resources/assets/onlytp/lang/zh_hk.json +++ b/src/main/resources/assets/onlytp/lang/zh_hk.json @@ -4,7 +4,6 @@ "commands.onlytp.target_dead_offline": "目標玩家已死亡或已離線", "commands.onlytp.executor_dead_offline": "你已死亡或已離線,無法傳送", "commands.onlytp.success": "已傳送到 %s", - "commands.onlytp.success_with_mount": "已與坐騎一同傳送到 %s", "commands.onlytp.notify_target": "%s 傳送到了你這裏" } diff --git a/src/main/resources/assets/onlytp/lang/zh_tw.json b/src/main/resources/assets/onlytp/lang/zh_tw.json index b718910..d2be29d 100644 --- a/src/main/resources/assets/onlytp/lang/zh_tw.json +++ b/src/main/resources/assets/onlytp/lang/zh_tw.json @@ -4,7 +4,6 @@ "commands.onlytp.target_dead_offline": "目標玩家已死亡或已離線", "commands.onlytp.executor_dead_offline": "你已死亡或已離線,無法傳送", "commands.onlytp.success": "已傳送到 %s", - "commands.onlytp.success_with_mount": "已與坐騎一同傳送到 %s", "commands.onlytp.notify_target": "%s 傳送到了你這裡" } From 828003eff3704597777c57be235540142373e290 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:22:40 +0000 Subject: [PATCH 5/7] Initial plan From 7bfbf4e2dc83e87b5c36c602ee9826afc97ed92d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:30:13 +0000 Subject: [PATCH 6/7] Implement bilingual README with improved content and language switching Co-authored-by: icceey <33692766+icceey@users.noreply.github.com> --- README.md | 49 +++++++++++++++++++++++++++---------------------- README_zh.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 README_zh.md diff --git a/README.md b/README.md index f1d8cb8..bb2bba9 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,43 @@ # OnlyTP -A Minecraft Forge mod that provides enhanced teleportation functionality. Easily teleport to your friends to help them. +[English](README.md) | [中文](README_zh.md) -## Features +OnlyTP is a lightweight Minecraft Forge mod that enhances your gameplay with convenient teleportation features. Whether you're exploring vast worlds or helping friends in need, OnlyTP makes traveling across your Minecraft server simple and efficient. -- **Simple Commands**: Easy-to-use commands for teleporting players -- **Riding Entity Teleportation**: When teleporting while riding a living entity (horse, pig, etc.), both player and mount are teleported together -- **No Dependencies**: This mod does not require any additional libraries or mods to function +## ✨ Features -## Usage +- **🎯 Simple Commands**: Intuitive teleportation with easy-to-remember commands +- **🌟 Enhanced Experience**: Teleport with elegant particle effects and sound feedback +- **🔐 Smart Safety Checks**: Prevents teleporting to offline, dead, or disconnected players +- **⚡ Zero Dependencies**: No additional mods or libraries required - just install and play +- **🌐 Multiplayer Ready**: Perfect for collaborative gameplay and server environments -Run the following commands in-game: -- `/tlp `: Teleports you to the specified player. +## 🎮 Usage -### Riding Entity Teleportation -When you use `/tlp` while riding a living entity (such as a horse, pig, donkey, mule, llama, camel, or strider), both you and your mount will be teleported together to the destination. The riding relationship is maintained after teleportation. +### Basic Command +- **`/tlp `**: Teleports you to the specified online player -**Supported Living Entities:** -- Horses, Donkeys, Mules -- Pigs, Striders -- Llamas, Camels -- Any other rideable living entities +### Features in Action +- **Particle Effects**: Beautiful portal particles appear at both departure and arrival locations +- **Sound Feedback**: Immersive portal sounds enhance the teleportation experience +- **Player Notifications**: Both teleporter and target receive clear status messages +- **Safety First**: Only allows teleporting to living, online players -**Note:** Non-living vehicles like boats and minecarts are not teleported - only the player will be teleported in these cases. +### 🔒 Safety Note +This mod is not recommended for competitive PvP servers as it may provide tactical advantages to players. -**Note**: This mod is not recommended for use on PvP servers as it may provide unfair advantages. - -## Compatibility +## 🔧 Compatibility - **Minecraft Version**: 1.20.1 - **Forge Version**: 47.4.0+ -- **Side**: Only server is required, client is optional. - - Install on client for localized messages, otherwise server language will be used. +- **Installation**: Server-side required, client-side optional + - Install on client for localized messages + - Server-only installation uses server language for all players -## License +## 📄 License This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details. + +--- + +*Made with ❤️ for the Minecraft community* diff --git a/README_zh.md b/README_zh.md new file mode 100644 index 0000000..f9a5718 --- /dev/null +++ b/README_zh.md @@ -0,0 +1,43 @@ +# OnlyTP + +[English](README.md) | [中文](README_zh.md) + +OnlyTP 是一个轻量级的 Minecraft Forge 模组,为您的游戏体验提供便捷的传送功能。无论您是在探索广阔的世界,还是要帮助有需要的朋友,OnlyTP 都能让您在 Minecraft 服务器中的旅行变得简单高效。 + +## ✨ 功能特色 + +- **🎯 简单命令**: 直观的传送命令,易于记忆和使用 +- **🌟 增强体验**: 传送时带有精美的粒子效果和音效反馈 +- **🔐 智能安全检查**: 防止传送到离线、死亡或断开连接的玩家 +- **⚡ 零依赖**: 无需额外的模组或库 - 安装即可使用 +- **🌐 多人游戏就绪**: 非常适合协作游戏和服务器环境 + +## 🎮 使用方法 + +### 基础命令 +- **`/tlp <玩家名>`**: 传送到指定的在线玩家位置 + +### 功能详情 +- **粒子效果**: 在出发地和到达地都会出现美丽的传送门粒子效果 +- **音效反馈**: 沉浸式的传送门音效增强传送体验 +- **玩家通知**: 传送者和目标玩家都会收到清晰的状态消息 +- **安全优先**: 只允许传送到存活的在线玩家 + +### 🔒 安全提示 +不建议在竞技性 PvP 服务器上使用此模组,因为它可能为玩家提供战术优势。 + +## 🔧 兼容性 + +- **Minecraft 版本**: 1.20.1 +- **Forge 版本**: 47.4.0+ +- **安装要求**: 服务端必需,客户端可选 + - 在客户端安装可获得本地化消息 + - 仅服务端安装时所有玩家使用服务器语言 + +## 📄 许可证 + +本项目基于 MIT 许可证开源 - 详情请查看 [LICENSE.txt](LICENSE.txt) 文件。 + +--- + +*用 ❤️ 为 Minecraft 社区制作* \ No newline at end of file From b7cb963ca3dabe74701a75d3361f368ce1fcb5cb Mon Sep 17 00:00:00 2001 From: icceey Date: Mon, 28 Jul 2025 20:12:19 +0800 Subject: [PATCH 7/7] docs: update README --- README.md | 7 ------- README_zh.md | 9 +-------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/README.md b/README.md index bb2bba9..9df5803 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,7 @@ OnlyTP is a lightweight Minecraft Forge mod that enhances your gameplay with con - **🎯 Simple Commands**: Intuitive teleportation with easy-to-remember commands - **🌟 Enhanced Experience**: Teleport with elegant particle effects and sound feedback -- **🔐 Smart Safety Checks**: Prevents teleporting to offline, dead, or disconnected players - **⚡ Zero Dependencies**: No additional mods or libraries required - just install and play -- **🌐 Multiplayer Ready**: Perfect for collaborative gameplay and server environments ## 🎮 Usage @@ -21,7 +19,6 @@ OnlyTP is a lightweight Minecraft Forge mod that enhances your gameplay with con - **Particle Effects**: Beautiful portal particles appear at both departure and arrival locations - **Sound Feedback**: Immersive portal sounds enhance the teleportation experience - **Player Notifications**: Both teleporter and target receive clear status messages -- **Safety First**: Only allows teleporting to living, online players ### 🔒 Safety Note This mod is not recommended for competitive PvP servers as it may provide tactical advantages to players. @@ -37,7 +34,3 @@ This mod is not recommended for competitive PvP servers as it may provide tactic ## 📄 License This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details. - ---- - -*Made with ❤️ for the Minecraft community* diff --git a/README_zh.md b/README_zh.md index f9a5718..0dce241 100644 --- a/README_zh.md +++ b/README_zh.md @@ -8,9 +8,7 @@ OnlyTP 是一个轻量级的 Minecraft Forge 模组,为您的游戏体验提 - **🎯 简单命令**: 直观的传送命令,易于记忆和使用 - **🌟 增强体验**: 传送时带有精美的粒子效果和音效反馈 -- **🔐 智能安全检查**: 防止传送到离线、死亡或断开连接的玩家 - **⚡ 零依赖**: 无需额外的模组或库 - 安装即可使用 -- **🌐 多人游戏就绪**: 非常适合协作游戏和服务器环境 ## 🎮 使用方法 @@ -21,7 +19,6 @@ OnlyTP 是一个轻量级的 Minecraft Forge 模组,为您的游戏体验提 - **粒子效果**: 在出发地和到达地都会出现美丽的传送门粒子效果 - **音效反馈**: 沉浸式的传送门音效增强传送体验 - **玩家通知**: 传送者和目标玩家都会收到清晰的状态消息 -- **安全优先**: 只允许传送到存活的在线玩家 ### 🔒 安全提示 不建议在竞技性 PvP 服务器上使用此模组,因为它可能为玩家提供战术优势。 @@ -31,13 +28,9 @@ OnlyTP 是一个轻量级的 Minecraft Forge 模组,为您的游戏体验提 - **Minecraft 版本**: 1.20.1 - **Forge 版本**: 47.4.0+ - **安装要求**: 服务端必需,客户端可选 - - 在客户端安装可获得本地化消息 + - 在客户端安装可获得本地化提示 - 仅服务端安装时所有玩家使用服务器语言 ## 📄 许可证 本项目基于 MIT 许可证开源 - 详情请查看 [LICENSE.txt](LICENSE.txt) 文件。 - ---- - -*用 ❤️ 为 Minecraft 社区制作* \ No newline at end of file