From aa4cd9b0b9c4c470df52e589f54c71e4d2b02456 Mon Sep 17 00:00:00 2001 From: zontreck Date: Sun, 19 Nov 2023 08:41:51 -0700 Subject: [PATCH] Fix compile errors --- .../zontreck/essentials/commands/homes/SetHomeCommand.java | 2 +- .../dev/zontreck/essentials/commands/teleport/RTPCommand.java | 2 +- .../dev/zontreck/essentials/commands/teleport/TPACommand.java | 3 ++- .../zontreck/essentials/commands/teleport/TPAHereCommand.java | 2 +- .../essentials/commands/teleport/TPAcceptCommand.java | 2 +- .../zontreck/essentials/commands/warps/RTPWarpCommand.java | 2 +- .../zontreck/essentials/commands/warps/SetWarpCommand.java | 2 +- .../java/dev/zontreck/essentials/homes/HomesProvider.java | 1 - src/main/java/dev/zontreck/essentials/util/RTPContainer.java | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/dev/zontreck/essentials/commands/homes/SetHomeCommand.java b/src/main/java/dev/zontreck/essentials/commands/homes/SetHomeCommand.java index 90bb97e..4fa5ee7 100644 --- a/src/main/java/dev/zontreck/essentials/commands/homes/SetHomeCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/homes/SetHomeCommand.java @@ -48,7 +48,7 @@ public class SetHomeCommand { Vec3 position = p.position(); Vec2 rot = p.getRotationVector(); - TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.getLevel()); + TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.serverLevel()); Home newhome = new Home(p, homeName, dest); AriasEssentials.player_homes.get(p.getUUID()).add(newhome); diff --git a/src/main/java/dev/zontreck/essentials/commands/teleport/RTPCommand.java b/src/main/java/dev/zontreck/essentials/commands/teleport/RTPCommand.java index eec6a16..091958c 100644 --- a/src/main/java/dev/zontreck/essentials/commands/teleport/RTPCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/teleport/RTPCommand.java @@ -51,7 +51,7 @@ public class RTPCommand { Vec3 pos = pla.position(); //boolean found_place= false; - RandomPositionFactory.beginRTPSearch(pla, pos, pla.getRotationVector(), pla.getLevel()); + RandomPositionFactory.beginRTPSearch(pla, pos, pla.getRotationVector(), pla.serverLevel()); return; diff --git a/src/main/java/dev/zontreck/essentials/commands/teleport/TPACommand.java b/src/main/java/dev/zontreck/essentials/commands/teleport/TPACommand.java index 6d2dfb9..237600d 100644 --- a/src/main/java/dev/zontreck/essentials/commands/teleport/TPACommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/teleport/TPACommand.java @@ -109,7 +109,8 @@ public class TPACommand { } private static int usage(CommandSourceStack source) { - source.sendSuccess(ChatHelpers.macro("/tpa USAGE\n\n "+ChatColor.BOLD + ChatColor.DARK_GRAY+"/tpa "+ChatColor.DARK_RED+"target_player\n"), false); + + source.sendSystemMessage(ChatHelpers.macro("/tpa USAGE\n\n "+ChatColor.BOLD + ChatColor.DARK_GRAY+"/tpa "+ChatColor.DARK_RED+"target_player\n")); return 0; } } diff --git a/src/main/java/dev/zontreck/essentials/commands/teleport/TPAHereCommand.java b/src/main/java/dev/zontreck/essentials/commands/teleport/TPAHereCommand.java index e3e9f77..8b3ac1b 100644 --- a/src/main/java/dev/zontreck/essentials/commands/teleport/TPAHereCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/teleport/TPAHereCommand.java @@ -106,7 +106,7 @@ public class TPAHereCommand { } private static int usage(CommandSourceStack source) { - source.sendSuccess(ChatHelpers.macro("/tpahere USAGE\n\n !Bold!!Dark_Gray!/tpahere !Dark_Red!target_player\n"), false); + source.sendSystemMessage(ChatHelpers.macro("/tpahere USAGE\n\n !Bold!!Dark_Gray!/tpahere !Dark_Red!target_player\n")); return 0; } } diff --git a/src/main/java/dev/zontreck/essentials/commands/teleport/TPAcceptCommand.java b/src/main/java/dev/zontreck/essentials/commands/teleport/TPAcceptCommand.java index e65f2ec..6059286 100644 --- a/src/main/java/dev/zontreck/essentials/commands/teleport/TPAcceptCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/teleport/TPAcceptCommand.java @@ -53,7 +53,7 @@ public class TPAcceptCommand { cont.PlayerInst = from; cont.Position = to.position(); cont.Rotation = to.getRotationVector(); - cont.Dimension = to.getLevel(); + cont.Dimension = to.serverLevel(); TeleportActioner.ApplyTeleportEffect(from); TeleportActioner.PerformTeleport(cont); diff --git a/src/main/java/dev/zontreck/essentials/commands/warps/RTPWarpCommand.java b/src/main/java/dev/zontreck/essentials/commands/warps/RTPWarpCommand.java index 3803c6b..4c235e0 100644 --- a/src/main/java/dev/zontreck/essentials/commands/warps/RTPWarpCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/warps/RTPWarpCommand.java @@ -43,7 +43,7 @@ public class RTPWarpCommand { Vec3 position = p.position(); Vec2 rot = p.getRotationVector(); - TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.getLevel()); + TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.serverLevel()); Warp warp = new Warp(p.getUUID(), string, true, true, dest); WarpCreatedEvent event = new WarpCreatedEvent(warp); if(MinecraftForge.EVENT_BUS.post(event)) diff --git a/src/main/java/dev/zontreck/essentials/commands/warps/SetWarpCommand.java b/src/main/java/dev/zontreck/essentials/commands/warps/SetWarpCommand.java index f61dd79..2ffd93c 100644 --- a/src/main/java/dev/zontreck/essentials/commands/warps/SetWarpCommand.java +++ b/src/main/java/dev/zontreck/essentials/commands/warps/SetWarpCommand.java @@ -44,7 +44,7 @@ public class SetWarpCommand { Vec3 position = p.position(); Vec2 rot = p.getRotationVector(); - TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.getLevel()); + TeleportDestination dest = new TeleportDestination(new Vector3(position), new Vector2(rot), p.serverLevel()); Warp w = new Warp(p.getUUID(), string, false, true, dest); WarpCreatedEvent event = new WarpCreatedEvent(w); if(MinecraftForge.EVENT_BUS.post(event)){ diff --git a/src/main/java/dev/zontreck/essentials/homes/HomesProvider.java b/src/main/java/dev/zontreck/essentials/homes/HomesProvider.java index fc0bda1..5ed18a4 100644 --- a/src/main/java/dev/zontreck/essentials/homes/HomesProvider.java +++ b/src/main/java/dev/zontreck/essentials/homes/HomesProvider.java @@ -10,7 +10,6 @@ import net.minecraft.nbt.NbtIo; public class HomesProvider { /** * DO NOT USE. Internal use only. - * @see Profile#player_homes * @param player * @return */ diff --git a/src/main/java/dev/zontreck/essentials/util/RTPContainer.java b/src/main/java/dev/zontreck/essentials/util/RTPContainer.java index 75357c3..03ed74d 100644 --- a/src/main/java/dev/zontreck/essentials/util/RTPContainer.java +++ b/src/main/java/dev/zontreck/essentials/util/RTPContainer.java @@ -86,13 +86,13 @@ public class RTPContainer { Random rng = new Random(Instant.now().getEpochSecond()); Vector3 pos = new Vector3(rng.nextDouble(0xFFFF), 0, rng.nextDouble(0xFFFF)); BlockPos bpos = pos.asBlockPos(); - container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.HEIGHTMAPS); + container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.SURFACE); pos = new Vector3( container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos())); while (!container.Dimension.getWorldBorder().isWithinBounds(pos.asBlockPos())) { pos = new Vector3(rng.nextDouble(0xffff), 0, rng.nextDouble(0xffff)); bpos = pos.asBlockPos(); - container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.HEIGHTMAPS); + container.Dimension.getChunk(bpos.getX() >> 4, bpos.getZ() >> 4, ChunkStatus.SURFACE); pos = new Vector3( container.Dimension.getHeightmapPos(heightMapType, pos.asBlockPos())); }