9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-27 10:59:16 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0021-SIMD-support.patch
Dreeam 3b162fb788 Move Purpur patches to first
To reduce the difficulty on maintenance and reduce chances to fix conflicts on updating
2025-10-01 18:27:42 -04:00

33 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Thu, 24 Nov 2022 01:19:12 +0100
Subject: [PATCH] SIMD support
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org
This patch is based on the following patch:
"Add SIMD utilities"
By: Kevin Raneri <kevin.raneri@gmail.com>
As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
index 95974662877830cb6251b769e01b2b9c70f77c60..b051ba05ee699242e8040cfde69d598edb346a65 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -200,6 +200,13 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
org.dreeam.leaf.command.LeafCommands.registerCommands(this); // Leaf - Leaf commands
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
+ // Gale start - Pufferfish - SIMD support
+ // Initialize vectorization
+ try {
+ gg.pufferfish.pufferfish.simd.SIMDDetection.initialize();
+ } catch (Throwable ignored) {}
+ // Gale end - Pufferfish - SIMD support
+
this.setPvpAllowed(properties.pvp);
this.setFlightAllowed(properties.allowFlight);
this.setMotd(properties.motd);