9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00

Can disable LivingEntity aiStep alive check (#219)

This commit is contained in:
violetc
2024-07-22 18:32:18 +08:00
parent 072c07f4ef
commit 752a60d623
2 changed files with 24 additions and 2 deletions

View File

@@ -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;
@@ -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

View File

@@ -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();
}