From f405bb2995d988095df1b8641681bff55d7f077e Mon Sep 17 00:00:00 2001 From: GeorgeRNG <81434111+GeorgeRNG@users.noreply.github.com> Date: Wed, 14 Feb 2024 10:59:25 +0000 Subject: [PATCH] remove /back remove fade with BuildClip --- .../dev/dfonline/codeclient/Commands.java | 42 +++++++++---------- .../dfonline/codeclient/dev/BuildClip.java | 2 + 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/main/java/dev/dfonline/codeclient/Commands.java b/src/main/java/dev/dfonline/codeclient/Commands.java index 973aaf5c..798436b8 100644 --- a/src/main/java/dev/dfonline/codeclient/Commands.java +++ b/src/main/java/dev/dfonline/codeclient/Commands.java @@ -121,27 +121,27 @@ public static void register(CommandDispatcher dispatc return 0; })); - dispatcher.register(literal("back").executes(context -> { - if(CodeClient.location instanceof Creator plot) { - if(plot.devPos == null) { - Utility.sendMessage("There is no position to go back to!", ChatType.FAIL); - return 1; - } - if(!(CodeClient.currentAction instanceof None)) { - Utility.sendMessage("CodeClient is currently busy, try again in a moment.",ChatType.FAIL); - return 1; - } - if(LastPos.tpBack()) return 0; - else { - Utility.sendMessage("An error occurred whilst trying to go back.",ChatType.FAIL); - return 1; - } - } - else { - Utility.sendMessage("You must be in dev or build mode to do this!",ChatType.FAIL); - return 1; - } - })); +// dispatcher.register(literal("back").executes(context -> { +// if(CodeClient.location instanceof Creator plot) { +// if(plot.devPos == null) { +// Utility.sendMessage("There is no position to go back to!", ChatType.FAIL); +// return 1; +// } +// if(!(CodeClient.currentAction instanceof None)) { +// Utility.sendMessage("CodeClient is currently busy, try again in a moment.",ChatType.FAIL); +// return 1; +// } +// if(LastPos.tpBack()) return 0; +// else { +// Utility.sendMessage("An error occurred whilst trying to go back.",ChatType.FAIL); +// return 1; +// } +// } +// else { +// Utility.sendMessage("You must be in dev or build mode to do this!",ChatType.FAIL); +// return 1; +// } +// })); dispatcher.register(literal("getspawn").executes(context -> { if(!(CodeClient.location instanceof Dev)) return 1; diff --git a/src/main/java/dev/dfonline/codeclient/dev/BuildClip.java b/src/main/java/dev/dfonline/codeclient/dev/BuildClip.java index 20aa597d..943e57f4 100644 --- a/src/main/java/dev/dfonline/codeclient/dev/BuildClip.java +++ b/src/main/java/dev/dfonline/codeclient/dev/BuildClip.java @@ -19,6 +19,7 @@ import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; import net.minecraft.network.packet.c2s.play.TeleportConfirmC2SPacket; +import net.minecraft.network.packet.s2c.play.EntityAnimationS2CPacket; import net.minecraft.network.packet.s2c.play.PlaySoundFromEntityS2CPacket; import net.minecraft.network.packet.s2c.play.PlayerPositionLookS2CPacket; import net.minecraft.text.ClickEvent; @@ -83,6 +84,7 @@ public static boolean handlePacket(Packet packet) CodeClient.MC.getNetworkHandler().sendPacket(new TeleportConfirmC2SPacket(move.getTeleportId())); return true; } + if(packet instanceof EntityAnimationS2CPacket) return true; if(packet instanceof PlaySoundFromEntityS2CPacket) { waitForTP = false; return true;