Compare commits

..

10 Commits

Author SHA1 Message Date
James Seibel bb4ac770bd remove dev from version number 2025-12-15 09:49:23 -06:00
James Seibel 16afada6e9 Fix inconsistency with server/client wrapper dim names 2025-12-15 09:49:23 -06:00
James Seibel 7d0785a5fa Fix dimension names missing namespace for multiplayer folders 2025-12-15 08:56:08 -06:00
James Seibel 6a67df462b Move GC warning into the log 2025-12-15 08:44:12 -06:00
s809 0c45c76ff8 Use a different path for zstd natives 2025-12-15 11:21:28 +05:00
James Seibel bcb442e38d Improve initial library check error handling 2025-12-14 22:29:22 -06:00
James Seibel 977ae471ea Fix auto update success dialog 2025-12-14 21:51:00 -06:00
James Seibel b1701ab0d0 remove iris unsupported error for neo 1.21.11 2025-12-14 21:20:22 -06:00
James Seibel c048d5cb56 hide LODs when underwater 2025-12-14 17:22:40 -06:00
James Seibel 2702f742d6 up version number 2.4.1 -> 2.4.2-dev 2025-12-14 17:00:44 -06:00
26 changed files with 33 additions and 18 deletions
+5 -8
View File
@@ -372,18 +372,15 @@ subprojects { p ->
// ZStd
// librariesLocation isn't used because it's too long for replacing paths in native libraries
// Allowing strings larger than the original string would require shifting the entire binary's contents
relocate "com.github.luben", "dhcomgithubluben", {
exclude "aix.ppc64/**"
exclude "darwin/**"
exclude "freebsd/**"
exclude "linux/**"
exclude "win/**"
}
relocate "com.github.luben", "dhcomgithubluben"
relocate "libzstd-jni", "libzstd-jni_dh"
relocate "zstd-jni", "zstd-jni_dh"
transform(NativeTransformer) {
rootDir = project.rootDir
matchFiles { it.contains("libzstd-jni") && !it.contains("ppc64") }
matchFiles { it.contains("libzstd-jni") && !it.contains("aix/ppc64") }
mapPaths { it.replace("libzstd-jni", "libzstd-jni_dh") }
relocateNative "com/github/luben", "dhcomgithubluben"
relocateNative "com_github_luben", "dhcomgithubluben"
@@ -293,7 +293,7 @@ public class MinecraftClientWrapper implements IMinecraftClientWrapper, IMinecra
@Override
public void crashMinecraft(String errorMessage, Throwable exception)
{
LOGGER.error(ModInfo.READABLE_NAME + " had the following error: [" + errorMessage + "]. Crashing Minecraft...", exception);
LOGGER.fatal(ModInfo.READABLE_NAME + " had the following error: [" + errorMessage + "]. Crashing Minecraft...", exception);
CrashReport report = new CrashReport(errorMessage, exception);
#if MC_VER < MC_1_20_4
Minecraft.crash(report);
@@ -259,7 +259,9 @@ public class ClientLevelWrapper implements IClientLevelWrapper
#if MC_VER <= MC_1_21_10
return this.level.dimension().location().toString();
#else
return this.level.dimension().identifier().getPath();
String namespace = this.level.dimension().identifier().getNamespace();
String path = this.level.dimension().identifier().getPath();
return namespace + "@@" + path;
#endif
}
@@ -187,7 +187,9 @@ public class ServerLevelWrapper implements IServerLevelWrapper
#if MC_VER <= MC_1_21_10
return this.level.dimension().location().toString();
#else
return this.level.dimension().identifier().getPath();
String namespace = this.level.dimension().identifier().getNamespace();
String path = this.level.dimension().identifier().getPath();
return namespace + "@@" + path;
#endif
}
@@ -25,6 +25,7 @@ import com.seibel.distanthorizons.core.config.Config;
import com.seibel.distanthorizons.core.dependencyInjection.ModAccessorInjector;
import com.seibel.distanthorizons.core.dependencyInjection.SingletonInjector;
import com.seibel.distanthorizons.core.logging.DhLoggerBuilder;
import com.seibel.distanthorizons.core.util.NativeDialogUtil;
import com.seibel.distanthorizons.core.wrapperInterfaces.minecraft.IMinecraftClientWrapper;
import com.seibel.distanthorizons.core.wrapperInterfaces.misc.IPluginPacketSender;
import com.seibel.distanthorizons.core.wrapperInterfaces.modAccessor.*;
@@ -38,7 +39,6 @@ import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.server.MinecraftServer;
import com.seibel.distanthorizons.core.logging.DhLogger;
import org.lwjgl.util.tinyfd.TinyFileDialogs;
#if MC_VER >= MC_1_19_2
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
@@ -103,7 +103,7 @@ public class FabricMain extends AbstractModInitializer implements ClientModIniti
String indiumMissingMessage = ModInfo.READABLE_NAME + " needs Indium to work with Sodium.\nPlease download Indium from https://modrinth.com/mod/indium";
LOGGER.fatal(indiumMissingMessage);
TinyFileDialogs.tinyfd_messageBox(ModInfo.READABLE_NAME, indiumMissingMessage, "ok", "error", false);
NativeDialogUtil.showDialog(ModInfo.READABLE_NAME, indiumMissingMessage, "ok", "error");
IMinecraftClientWrapper mc = SingletonInjector.INSTANCE.get(IMinecraftClientWrapper.class);
String errorMessage = "loading Distant Horizons. Distant Horizons requires Indium in order to run with Sodium.";
+1 -1
View File
@@ -5,7 +5,7 @@ org.gradle.caching=true
# Mod Info
mod_name=DistantHorizons
mod_version=2.4.1-b
mod_version=2.4.2-b
api_version=5.0.0
maven_group=com.seibel.distanthorizons
mod_readable_name=Distant Horizons
@@ -33,9 +33,9 @@ public class IrisAccessor implements IIrisAccessor
{
public IrisAccessor()
{
#if MC_VER == MC_1_21_11
throw new UnsupportedOperationException("Iris isn't supported on this version of DH. When this version of DH was created Iris wasn't available for Neoforge yet.");
#endif
//#if MC_VER == MC_1_21_11
//throw new UnsupportedOperationException("Iris isn't supported on this version of DH. When this version of DH was created Iris wasn't available for Neoforge yet.");
//#endif
}
+14
View File
@@ -12,15 +12,29 @@ How to add a library's natives:
Example:
```groovy
// Relocate the namespace (Java side)
relocate "org.sqlite", "dh_sqlite", {
// (Specific to SQLite's relocation)
// Make sure that native paths are not changed before steps below
exclude "org/sqlite/native/**"
}
// Shadow also replaces strings inside the Java code
// See the library's source code to find strings used to call into the native code
// This also includes native library paths, if you use mapPaths {} below they will likely need adjustment as well
relocate "jdbc:sqlite", "jdbc:dh_sqlite"
transform(NativeTransformer) {
// NativeTransformer configuration
rootDir = project.rootDir
// Match native libraries
matchFiles { it.startsWith("org/sqlite") }
// Replace paths with ones that won't overlap with other mods
// Libraries are the ones choosing the path to use for natives; check the source code to see which paths are acceptable.
mapPaths { it.replace("org/sqlite", "dh_sqlite") }
// Replace native strings, e.g. used in calls back to Java
// They must be of the same length or shorter!
relocateNative "org/sqlite", "dh_sqlite"
// Rename native methods used when calling from Java
relocateNative "org_sqlite", "dh_1sqlite"
Binary file not shown.
Binary file not shown.