9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-06 15:51:31 +00:00

[ci skip] Update comments

This commit is contained in:
Dreeam
2024-02-19 18:27:32 -05:00
parent b2439a9d0f
commit 6b046401ca
2 changed files with 10 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ 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 bdf9ee08a9661f43b7a568b2aa7e4fc7e44a48c1..f7681b61abcaddc057f4ea481176cf18ec982da7 100644
index bdf9ee08a9661f43b7a568b2aa7e4fc7e44a48c1..8a448818d42daaa004e318a0d94bbf0a54eac367 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -250,6 +250,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -16,13 +16,15 @@ index bdf9ee08a9661f43b7a568b2aa7e4fc7e44a48c1..f7681b61abcaddc057f4ea481176cf18
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");
@@ -331,7 +332,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -331,7 +332,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// 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

View File

@@ -1,19 +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 profiler
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 9c2321ebb1237b4ecd3e7f7053e5039b800d89ff..009716c07f5c6b5571792fe87b0a07a4e65fc43d 100644
index 9c2321ebb1237b4ecd3e7f7053e5039b800d89ff..589d66a2d890415e75f9e30176f0a7ada04a8bd7 100644
--- a/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
+++ b/src/main/java/net/minecraft/world/level/PathNavigationRegion.java
@@ -153,4 +153,8 @@ public class PathNavigationRegion implements BlockGetter, CollisionGetter {
@@ -153,4 +153,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 - Redirect to fix plugin incompatibility
+ return net.minecraft.util.profiling.InactiveProfiler.INSTANCE; // Gale - Purpur - remove vanilla profiler
+ }
+ // Leaf end
}