From e977391b0413aaa62ea725a53e4a78c287844f4c Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 12 May 2023 23:20:23 -0500 Subject: auto respawn --- azalea/examples/testbot.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'azalea/examples') diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs index 3fe9253c..ae6d293b 100644 --- a/azalea/examples/testbot.rs +++ b/azalea/examples/testbot.rs @@ -8,10 +8,10 @@ use azalea::entity::{EyeHeight, Position}; use azalea::interact::HitResultComponent; use azalea::inventory::ItemSlot; use azalea::pathfinder::BlockPosGoal; +use azalea::protocol::packets::game::serverbound_client_command_packet::ServerboundClientCommandPacket; +use azalea::protocol::packets::game::ClientboundGamePacket; use azalea::{prelude::*, swarm::prelude::*, BlockPos, GameProfileComponent, WalkDirection}; use azalea::{Account, Client, Event}; -use azalea_protocol::packets::game::serverbound_client_command_packet::ServerboundClientCommandPacket; -use azalea_protocol::packets::game::ClientboundGamePacket; use std::time::Duration; #[derive(Default, Clone, Component)] @@ -212,11 +212,6 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result< } } } - Event::Death(_) => { - bot.write_packet(ServerboundClientCommandPacket { - action: azalea_protocol::packets::game::serverbound_client_command_packet::Action::PerformRespawn, - }.get()); - } Event::Packet(packet) => match *packet { ClientboundGamePacket::Login(_) => { println!("login packet"); -- cgit v1.2.3 From 2057877eba5f6f13ba6863b48a9cdd44910a44f8 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 12 May 2023 23:22:45 -0500 Subject: remove unused import --- azalea/examples/testbot.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'azalea/examples') diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs index ae6d293b..1774d005 100644 --- a/azalea/examples/testbot.rs +++ b/azalea/examples/testbot.rs @@ -8,7 +8,6 @@ use azalea::entity::{EyeHeight, Position}; use azalea::interact::HitResultComponent; use azalea::inventory::ItemSlot; use azalea::pathfinder::BlockPosGoal; -use azalea::protocol::packets::game::serverbound_client_command_packet::ServerboundClientCommandPacket; use azalea::protocol::packets::game::ClientboundGamePacket; use azalea::{prelude::*, swarm::prelude::*, BlockPos, GameProfileComponent, WalkDirection}; use azalea::{Account, Client, Event}; -- cgit v1.2.3