9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-30 20:29:10 +00:00

[ci-skip] fix linear region patch

This commit is contained in:
NONPLAYT
2024-04-17 00:29:46 +03:00
parent a00a536905
commit cb78fe9ff2
6 changed files with 236 additions and 501 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Improve biome temperature cache
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
index 57f3193ff761cbe45846a02a15d8da9c9e2e87ee..93a7647b19315aa4dc2f0a236fac330de4bed813 100644
index 42af3888a155f114901a90d4028bafed5789f58f..25e44dbab2d758682ad89ed0038fd0ad055d3097 100644
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
@@ -64,7 +64,7 @@ public final class Biome {
@@ -14,9 +14,9 @@ index 57f3193ff761cbe45846a02a15d8da9c9e2e87ee..93a7647b19315aa4dc2f0a236fac330d
// Pufferfish start - use our cache
- private final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> Util.make(() -> {
+ private static final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> Util.make(() -> {
/*
Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
protected void rehash(int i) {
/*
Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
protected void rehash(int i) {
@@ -118,7 +118,7 @@ public final class Biome {
public float getTemperature(BlockPos blockPos) {
long l = blockPos.asLong();

View File

@@ -0,0 +1,28 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Tue, 16 Apr 2024 01:20:51 +0300
Subject: [PATCH] Add Higher Java Version for Pufferfish SIMD
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
index 8afc58f35deb49084a20b803e91ce4692ce6e4d6..581eb4ca8d7a09729ad9194d35f3cceeb291ecf7 100644
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -87,7 +87,7 @@ public class PufferfishConfig {
// Attempt to detect vectorization
try {
SIMDDetection.isEnabled = SIMDDetection.canEnable(PufferfishLogger.LOGGER);
- SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() < 17 || SIMDDetection.getJavaVersion() > 21;
+ SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() < 17; // DivineMC - Add Higher Java Version for Pufferfish SIMD
} catch (NoClassDefFoundError | Exception ignored) {
ignored.printStackTrace();
}
@@ -95,7 +95,7 @@ public class PufferfishConfig {
if (SIMDDetection.isEnabled) {
PufferfishLogger.LOGGER.info("SIMD operations detected as functional. Will replace some operations with faster versions.");
} else if (SIMDDetection.versionLimited) {
- PufferfishLogger.LOGGER.warning("Will not enable SIMD! These optimizations are only safely supported on Java 17 through Java 21.");
+ PufferfishLogger.LOGGER.warning("Will not enable SIMD! These optimizations are only safely supported on Java 17 and higher.");
} else {
PufferfishLogger.LOGGER.warning("SIMD operations are available for your server, but are not configured!");
PufferfishLogger.LOGGER.warning("To enable additional optimizations, add \"--add-modules=jdk.incubator.vector\" to your startup flags, BEFORE the \"-jar\".");

View File

@@ -0,0 +1,28 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Tue, 16 Apr 2024 01:26:18 +0300
Subject: [PATCH] Fix chat signing
diff --git a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
index 67eeb39aede6908d2756e49821ca350ebe916902..740d3bd228eed7b322d98ac77c15429c3f2e3d68 100644
--- a/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
+++ b/src/main/java/net/minecraft/network/chat/SignedMessageChain.java
@@ -41,16 +41,7 @@ public class SignedMessageChain {
throw new SignedMessageChain.DecodeException(Component.translatable("multiplayer.disconnect.out_of_order_chat"), true, org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event causes
} else {
this.lastTimeStamp = body.timeStamp();
- PlayerChatMessage playerChatMessage = new PlayerChatMessage(signedMessageLink, signature, body, null, FilterMask.PASS_THROUGH);
- if (!playerChatMessage.verify(signatureValidator)) {
- throw new SignedMessageChain.DecodeException(Component.translatable("multiplayer.disconnect.unsigned_chat"), true, org.bukkit.event.player.PlayerKickEvent.Cause.UNSIGNED_CHAT); // Paper - kick event causes
- } else {
- if (playerChatMessage.hasExpiredServer(Instant.now())) {
- LOGGER.warn("Received expired chat: '{}'. Is the client/server system time unsynchronized?", body.content());
- }
-
- return playerChatMessage;
- }
+ return new PlayerChatMessage(signedMessageLink, signature, body, null, FilterMask.PASS_THROUGH); // DivineMC - Fix chat signing
}
};
}

File diff suppressed because it is too large Load Diff