Skip to content

Commit

Permalink
remove /back
Browse files Browse the repository at this point in the history
remove fade with BuildClip
  • Loading branch information
GeorgeRNG committed Feb 14, 2024
1 parent 37e13d5 commit f405bb2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/main/java/dev/dfonline/codeclient/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,27 @@ public static void register(CommandDispatcher<FabricClientCommandSource> 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;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/dev/dfonline/codeclient/dev/BuildClip.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -83,6 +84,7 @@ public static <T extends PacketListener> boolean handlePacket(Packet<T> 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;
Expand Down

0 comments on commit f405bb2

Please sign in to comment.