9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2026-01-03 22:16:38 +00:00
Files
SakuraMC/patches/server/0059-Fix-doEntityDrops-gamerule-preventing-falling-blocks.patch
Samsuik e51eb03769 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly
2024-07-15 13:07:44 +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 0fab05cfce5460d7025b626ff6438c72616b78c8..4d06f4eb4c36b8426fae4883154e1ae16e4064e3 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -356,10 +356,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