mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-21 15:59:33 +00:00
--------- Co-authored-by: MC_XiaoHei <xiaohei.xor7studio@foxmail.com> Co-authored-by: Bluemangoo <chenfy2006@qq.com>
20 lines
1.1 KiB
Diff
20 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Sat, 17 Jun 2023 15:20:28 +0800
|
|
Subject: [PATCH] Despawn enderman with block
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
|
index 215176eb7152c11c4934c8576ac8c9fa9b2d0833..675a504ac428aaa130dc607bb8e759e156523f33 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
|
|
@@ -469,7 +469,7 @@ public class EnderMan extends Monster implements NeutralMob {
|
|
|
|
@Override
|
|
public boolean requiresCustomPersistence() {
|
|
- return super.requiresCustomPersistence() || this.getCarriedBlock() != null;
|
|
+ return super.requiresCustomPersistence() || (!org.leavesmc.leaves.LeavesConfig.despawnEndermanWithBlock && this.getCarriedBlock() != null); // Leaves - despawn enderman with block
|
|
}
|
|
|
|
private static class EndermanFreezeWhenLookedAt extends Goal {
|