Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/net/pl3x/map/core/Pl3xMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/net/pl3x/map/core/util/SpiFix.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -264,6 +264,6 @@ public static void forceRegisterSpis() {
registry.registerServiceProvider(new SetErrorHandler.Builder());

// org.xnio.XnioProvider
registry.registerServiceProvider(new NioXnioProvider());
//registry.registerServiceProvider(new NioXnioProvider());
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down