9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00
Files
LeavesMC/patches/server/0133-Allow-anvil-destroy-item-entities.patch
2024-10-28 19:55:43 +08:00

20 lines
1.2 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/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index e38f588e3043320a9c135e03f506a00924ed58b8..5e91b222f9e6e908071d7b21a3fb782fa52eddab 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -275,7 +275,7 @@ public class FallingBlockEntity extends Entity {
if (i < 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.allowAnvilDestroyItemEntities ? EntitySelector.NO_CREATIVE_OR_SPECTATOR : EntitySelector.NO_CREATIVE_OR_SPECTATOR.and(EntitySelector.LIVING_ENTITY_STILL_ALIVE); // Leaves - Allow anvil destroy item entities
Block block = this.blockState.getBlock();
DamageSource damagesource1;