9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-20 23:39:32 +00:00
Files
SakuraMC/patches/server/0062-Fix-doEntityDrops-gamerule-preventing-falling-blocks.patch
2024-05-04 01:33:31 +01:00

30 lines
1.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <kfian294ma4@gmail.com>
Date: Sun, 28 Jan 2024 20:30:09 +0000
Subject: [PATCH] Fix doEntityDrops gamerule preventing falling blocks from
breaking
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index fd043df496bded2fb18dae0b8053cd45c5d8c500..b773a8b831f1d65f6d442e95b1ab685170567a9c 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -352,10 +352,14 @@ public class FallingBlockEntity extends Entity {
tileentity.setChanged();
}
}
- } else if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
+ // Sakura start - fix the do entity drops gamerule
+ } else {
this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
- this.callOnBrokenAfterFall(block, blockposition);
- this.spawnAtLocation((ItemLike) block);
+ if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
+ this.callOnBrokenAfterFall(block, blockposition);
+ this.spawnAtLocation((ItemLike) block);
+ }
+ // Sakura end
}
} else {
this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause