mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-23 00:39:16 +00:00
move small patches back to sources
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -195,6 +_,26 @@
|
||||
// Purpur end - Purpur config files
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
|
||||
+ // DivineMC start - Pufferfish SIMD
|
||||
+ try {
|
||||
+ gg.pufferfish.pufferfish.simd.SIMDDetection.isEnabled = gg.pufferfish.pufferfish.simd.SIMDDetection.canEnable(LOGGER);
|
||||
+ gg.pufferfish.pufferfish.simd.SIMDDetection.versionLimited = gg.pufferfish.pufferfish.simd.SIMDDetection.getJavaVersion() < 17 || gg.pufferfish.pufferfish.simd.SIMDDetection.getJavaVersion() > 21;
|
||||
+ } catch (NoClassDefFoundError | Exception ignored) {
|
||||
+ ignored.printStackTrace();
|
||||
+ }
|
||||
+
|
||||
+ if (gg.pufferfish.pufferfish.simd.SIMDDetection.isEnabled) {
|
||||
+ LOGGER.info("SIMD operations detected as functional. Will replace some operations with faster versions.");
|
||||
+ } else if (gg.pufferfish.pufferfish.simd.SIMDDetection.versionLimited) {
|
||||
+ LOGGER.warn("Will not enable SIMD! These optimizations are only safely supported on Java 17 and higher.");
|
||||
+ } else {
|
||||
+ LOGGER.warn("SIMD operations are available for your server, but are not configured!");
|
||||
+ LOGGER.warn("To enable additional optimizations, add \"--add-modules=jdk.incubator.vector\" to your startup flags, BEFORE the \"-jar\".");
|
||||
+ LOGGER.warn("If you have already added this flag, then SIMD operations are not supported on your JVM or CPU.");
|
||||
+ LOGGER.warn("Debug: Java: {}, test run: {}", System.getProperty("java.version"), gg.pufferfish.pufferfish.simd.SIMDDetection.testRun);
|
||||
+ }
|
||||
+ // DivineMC end - Pufferfish SIMD
|
||||
+
|
||||
this.setPvpAllowed(properties.pvp);
|
||||
this.setFlightAllowed(properties.allowFlight);
|
||||
this.setMotd(properties.motd);
|
||||
@@ -275,7 +_,7 @@
|
||||
String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord";
|
||||
String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/";
|
||||
// Paper end - Add Velocity IP Forwarding Support
|
||||
- if (!this.usesAuthentication()) {
|
||||
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()) { // DivineMC - Disable offline warn if using proxy
|
||||
LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
|
||||
LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
|
||||
// Spigot start
|
||||
Reference in New Issue
Block a user