mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-28 19:19:09 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@f9c7f2a Begin switching to JSpecify annotations (#11448) PaperMC/Paper@e3c8a8e Add PlayerInsertLecternBookEvent [1.20 port] (#7305) PaperMC/Paper@b410fe8 Configurable per-world void damage offset/damage(#11436) PaperMC/Paper@ea00be3 Do not NPE on uuid resolution in player profile (#11449)
51 lines
2.9 KiB
Diff
51 lines
2.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martijn Muijsers <martijnmuijsers@live.nl>
|
|
Date: Sun, 25 Dec 2022 16:55:45 +0100
|
|
Subject: [PATCH] Load portal destination chunk before entity teleport
|
|
|
|
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:
|
|
"Load chunks when entities go through an end portal"
|
|
By: PureGero <puregero@gmail.com>
|
|
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/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index 1e5d1f8650277d1867e336735a715c9ae8677cd9..9bd19182fe33346baf0b2503d90d6cd54e12df3a 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -4009,7 +4009,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
|
|
if (entity == null) {
|
|
return false;
|
|
+ // Gale start - MultiPaper - load portal destination chunk before entity teleport
|
|
+ } else {
|
|
+ if (entity.level.galeConfig().gameplayMechanics.technical.loadPortalDestinationChunkBeforeEntityTeleport) {
|
|
+ BlockPos pos = BlockPos.containing(position);
|
|
+ world.getChunkSource().addRegionTicket(TicketType.PORTAL, new ChunkPos(pos), 1, pos);
|
|
+ world.getChunkAt(pos);
|
|
+ }
|
|
}
|
|
+ // Gale end - MultiPaper - load portal destination chunk before entity teleport
|
|
|
|
entity.restoreFrom(this);
|
|
entity.moveTo(destX, destY, destZ, yaw, f2);
|
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
index 93f4be842259ede94c94588f266c2270546e8311..fd5d02f8b1b1e2e84e6bda4885f091a000cbcbc9 100644
|
|
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
@@ -124,6 +124,11 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
|
|
|
}
|
|
|
|
+ public Technical technical;
|
|
+ public class Technical extends ConfigurationPart {
|
|
+ public boolean loadPortalDestinationChunkBeforeEntityTeleport = false; // Gale - MultiPaper - load portal destination chunk before entity teleport
|
|
+ }
|
|
+
|
|
public boolean arrowMovementResetsDespawnCounter = true; // Gale - Purpur - make arrow movement resetting despawn counter configurable
|
|
public double entityWakeUpDurationRatioStandardDeviation = 0.2; // Gale - variable entity wake-up duration
|
|
public boolean hideFlamesOnEntitiesWithFireResistance = false; // Gale - Slice - hide flames on entities with fire resistance
|