Check if player can destroy block using an tool
Prevents players to destroy blocks when holding a sword or trident in creative
This commit is contained in:
1 parent
cccdf53e7c
commit
e055dd740c
24 files changed
+3497
-123
No files matched your search
@@ -64,7 +64,9 @@ impl ExperienceOrbEntity {
|
||||
|
||||
#[async_trait]
|
||||
impl EntityBase for ExperienceOrbEntity {
|
||||
async fn tick(&self, _: &Server) {
|
||||
async fn tick(&self, server: &Server) {
|
||||
self.entity.tick(server).await;
|
||||
|
||||
let age = self
|
||||
.orb_age
|
||||
.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
|
||||
|
||||
Reference in new issue
Block a user