9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-29 03:39:07 +00:00
Files
SakuraMC/patches/server/0059-Fix-doEntityDrops-gamerule-preventing-falling-blocks.patch
2024-12-01 17:09:32 +00:00

31 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 358a2a5de2c39bb1b3829af29a4a70f2b720dc24..d4e8bffc31415663fd3628ad33acc2d59e2036ca 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -359,10 +359,14 @@ public class FallingBlockEntity extends Entity {
tileentity.setChanged();
}
}
- } else if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
- this.discard();
- this.callOnBrokenAfterFall(block, blockposition);
- this.spawnAtLocation((ItemLike) block);
+ // Sakura start - fix the do entity drops gamerule
+ } else {
+ if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
+ this.discard();
+ this.callOnBrokenAfterFall(block, blockposition);
+ this.spawnAtLocation((ItemLike) block);
+ }
+ // Sakura end - fix the do entity drops gamerule
}
} else {
this.discard();