9
0
mirror of https://github.com/Samsuik/Sakura.git synced 2025-12-21 15:59:26 +00:00
Files
SakuraMC/patches/server/0035-Add-option-to-disable-entity-ai.patch
Samsuik 90d5b445b2 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@3ea95ef Do not access world state to see if we can see a Player
PaperMC/Paper@71c84c8 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)
PaperMC/Paper@e3bc4c4 Make debug mode print current configuration phase
PaperMC/Paper@d0ebfbb Fix corrupted plugin.yml breaking plugin loading (#10279)
PaperMC/Paper@681bbff Fix spawnreason saving
2024-02-26 17:34:05 +00:00

20 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samsuik <40902469+Samsuik@users.noreply.github.com>
Date: Sat, 18 Nov 2023 15:12:14 +0000
Subject: [PATCH] Add option to disable entity ai
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 2439f8d48daca7329049436414f06a36b4b79029..bdf3c81d9721ac06fd66a3f68ef0cc174858391b 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -898,7 +898,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
protected final void serverAiStep() {
++this.noActionTime;
// Paper start - Allow nerfed mobs to jump and float
- if (!this.aware) {
+ if (!this.aware || this.level().sakuraConfig().entity.disableMobAi) { // Sakura
if (goalFloat != null) {
if (goalFloat.canUse()) goalFloat.tick();
this.getJumpControl().tick();