Skip to content

Commit

Permalink
Can disable LivingEntity aiStep alive check (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Jul 22, 2024
1 parent 072c07f commit 752a60d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
7 changes: 5 additions & 2 deletions patches/server/0006-Leaves-Server-Config-And-Command.patch
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ index c2e2e0ea5f2bb8204cb698db7904b0f863d2506f..3f660dabd01087373a41f2eec949a6a1
.withRequiredArg()
diff --git a/src/main/java/org/leavesmc/leaves/LeavesConfig.java b/src/main/java/org/leavesmc/leaves/LeavesConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..6ac762ff64c9113ab06628174fbb4ab2ad8b2ea0
index 0000000000000000000000000000000000000000..c0afb54a352bec9e311677c2a13e491efead093b
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/LeavesConfig.java
@@ -0,0 +1,922 @@
@@ -0,0 +1,925 @@
+package org.leavesmc.leaves;
+
+import com.destroystokyo.paper.util.SneakyThrow;
Expand Down Expand Up @@ -309,6 +309,9 @@ index 0000000000000000000000000000000000000000..6ac762ff64c9113ab06628174fbb4ab2
+ @GlobalConfig(name = "disable-gateway-portal-entity-ticking", category = {"modify", "minecraft-old"})
+ public static boolean disableGatewayPortalEntityTicking = false;
+
+ @GlobalConfig(name = "disable-LivingEntity-ai-step-alive-check", category = {"modify", "minecraft-old"})
+ public static boolean disableLivingEntityAiStepAliveCheck = false;
+
+ // Leaves end - modify - minecraft-old
+
+ // Leaves start - modify - elytra-aeronautics
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Mon, 22 Jul 2024 18:30:42 +0800
Subject: [PATCH] Can disable LivingEntity aiStep alive check


diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index fc6bbe34b6ff4912d34f86196c6d55d7116dcedb..be817a51324c81d8adfe73b0977bc5afc0f359d4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3193,7 +3193,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}

- if (!this.isRemoved()) {
+ if (org.leavesmc.leaves.LeavesConfig.disableLivingEntityAiStepAliveCheck || !this.isRemoved()) { // Leaves - can disable check
this.aiStep();
}

0 comments on commit 752a60d

Please sign in to comment.