mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-22 08:19:31 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@681c013 Bundle spark (#11093) PaperMC/Paper@5fee9c6 Move configuration option to a system property PaperMC/Paper@aa3b356 Improve server startup logging (#11110) PaperMC/Paper@9aea240 Properly lookup plugin classes when looked up by spark PaperMC/Paper@7e91a2c Update the bundled spark version
45 lines
2.4 KiB
Diff
45 lines
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Wed, 23 Nov 2022 23:05:45 +0100
|
|
Subject: [PATCH] Block goal does not load 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:
|
|
"Fix Paper#6045, block goal shouldn't load chunks"
|
|
By: Paul Sauve <paul@technove.co>
|
|
As part of: Airplane (https://github.com/TECHNOVE/Airplane)
|
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
|
|
* Airplane copyright *
|
|
|
|
Airplane
|
|
Copyright (C) 2020 Technove LLC
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
|
index aee0147649d458b87d92496eda0c1723ebe570d2..7e9243f76f77df2f2c5744d2dd17187c215d6e08 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java
|
|
@@ -121,6 +121,7 @@ public abstract class MoveToBlockGoal extends Goal {
|
|
for (int m = 0; m <= l; m = m > 0 ? -m : 1 - m) {
|
|
for (int n = m < l && m > -l ? l : 0; n <= l; n = n > 0 ? -n : 1 - n) {
|
|
mutableBlockPos.setWithOffset(blockPos, m, k - 1, n);
|
|
+ if (!this.mob.level().hasChunkAt(mutableBlockPos)) continue; // Gale - Airplane - block goal does not load chunks - if this block isn't loaded, continue
|
|
if (this.mob.isWithinRestriction(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) {
|
|
this.blockPos = mutableBlockPos;
|
|
this.mob.movingTarget = mutableBlockPos == BlockPos.ZERO ? null : mutableBlockPos.immutable(); // Paper
|