这个版本同时会出1.21和1.21.1两个版本的构建。
那个ModMenu内链接名字显示不正常的问题修掉了,改翻译键没改完导致的。
输出文件名改掉了,不然两个不同的游戏版本同时发一个模组版本不好弄。
那个从来就没有正常工作过的过近距离保护直接下了,可能之后再加回来吧,反正现在那个就没正常过。
其他都是开发侧的小改动,用户侧无感知。
This commit is contained in:
TheWhiteDog9487 2024-08-09 16:08:50 +08:00
parent 6eb98f1f94
commit 3d23f397f7
9 changed files with 17 additions and 22 deletions

View File

@ -73,6 +73,10 @@
1. 服务器需要安装 1. 服务器需要安装
2. 客户端不需要 2. 客户端不需要
**注意情况2和3虽然其他玩家不需要安装本模组就能使用功能。但是由于命令执行后的反馈结果文字使用了翻译如果其他玩家没有安装模组会导致显示不正常玩家会直接看到翻译键而不是对应的文字。
因此,虽然可以但不建议其他人不安装。
能安装的话还是都装一下吧。**
# 一些小彩蛋 # 一些小彩蛋
你可以使用 /随机传送 来替代 /rtp 你可以使用 /随机传送 来替代 /rtp
没错Minecraft的命令是可以存在非ASCII字符的所以我就整了一个 没错Minecraft的命令是可以存在非ASCII字符的所以我就整了一个

View File

@ -1,9 +1,9 @@
plugins { plugins {
id 'fabric-loom' version '1.6-SNAPSHOT' id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }
version = project.mod_version version = project.mod_version + " mc$project.minecraft_version"
group = project.maven_group group = project.maven_group
base { base {

View File

@ -5,19 +5,19 @@ org.gradle.parallel=true
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/develop # check these on https://fabricmc.net/develop
minecraft_version=1.21 minecraft_version=1.21
yarn_mappings=1.21+build.1 yarn_mappings=1.21+build.9
loader_version=0.15.11 loader_version=0.15.11
# Mod Properties # Mod Properties
mod_version=0.3.0 mod_version=0.3.1
maven_group=xyz.thewhitedog9487 maven_group=xyz.thewhitedog9487
archives_base_name=randomteleporter archives_base_name=randomteleporter
# Dependencies # Dependencies
fabric_version=0.100.1+1.21 fabric_version=0.102.0+1.21
loom_libraries_base=https://bmclapi2.bangbang93.com/maven/ loom_libraries_base=https://bmclapi2.bangbang93.com/maven/
loom_resources_base=https://bmclapi2.bangbang93.com/assets/ loom_resources_base=https://bmclapi2.bangbang93.com/assets/
loom_version_manifests=https://bmclapi2.bangbang93.com/mc/game/version_manifest.json loom_version_manifests=https://bmclapi2.bangbang93.com/mc/game/version_manifest.json
loom_experimental_versions=https://maven.fabricmc.net/net/minecraft/experimental_versions.json loom_experimental_versions=https://maven.fabricmc.net/net/minecraft/experimental_versions.json
loom_fabric_repository=https://repository.hanbings.io/proxy/ # loom_fabric_repository=https://repository.hanbings.io/proxy/

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip distributionUrl=https://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View File

@ -1,7 +1,7 @@
{ {
"required": false, "required": false,
"package": "xyz.thewhitedog9487.mixin.client", "package": "xyz.thewhitedog9487.mixin.client",
"compatibilityLevel": "JAVA_17", "compatibilityLevel": "JAVA_21",
"client": [ "client": [
], ],

View File

@ -20,7 +20,6 @@ import static net.minecraft.server.command.CommandManager.literal;
public class CommandRegister { public class CommandRegister {
final static long WorldBorder = (long) 2.9e7; final static long WorldBorder = (long) 2.9e7;
static byte Retry = 0;
static byte PermissionLevel = 2; static byte PermissionLevel = 2;
public static void Register(String Name){ public static void Register(String Name){
// /rtp // /rtp
@ -193,13 +192,6 @@ public class CommandRegister {
// if ( String.valueOf(entity.getWorld().getBiome(new BlockPos(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z))).getKey()).equals("minecraft:the_void") ) { // if ( String.valueOf(entity.getWorld().getBiome(new BlockPos(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z))).getKey()).equals("minecraft:the_void") ) {
// Coordinate_Y++;} // Coordinate_Y++;}
Coordinate_Y++; Coordinate_Y++;
Vec3d Coordinate = new Vec3d(Coordinate_X, Coordinate_Y, Coordinate_Z);
if (Radius == WorldBorder && Retry < 126 && entity.getPos().distanceTo(Coordinate) < 1e5){
Retry++;
execute_command(Source, Radius,null, Origin);
return 0;}
if (Retry >= 126){
Source.sendFeedback(()->{ return Text.translatable("warning.retry"); }, true);}
entity.teleport(Source.getWorld(),Coordinate_X + 0.5, Coordinate_Y, Coordinate_Z + 0.5, new HashSet<>(), entity.getYaw(), entity.getPitch()); entity.teleport(Source.getWorld(),Coordinate_X + 0.5, Coordinate_Y, Coordinate_Z + 0.5, new HashSet<>(), entity.getYaw(), entity.getPitch());
final long FinalCoordinate_X = Coordinate_X; final long FinalCoordinate_X = Coordinate_X;
final int FinalCoordinate_Y = Coordinate_Y; final int FinalCoordinate_Y = Coordinate_Y;

View File

@ -3,7 +3,6 @@
"modmenu.descriptionTranslation.randomteleporter": "增加了两个用于随机传送的命令", "modmenu.descriptionTranslation.randomteleporter": "增加了两个用于随机传送的命令",
"info.success": "已将玩家%s传送到%d %d %d", "info.success": "已将玩家%s传送到%d %d %d",
"error.not_player": "执行命令的不是玩家", "error.not_player": "执行命令的不是玩家",
"warning.retry": "重试次数过大,为避免死循环将在本次传送中取消距离保护", "bilibili": "TheWhiteDog9487的哔哩哔哩主页",
"bilibili": "哔哩哔哩主页",
"blog": "TheWhiteDog9487的博客" "blog": "TheWhiteDog9487的博客"
} }

View File

@ -28,7 +28,7 @@
], ],
"depends": { "depends": {
"fabricloader": ">=0.15.11", "fabricloader": ">=0.15.11",
"minecraft": "~1.21", "minecraft": "1.21",
"java": ">=21", "java": ">=21",
"fabric-api": "*" "fabric-api": "*"
}, },
@ -38,7 +38,7 @@
"custom": { "custom": {
"modmenu": { "modmenu": {
"links": { "links": {
"twd.bilibili": "https://space.bilibili.com/401746666", "bilibili": "https://space.bilibili.com/401746666",
"twd.blog": "www.thewhitedog9487.xyz"}, "blog": "www.thewhitedog9487.xyz"},
"update_checker": true}} "update_checker": true}}
} }

View File

@ -1,7 +1,7 @@
{ {
"required": false, "required": false,
"package": "xyz.thewhitedog9487.mixin", "package": "xyz.thewhitedog9487.mixin",
"compatibilityLevel": "JAVA_17", "compatibilityLevel": "JAVA_21",
"mixins": [ "mixins": [
], ],