mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
--------- Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Fortern <blueten.ki@gmail.com> Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com> Co-authored-by: MC_XiaoHei <xiaohei.xor7@outlook.com>
46 lines
3.1 KiB
Diff
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 8c3151c25c172b846f0d028b5100718ada2d09d7..d59d05f8894481fb5ebe1aeb8ee7a162b3dc6f1c 100644
|
|
--- a/com/mojang/authlib/yggdrasil/YggdrasilMinecraftSessionService.java
|
|
+++ b/com/mojang/authlib/yggdrasil/YggdrasilMinecraftSessionService.java
|
|
@@ -46,7 +46,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 9c9b601a3f903bebb0dd1bda0e24745587229727..4cde785a679dccc3dfa42272e6094328e9ce98c1 100644
|
|
--- a/net/minecraft/server/Main.java
|
|
+++ b/net/minecraft/server/Main.java
|
|
@@ -177,7 +177,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 105c207b8db2c505f256f4104642af5929b50aa9..50f73905e6785d87a0faf886802d956a1c7b9751 100644
|
|
--- a/net/minecraft/server/MinecraftServer.java
|
|
+++ b/net/minecraft/server/MinecraftServer.java
|
|
@@ -244,7 +244,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 long lastServerStatus;
|
|
public final Thread serverThread;
|
|
private long lastTickNanos = Util.getNanos();
|