mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 11:27:35 +01:00
more runtime errors
This commit is contained in:
parent
b40c4e2179
commit
e3b23b59f3
@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/protocol/common/custom/DiscardedPayload.java
|
||||
+++ b/net/minecraft/network/protocol/common/custom/DiscardedPayload.java
|
||||
@@ -4,13 +_,15 @@
|
||||
@@ -4,13 +_,14 @@
|
||||
import net.minecraft.network.codec.StreamCodec;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
+ }, buffer -> {
|
||||
int i = buffer.readableBytes();
|
||||
if (i >= 0 && i <= maxSize) {
|
||||
buffer.skipBytes(i);
|
||||
- buffer.skipBytes(i);
|
||||
- return new DiscardedPayload(id);
|
||||
+ return new DiscardedPayload(id, buffer.readBytes(i)); // CraftBukkit
|
||||
} else {
|
||||
|
@ -69,7 +69,8 @@
|
||||
+
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
|
||||
AtomicReference<S> atomicReference = new AtomicReference<>();
|
||||
Thread thread = new Thread(() -> atomicReference.get().runServer(), "Server thread");
|
||||
- Thread thread = new Thread(() -> atomicReference.get().runServer(), "Server thread");
|
||||
+ Thread thread = new ca.spottedleaf.moonrise.common.util.TickThread(() -> atomicReference.get().runServer(), "Server thread");
|
||||
thread.setUncaughtExceptionHandler((thread1, exception) -> LOGGER.error("Uncaught exception in server thread", exception));
|
||||
+ thread.setPriority(Thread.NORM_PRIORITY+2); // Paper - Perf: Boost priority
|
||||
if (Runtime.getRuntime().availableProcessors() > 4) {
|
||||
|
Loading…
Reference in New Issue
Block a user