-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5546e90
commit 7654fc2
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
patches/server/0032-Redirect-to-Gale-s-method-to-fix-plugin-incompatibil.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> | ||
Date: Thu, 1 Feb 2024 12:48:58 -0500 | ||
Subject: [PATCH] Redirect to Gale's method to fix plugin incompatibility | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java | ||
index 6d25421091018d1dc0c7bccbce31d8b4244639bb..15c9557b07c9fc392b80e5957bc6ea12c6b89b86 100644 | ||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java | ||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java | ||
@@ -258,6 +258,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic | ||
static final Logger LOGGER = LogUtils.getLogger(); | ||
private static final int LATENCY_CHECK_INTERVAL = 15000; | ||
public static final double DEFAULT_MAX_INTERACTION_DISTANCE_SQUARED = Mth.square(6.0D); // Gale - make max interaction distance configurable | ||
+ public static double MAX_INTERACTION_DISTANCE = DEFAULT_MAX_INTERACTION_DISTANCE_SQUARED; // Leaf - Redirect to Gale's `getMaxInteractionDistanceSquared` method to fix plugin incompatibility | ||
private static final int NO_BLOCK_UPDATES_TO_ACK = -1; | ||
private static final int TRACKED_MESSAGE_DISCONNECT_THRESHOLD = 4096; | ||
private static final Component CHAT_VALIDATION_FAILED = Component.translatable("multiplayer.disconnect.chat_validation_failed"); | ||
@@ -372,7 +373,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic | ||
// Gale start - make max interaction distance configurable | ||
public static double getMaxInteractionDistanceSquared(Level level) { | ||
var config = level.galeConfig().gameplayMechanics; | ||
- return config.playerMaxInteractionDistance < 0 ? ServerGamePacketListenerImpl.DEFAULT_MAX_INTERACTION_DISTANCE_SQUARED : config.playerMaxInteractionDistanceSquared; | ||
+ // Leaf - Redirect | ||
+ MAX_INTERACTION_DISTANCE = config.playerMaxInteractionDistance < 0 ? ServerGamePacketListenerImpl.DEFAULT_MAX_INTERACTION_DISTANCE_SQUARED : config.playerMaxInteractionDistanceSquared; | ||
+ return MAX_INTERACTION_DISTANCE; | ||
+ // Leaf end | ||
} | ||
// Gale end - make max interaction distance configurable | ||
|
21 changes: 21 additions & 0 deletions
21
patches/server/0033-Redirect-vanilla-getProfiler-in-PathNavigationRegion.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> | ||
Date: Mon, 19 Feb 2024 13:10:16 -0500 | ||
Subject: [PATCH] Redirect vanilla getProfiler in PathNavigationRegion | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java | ||
index b87c9a6189161e776fa488c1ac6215edca596184..7e2bcc08cac90d4e095fc782e77bd8e64d77c220 100644 | ||
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java | ||
+++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java | ||
@@ -155,4 +155,10 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter { | ||
public int getHeight() { | ||
return this.level.getHeight(); | ||
} | ||
+ | ||
+ // Leaf start - Redirect to fix plugin incompatibility | ||
+ public net.minecraft.util.profiling.ProfilerFiller getProfiler() { | ||
+ return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Gale - Purpur - remove vanilla profiler | ||
+ } | ||
+ // Leaf end | ||
} |