9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00
Files
LeavesMC/leaves-server/minecraft-patches/features/0036-Leaves-Extra-Yggdrasil-Service.patch
MC_XiaoHei 90080d238e 1.21.10 (#752)
---------

Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com>
Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
2025-11-28 03:15:54 +08:00

46 lines
3.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Mon, 3 Feb 2025 15:48:19 +0800
Subject: [PATCH] Leaves Extra Yggdrasil Service
diff --git a/com/mojang/authlib/yggdrasil/YggdrasilMinecraftSessionService.java b/com/mojang/authlib/yggdrasil/YggdrasilMinecraftSessionService.java
index 9e5757391ea32e37b2aac52cc1bb38259a2cc497..b85593aea7a347a5c2c50464d2146f96f4fa317e 100644
--- a/com/mojang/authlib/yggdrasil/YggdrasilMinecraftSessionService.java
+++ b/com/mojang/authlib/yggdrasil/YggdrasilMinecraftSessionService.java
@@ -48,7 +48,7 @@ import java.util.stream.Collectors;
public class YggdrasilMinecraftSessionService implements MinecraftSessionService {
private static final Logger LOGGER = LoggerFactory.getLogger(YggdrasilMinecraftSessionService.class);
- private final MinecraftClient client;
+ protected final MinecraftClient client; // Leaves - private -> protected
private final ServicesKeySet servicesKeySet;
private final String baseUrl;
private final URL joinUrl;
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
index 8d299a75c80fddc61a2aa4dc5b0dc5948aef5a0d..30b681bc234eac8dc44ce3bf6e228171f5a71a7a 100644
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -176,7 +176,7 @@ public class Main {
file = new File(bukkitConfiguration.getString("settings.world-container", "."));
}
// Paper end - fix SPIGOT-5824
- Services services = Services.create(new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY), file, userCacheFile, optionSet); // Paper - pass OptionSet to load paper config files; override authentication service; fix world-container
+ Services services = Services.create(new org.leavesmc.leaves.profile.LeavesAuthenticationService(Proxy.NO_PROXY), file, userCacheFile, optionSet); // Paper - pass OptionSet to load paper config files; override authentication service; fix world-container // Leaves - extra-yggdrasil-service
// CraftBukkit start
String string = Optional.ofNullable((String) optionSet.valueOf("world")).orElse(dedicatedServerSettings.getProperties().levelName);
LevelStorageSource levelStorageSource = LevelStorageSource.createDefault(file.toPath());
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 5ad76e6483b589d6695ad086755cc9dc0edd9235..c3c93caab5981d509dd5471419f3d79cdd045f1d 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -242,7 +242,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean isDemo;
private volatile boolean isReady;
private long lastOverloadWarningNanos;
- protected final Services services;
+ public final Services services; // Leaves - protected -> public
private final NotificationManager notificationManager;
private long lastServerStatus;
public final Thread serverThread;