From b9c7fb30881fc5e8196f929b1c6b23b4fa0cb3b1 Mon Sep 17 00:00:00 2001 From: TheWhiteDog9487 Date: Fri, 2 Feb 2024 15:38:04 +0800 Subject: [PATCH] =?UTF-8?q?0.2.3=20=E5=A6=82=E6=9E=9C=E9=80=89=E5=AE=9A?= =?UTF-8?q?=E7=9A=84=E4=BC=A0=E9=80=81=E5=9D=90=E6=A0=87=E7=9A=84=E4=B8=8B?= =?UTF-8?q?=E6=96=B9=E4=B8=80=E6=A0=BC=E6=98=AF=E6=B0=B4=E6=88=96=E5=B2=A9?= =?UTF-8?q?=E6=B5=86=EF=BC=8C=E8=87=AA=E5=8A=A8=E6=94=BE=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=9F=B3=E5=A4=B4=E5=A1=AB=E4=B8=8A=EF=BC=8C=E8=AE=A9=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E4=BC=A0=E9=80=81=E8=BF=87=E5=8E=BB=E5=90=8E=E6=9C=89?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=8F=AF=E4=BB=A5=E7=AB=99=E7=9A=84=E5=B9=B3?= =?UTF-8?q?=E5=8F=B0=EF=BC=8C=E5=88=AB=E7=9B=B4=E6=8E=A5=E6=8E=89=E4=B8=8B?= =?UTF-8?q?=E5=8E=BB=E4=BA=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- src/main/java/xyz/thewhitedog9487/CommandRegister.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ca1a614..8b8a984 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.4+build.3 loader_version=0.15.6 # Mod Properties -mod_version=0.2.2 +mod_version=0.2.3 maven_group=xyz.thewhitedog9487 archives_base_name=randomteleporter diff --git a/src/main/java/xyz/thewhitedog9487/CommandRegister.java b/src/main/java/xyz/thewhitedog9487/CommandRegister.java index c7982c8..ae96c7b 100644 --- a/src/main/java/xyz/thewhitedog9487/CommandRegister.java +++ b/src/main/java/xyz/thewhitedog9487/CommandRegister.java @@ -11,6 +11,7 @@ import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.Text; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Vec3i; import org.jetbrains.annotations.Nullable; import java.util.SplittableRandom; @@ -185,6 +186,11 @@ public class CommandRegister { 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(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z))).getBlock() ;Coordinate_Y--){} + if (Blocks.WATER == Source.getWorld().getBlockState(new BlockPos(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z))).getBlock() || + Blocks.LAVA == Source.getWorld().getBlockState(new BlockPos(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z))).getBlock()){ + Source.getWorld().setBlockState(new BlockPos(Math.toIntExact(Coordinate_X), Coordinate_Y, Math.toIntExact(Coordinate_Z)), Blocks.STONE.getDefaultState());} +// 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++; Vec3d Coordinate = new Vec3d(Coordinate_X, Coordinate_Y, Coordinate_Z); if (Radius == WorldBorder && Retry < 126 && Distance(entity.getPos(), Coordinate) < 1e5){