Skip to content

Commit

Permalink
Fix enderman despawn, I am baka
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Jul 17, 2023
1 parent 3584bce commit e334d30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/0069-Despawn-enderman-with-block.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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 7e19c96e92f821836702969aef4628f29155e519..85a414d35b12908ed8e74e44e948a8a4e1e1cf3b 100644
index 0cd7d8dc3e7d17bbafe7c06e864cb6c52a9fa876..326eb5d31c2a6772e413b6ef51186929a34ff9d0 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -479,7 +479,7 @@ public class EnderMan extends Monster implements NeutralMob {

@Override
public boolean requiresCustomPersistence() {
- return super.requiresCustomPersistence() || this.getCarriedBlock() != null;
+ return super.requiresCustomPersistence() || (top.leavesmc.leaves.LeavesConfig.despawnEndermanWithBlock && this.getCarriedBlock() != null);
+ return super.requiresCustomPersistence() || (!top.leavesmc.leaves.LeavesConfig.despawnEndermanWithBlock && this.getCarriedBlock() != null); // Leaves - despawn enderman with block
}

private static class EndermanFreezeWhenLookedAt extends Goal {

0 comments on commit e334d30

Please sign in to comment.