add the missing Acknowledge Block Change packet on interact (#434)

* add the missing Acknowledge Block Change packet when the player break a block

* move it down the match to be call everytime
This commit is contained in:
kedor
2024-12-30 18:27:24 +01:00
committed by GitHub
parent a9a7dcc6b0
commit 9d770e9fb6

View File

@@ -761,10 +761,6 @@ impl Player {
.on_broken(block, self, location, server)
.await;
}
// TODO: Send this every tick
self.client
.send_packet(&CAcknowledgeBlockChange::new(player_action.sequence))
.await;
}
Status::DropItemStack
| Status::DropItem
@@ -775,6 +771,10 @@ impl Player {
},
None => self.kick(TextComponent::text("Invalid status")).await,
}
self.client
.send_packet(&CAcknowledgeBlockChange::new(player_action.sequence))
.await;
}
pub async fn handle_keep_alive(&self, keep_alive: SKeepAlive) {