9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00
Files
LeavesMC/leaves-server/minecraft-patches/features/0109-Allow-anvil-destroy-item-entities.patch
Lumine1909 f09fbb247d 1.21.5 (#470)
---------

Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com>
Co-authored-by: Fortern <blueten.ki@gmail.com>
Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com>
Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
Co-authored-by: MC_XiaoHei <xiaohei.xor7@outlook.com>
2025-06-05 18:41:51 +08:00

20 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: huanli233 <392352840@qq.com>
Date: Sat, 26 Oct 2024 19:53:17 +0800
Subject: [PATCH] Allow anvil destroy item entities
diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java
index b6e188cf9f224a9c4b75339acd0306758bf0cb71..ff8cd3d52bf9f3d117abfd7022d7f2ac8525e46a 100644
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -275,7 +275,7 @@ public class FallingBlockEntity extends Entity {
if (ceil < 0) {
return false;
} else {
- Predicate<Entity> predicate = EntitySelector.NO_CREATIVE_OR_SPECTATOR.and(EntitySelector.LIVING_ENTITY_STILL_ALIVE);
+ Predicate<Entity> predicate = org.leavesmc.leaves.LeavesConfig.modify.oldMC.allowAnvilDestroyItemEntities ? EntitySelector.NO_CREATIVE_OR_SPECTATOR : EntitySelector.NO_CREATIVE_OR_SPECTATOR.and(EntitySelector.LIVING_ENTITY_STILL_ALIVE); // Leaves - Allow anvil destroy item entities
DamageSource damageSource1 = this.blockState.getBlock() instanceof Fallable fallable
? fallable.getFallDamageSource(this)
: this.damageSources().fallingBlock(this);