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/0035-Leaves-Extra-Yggdrasil-Service.patch
violetc d5c9306a7f 1.21.4 (#413)
* init 1.21.4, and boom!

* build change, but weight not work

* just work

* Build changes, and delete timings

* Fix API patches (#406)

* Fix API patches

* merge

---------

Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com>

* 0006/0129

* 0009/0129

* 0011/0129

* 0018/0129

* 0030/0129

* 0035/0129

* 0043/0129

* 0048/0129

* 0049/0129

* 0057/0129

* 0065/0129

* 0086/0129 (#408)

* 0072/0129

* 0080/0129

* Readd patch infos

* 0086/0129

* Delete applied patches

* 0087/0129

* 0091/0129

* 0097/0129

* 0101/0129

* 102/129

* 0107/0129

* 0112/0129

* 0118/0129

* 0129/0129, 100% patched

* fix some

* server work

* Protocol... (#409)

* Jade v7

* Fix changed part for Jade

* Formatting imports, add Lms Paster protocol

* REI payloads 5/8

* Add REI support, remove unnecessary content in Jade

* Rename

* Make jade better

* Make action work

* fix action jar

* Fix some protocol

* Fix bot action, and entity tickCount

* Fix Warden GameEventListener register on load

* Fix extra Raider drop

* Fix grindstone overstacking

* Update Paper, and some doc

* Merge

* [ci skip] Update Action

---------

Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com>
2025-02-14 23:55:46 +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 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 9aa664537cc37e44db46d5a2a64ae3116938c681..1a5a8ad60240c0864875f6314e01adab4a283ddf 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 09fc1c1923f7cc4470cca3b703810fb165c4ca15..1ce3afe6c3e3b7c0aad2706215d75a265d892070 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -245,7 +245,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();