From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Martijn Muijsers Date: Wed, 30 Nov 2022 20:38:15 +0100 Subject: [PATCH] Prevent entities random strolling into non-ticking chunks License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) Gale - https://galemc.org This patch is based on the following patch: "Don't wander into non-ticking chunks" By: PureGero As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper) Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html) diff --git a/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java b/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java index bad57b0017c78d4d1d32c239fae5bc2ea20bc3c3..28f770d40f5ada6d547e91cd3147969702e1ae75 100644 --- a/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java +++ b/net/minecraft/world/entity/ai/goal/RandomStrollGoal.java @@ -49,7 +49,7 @@ public class RandomStrollGoal extends Goal { } Vec3 position = this.getPosition(); - if (position == null) { + if (position == null || (!this.mob.level().galeConfig().gameplayMechanics.entitiesCanRandomStrollIntoNonTickingChunks && !((net.minecraft.server.level.ServerLevel) this.mob.level()).isPositionEntityTicking(net.minecraft.core.BlockPos.containing(position)))) { // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks return false; } else { this.wantedX = position.x;