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/0106-Allow-anvil-destroy-item-entities.patch
2025-08-16 22:08:16 +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 0fd2c522a5fb038a8c002970af6feebd9dc9c436..2d0d6ad8c37c3187fbf35e5c7ff9a509da59c648 100644
--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -282,7 +282,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);