mirror of
https://github.com/TheWhiteDog9487/RandomTeleporter.git
synced 2024-11-22 04:27:05 +08:00
0.2.0
升级模组版本到1.20.4
This commit is contained in:
parent
e5a1192306
commit
54a9fce320
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.4-SNAPSHOT'
|
id 'fabric-loom' version '1.5-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,20 +4,20 @@ 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.19.1
|
minecraft_version=1.20.4
|
||||||
yarn_mappings=1.19.1+build.6
|
yarn_mappings=1.20.4+build.3
|
||||||
loader_version=0.14.24
|
loader_version=0.15.6
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=0.1.1
|
mod_version=0.2.0
|
||||||
maven_group=xyz.thewhitedog9487
|
maven_group=xyz.thewhitedog9487
|
||||||
archives_base_name=randomteleporter
|
archives_base_name=randomteleporter
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.58.5+1.19.1
|
fabric_version=0.95.0+1.20.4
|
||||||
|
|
||||||
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/
|
@ -37,7 +37,7 @@ public class CommandRegister {
|
|||||||
Register("rtp");}
|
Register("rtp");}
|
||||||
static int execute_command_radius(ServerCommandSource Source, Long Radius){
|
static int execute_command_radius(ServerCommandSource Source, Long Radius){
|
||||||
if (Source.getPlayer() == null) {
|
if (Source.getPlayer() == null) {
|
||||||
Source.sendFeedback(Text.translatable("error.twd.rtp.not_player"), true);
|
Source.sendFeedback(()->{ return Text.translatable("error.twd.rtp.not_player"); }, true);
|
||||||
return -1;}
|
return -1;}
|
||||||
if (Radius == null){Radius = WorldBorder - (long) 1e4;}
|
if (Radius == null){Radius = WorldBorder - (long) 1e4;}
|
||||||
Radius = Math.abs(Radius);
|
Radius = Math.abs(Radius);
|
||||||
@ -45,9 +45,9 @@ public class CommandRegister {
|
|||||||
long Coordinate_Z = new SplittableRandom().nextLong(-Radius, Radius);
|
long Coordinate_Z = new SplittableRandom().nextLong(-Radius, Radius);
|
||||||
int Coordinate_Y = 320;
|
int Coordinate_Y = 320;
|
||||||
for (;
|
for (;
|
||||||
Blocks.AIR == Source.getWorld().getBlockState(new BlockPos(Coordinate_X, Coordinate_Y, Coordinate_Z)).getBlock() ||
|
Blocks.AIR == Source.getWorld().getBlockState(new BlockPos(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z))).getBlock() ||
|
||||||
Blocks.VOID_AIR == Source.getWorld().getBlockState(new BlockPos(Coordinate_X, Coordinate_Y, Coordinate_Z)).getBlock() ||
|
Blocks.VOID_AIR == Source.getWorld().getBlockState(new BlockPos(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z))).getBlock() ||
|
||||||
Blocks.CAVE_AIR == Source.getWorld().getBlockState(new BlockPos(Coordinate_X, Coordinate_Y, Coordinate_Z)).getBlock()
|
Blocks.CAVE_AIR == Source.getWorld().getBlockState(new BlockPos(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z))).getBlock()
|
||||||
;Coordinate_Y--){}
|
;Coordinate_Y--){}
|
||||||
Coordinate_Y++;
|
Coordinate_Y++;
|
||||||
Vec3d Coordinate = new Vec3d(Coordinate_X, Coordinate_Y, Coordinate_Z);
|
Vec3d Coordinate = new Vec3d(Coordinate_X, Coordinate_Y, Coordinate_Z);
|
||||||
@ -56,8 +56,9 @@ public class CommandRegister {
|
|||||||
execute_command_radius(Source, Radius);
|
execute_command_radius(Source, Radius);
|
||||||
return 0;}
|
return 0;}
|
||||||
if (Retry >= 126){
|
if (Retry >= 126){
|
||||||
Source.sendFeedback(Text.translatable("warning.twd.rtp.retry"), true);}
|
Source.sendFeedback(()->{ return Text.translatable("warning.twd.rtp.retry"); }, true);}
|
||||||
Source.getPlayer().teleport(Source.getWorld(), Coordinate_X, Coordinate_Y, Coordinate_Z, 0, 0);
|
Source.getPlayer().teleport(Source.getWorld(), Coordinate_X, Coordinate_Y, Coordinate_Z, 0, 0);
|
||||||
Source.sendFeedback(Text.translatable("info.twd.rtp.success", Source.getPlayer().getName(), Coordinate_X, Coordinate_Y, Coordinate_Z),true);
|
final int FinalCoordinate_Y = Coordinate_Y;
|
||||||
|
Source.sendFeedback(()->{ return Text.translatable("info.twd.rtp.success", Source.getPlayer().getName(), Coordinate_X, FinalCoordinate_Y, Coordinate_Z); },true);
|
||||||
return 0;}
|
return 0;}
|
||||||
}
|
}
|
@ -1,3 +1,4 @@
|
|||||||
{
|
{
|
||||||
|
"twd-sasf.bilibili": "Bilibili",
|
||||||
|
"twd-sasf.blog": "Blog"
|
||||||
}
|
}
|
@ -1,5 +1,7 @@
|
|||||||
{
|
{
|
||||||
"info.twd.rtp.success": "已将玩家%s传送到%d %d %d",
|
"info.twd.rtp.success": "已将玩家%s传送到%d %d %d",
|
||||||
"error.twd.rtp.not_player": "执行命令的不是玩家",
|
"error.twd.rtp.not_player": "执行命令的不是玩家",
|
||||||
"warning.twd.rtp.retry": "重试次数过大,为避免死循环将在本次传送中取消距离保护"
|
"warning.twd.rtp.retry": "重试次数过大,为避免死循环将在本次传送中取消距离保护",
|
||||||
|
"twd.bilibili": "哔哩哔哩主页",
|
||||||
|
"twd.blog": "TheWhiteDog9487的博客"
|
||||||
}
|
}
|
@ -13,14 +13,10 @@
|
|||||||
},
|
},
|
||||||
"license": "WTFPL",
|
"license": "WTFPL",
|
||||||
"icon": "assets/randomteleporter/icon.png",
|
"icon": "assets/randomteleporter/icon.png",
|
||||||
"environment": "server",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
"xyz.thewhitedog9487.RandomTeleporter"
|
"xyz.thewhitedog9487.RandomTeleporter"]
|
||||||
],
|
|
||||||
"client": [
|
|
||||||
"xyz.thewhitedog9487.RandomTeleporterClient"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"randomteleporter.mixins.json",
|
"randomteleporter.mixins.json",
|
||||||
@ -30,10 +26,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.14.24",
|
"fabricloader": ">=0.15.6",
|
||||||
"minecraft": "~1.19.1",
|
"minecraft": "~1.20.4",
|
||||||
"java": ">=17",
|
"java": ">=17",
|
||||||
"fabric": "*"
|
"fabric-api": "*"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"another-mod": "*"
|
"another-mod": "*"
|
||||||
@ -41,7 +37,7 @@
|
|||||||
"custom": {
|
"custom": {
|
||||||
"modmenu": {
|
"modmenu": {
|
||||||
"links": {
|
"links": {
|
||||||
"twd-sasf.bilibili": "https://space.bilibili.com/401746666",
|
"twd.bilibili": "https://space.bilibili.com/401746666",
|
||||||
"twd-sasf.blog": "www.thewhitedog9487.xyz"},
|
"twd.blog": "www.thewhitedog9487.xyz"},
|
||||||
"update_checker": true}}
|
"update_checker": true}}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user