From 7939b65f7cc5cb8ec15f058ba89cc0aea4f5e709 Mon Sep 17 00:00:00 2001 From: granny Date: Fri, 20 Oct 2023 17:36:35 -0700 Subject: [PATCH] comment out SpiFix since it seems to be no longer needed --- build.gradle | 2 +- core/src/main/java/net/pl3x/map/core/Pl3xMap.java | 6 +++--- core/src/main/java/net/pl3x/map/core/util/SpiFix.java | 4 ++-- gradle.properties | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 3c5e795e5..9bca34c6a 100644 --- a/build.gradle +++ b/build.gradle @@ -134,7 +134,7 @@ allprojects { } implementation "io.undertow:undertow-core:$undertowVersion" - implementation "org.jboss.xnio:xnio-nio:$xnioVersion" + //implementation "org.jboss.xnio:xnio-nio:$xnioVersion" // provided by mojang compileOnly "com.google.code.gson:gson:$gsonVersion" diff --git a/core/src/main/java/net/pl3x/map/core/Pl3xMap.java b/core/src/main/java/net/pl3x/map/core/Pl3xMap.java index 7ec1f8466..b74a578d3 100644 --- a/core/src/main/java/net/pl3x/map/core/Pl3xMap.java +++ b/core/src/main/java/net/pl3x/map/core/Pl3xMap.java @@ -61,7 +61,7 @@ import net.pl3x.map.core.renderer.task.UpdateSettingsData; import net.pl3x.map.core.scheduler.Scheduler; import net.pl3x.map.core.util.Mathf; -import net.pl3x.map.core.util.SpiFix; + import net.pl3x.map.core.world.Biome; import net.pl3x.map.core.world.Block; import net.pl3x.map.core.world.Blocks; @@ -99,14 +99,14 @@ public abstract class Pl3xMap { public Pl3xMap(boolean isBukkit) { this.isBukkit = isBukkit; - try { + /*try { // Due to these bugs(?) in spi // * relocated libraries cant find their services (xnio fails) // * imageio fails to find twelvemonkeys spis at all // I am forced to load them all myself instead of relying on the META-INF SpiFix.forceRegisterSpis(); } catch (Throwable ignore) { - } + }*/ try { Field api = Provider.class.getDeclaredField("api"); diff --git a/core/src/main/java/net/pl3x/map/core/util/SpiFix.java b/core/src/main/java/net/pl3x/map/core/util/SpiFix.java index 985f40119..4c33fcc42 100644 --- a/core/src/main/java/net/pl3x/map/core/util/SpiFix.java +++ b/core/src/main/java/net/pl3x/map/core/util/SpiFix.java @@ -133,7 +133,7 @@ import io.undertow.server.handlers.proxy.ProxyHandlerBuilder; import io.undertow.server.handlers.resource.ResourceHandler; import javax.imageio.spi.IIORegistry; -import org.xnio.nio.NioXnioProvider; + @SuppressWarnings("deprecation") public class SpiFix { @@ -264,6 +264,6 @@ public static void forceRegisterSpis() { registry.registerServiceProvider(new SetErrorHandler.Builder()); // org.xnio.XnioProvider - registry.registerServiceProvider(new NioXnioProvider()); + //registry.registerServiceProvider(new NioXnioProvider()); } } diff --git a/gradle.properties b/gradle.properties index 5fc702c17..586c07a42 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,7 +27,7 @@ querzNbtVersion=6.1 simpleYamlVersion=1.8.3 slf4jVersion=2.0.1 undertowVersion=2.3.5.Final -xnioVersion=3.8.8.Final +#xnioVersion=3.8.8.Final authors=["BillyGalbreath", "JLyne"] description=Minimalistic and lightweight world map viewer for Minecraft servers