mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 18:39:23 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b6168b7c Get console Brig suggestions from main thread fixes #13027 (#13028) PaperMC/Paper@9d1d0ef3 Add and call RegionizedServerInitEvent from Folia (#13034) PaperMC/Paper@704107c3 Resend frozen ticks when cancelling EntityInsideBlockEvent for powder snow fixes #13033 (#13035) PaperMC/Paper@63cd4af4 Fix createProfile not always returning a new profile (#13036) PaperMC/Paper@49ca2d2d chore: remove experimental status from Damageable#damage (#13021) PaperMC/Paper@65641d10 Only log name instead of full profile for configuration phase disconnects (#13038)
20 lines
1.7 KiB
Diff
20 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
|
Date: Fri, 25 Oct 2024 02:27:21 +0800
|
|
Subject: [PATCH] Virtual thread for chat executor
|
|
|
|
|
|
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
|
index 9da4c27c7d0b6c0d328d592aa78eac1d073eb1fe..07c371c4d65b4fec7b9701a7de62f18399d80df0 100644
|
|
--- a/net/minecraft/server/MinecraftServer.java
|
|
+++ b/net/minecraft/server/MinecraftServer.java
|
|
@@ -2650,7 +2650,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
|
|
public final java.util.concurrent.ExecutorService chatExecutor = java.util.concurrent.Executors.newCachedThreadPool(
|
|
- new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Chat Thread - #%d").setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build()); // Paper
|
|
+ new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Chat Thread - #%d").setThreadFactory(org.dreeam.leaf.config.modules.opt.VT4ChatExecutor.enabled ? Thread.ofVirtual().factory() : java.util.concurrent.Executors.defaultThreadFactory()).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build()); // Paper // Leaf - Virtual thread for chat executor
|
|
public final ChatDecorator improvedChatDecorator = new io.papermc.paper.adventure.ImprovedChatDecorator(this); // Paper - adventure
|
|
|
|
public ChatDecorator getChatDecorator() {
|