diff --git a/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiServerFolderNameMode.java b/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiServerFolderNameMode.java new file mode 100644 index 000000000..5b99c1cdf --- /dev/null +++ b/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiServerFolderNameMode.java @@ -0,0 +1,72 @@ +/* + * This file is part of the Distant Horizons mod (formerly the LOD Mod), + * licensed under the GNU LGPL v3 License. + * + * Copyright (C) 2022 Tom Lee (TomTheFurry) + * Copyright (C) 2020-2022 James Seibel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.seibel.lod.core.api.external.apiObjects.enums; + +/** + * AUTO,
+ * NAME_ONLY,
+ * NAME_IP,
+ * NAME_IP_PORT,

+ * + * Determines how the multiplayer folders should be named. + * + * @author James Seibel + * @version 2022-7-1 + */ +public enum EDhApiServerFolderNameMode +{ + // Reminder: + // when adding items up the API minor version + // when removing items up the API major version + + + /** + * NAME_IP for LAN connections
+ * NAME_IP_PORT for all others + */ + AUTO, + + /** Only use the server name */ + NAME_ONLY, + + /** + * {SERVER_NAME} IP {IP}
+ * Example: Minecraft Server IP 192.168.1.40 + */ + NAME_IP, + + /** + * {SERVER_NAME} IP {IP}:{PORT}
+ * Example: Minecraft Server IP 192.168.1.40:25565 + */ + NAME_IP_PORT, + + /** + * {SERVER_NAME} IP {IP}
+ * Example: Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5

+ * + * Not normally recommended, since the game version can change if the + * server installs paper or some other jar.
+ * This is just here to provide backwards compatibility. + */ + NAME_IP_PORT_MC_VERSION; + +} diff --git a/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiMultiplayer.java b/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiMultiplayer.java new file mode 100644 index 000000000..4a908a3e0 --- /dev/null +++ b/src/main/java/com/seibel/lod/core/api/external/config/client/DhApiMultiplayer.java @@ -0,0 +1,36 @@ +package com.seibel.lod.core.api.external.config.client; + +import com.seibel.lod.core.api.external.apiObjects.enums.EDhApiDistanceGenerationMode; +import com.seibel.lod.core.api.external.apiObjects.enums.EDhApiServerFolderNameMode; +import com.seibel.lod.core.api.external.apiObjects.wrapperInterfaces.IDhApiConfig; +import com.seibel.lod.core.api.implementation.objects.GenericEnumConverter; +import com.seibel.lod.core.api.implementation.wrappers.DhApiConfig; +import com.seibel.lod.core.config.Config.Client.Multiplayer; +import com.seibel.lod.core.enums.config.EServerFolderNameMode; + +/** + * Multiplayer settings. + * + * @author James Seibel + * @version 2022-7-2 + */ +public class DhApiMultiplayer +{ + + /** + * Returns the config related to how Distant Horizons + * names multiplayer server folders. + */ + public static IDhApiConfig getFolderSavingModeConfig() + { return new DhApiConfig<>(Multiplayer.serverFolderNameMode, new GenericEnumConverter<>(EServerFolderNameMode.class, EDhApiServerFolderNameMode.class)); } + + /** + * Returns the config related to how Distant Horizons' determines + * what level a specific dimension belongs too.
+ * This is specifically to support serverside mods like Multiverse. + */ + public static IDhApiConfig getDistantGeneratorModeConfig() + { return new DhApiConfig<>(Multiplayer.multiDimensionRequiredSimilarity); } + + +} diff --git a/src/main/java/com/seibel/lod/core/config/Config.java b/src/main/java/com/seibel/lod/core/config/Config.java index d70e11c71..7f92ba652 100644 --- a/src/main/java/com/seibel/lod/core/config/Config.java +++ b/src/main/java/com/seibel/lod/core/config/Config.java @@ -630,7 +630,8 @@ public class Config + " " + EServerFolderNameMode.AUTO + ": " + EServerFolderNameMode.NAME_IP + " for LAN connections, " + EServerFolderNameMode.NAME_IP_PORT + " for all others. \n" + " " + EServerFolderNameMode.NAME_ONLY + ": Example: \"Minecraft Server\" \n" + " " + EServerFolderNameMode.NAME_IP + ": Example: \"Minecraft Server IP 192.168.1.40\" \n" - + " " + EServerFolderNameMode.NAME_IP_PORT + ": Example: \"Minecraft Server IP 192.168.1.40:25565\"") + + " " + EServerFolderNameMode.NAME_IP_PORT + ": Example: \"Minecraft Server IP 192.168.1.40:25565\"" + + " " + EServerFolderNameMode.NAME_IP_PORT_MC_VERSION + ": Example: \"Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5\"") .build(); public static ConfigEntry multiDimensionRequiredSimilarity = new ConfigEntry.Builder() diff --git a/src/main/java/com/seibel/lod/core/enums/config/EServerFolderNameMode.java b/src/main/java/com/seibel/lod/core/enums/config/EServerFolderNameMode.java index 2cba2c007..defc01a64 100644 --- a/src/main/java/com/seibel/lod/core/enums/config/EServerFolderNameMode.java +++ b/src/main/java/com/seibel/lod/core/enums/config/EServerFolderNameMode.java @@ -21,18 +21,23 @@ package com.seibel.lod.core.enums.config; /** - * AUTO
- * NAME_ONLY
- * NAME_IP
- * NAME_IP_PORT
- *
+ * AUTO,
+ * NAME_ONLY,
+ * NAME_IP,
+ * NAME_IP_PORT,

+ * * Determines how the multiplayer folders should be named. * * @author James Seibel - * @version 3-7-2022 + * @version 2022-7-1 */ public enum EServerFolderNameMode { + // Reminder: + // when adding items up the API minor version + // when removing items up the API major version + + /** * NAME_IP for LAN connections
* NAME_IP_PORT for all others @@ -44,25 +49,23 @@ public enum EServerFolderNameMode /** * {SERVER_NAME} IP {IP}
- * Minecraft Server IP 192.168.1.40 + * Example: Minecraft Server IP 192.168.1.40 */ NAME_IP, - /** - * {SERVER_NAME} IP {IP}
- * Minecraft Server IP 192.168.1.40:25565 + /** + * {SERVER_NAME} IP {IP}:{PORT}
+ * Example: Minecraft Server IP 192.168.1.40:25565 */ NAME_IP_PORT, /** * {SERVER_NAME} IP {IP}
- * Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5

+ * Example: Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5

* * Not normally recommended, since the game version can change if the * server installs paper or some other jar.
* This is just here to provide backwards compatibility. - * - * TODO add this to config desc */ NAME_IP_PORT_MC_VERSION; diff --git a/src/main/java/com/seibel/lod/core/enums/rendering/ERendererType.java b/src/main/java/com/seibel/lod/core/enums/rendering/ERendererType.java index a7bd75381..b1efbfb58 100644 --- a/src/main/java/com/seibel/lod/core/enums/rendering/ERendererType.java +++ b/src/main/java/com/seibel/lod/core/enums/rendering/ERendererType.java @@ -32,6 +32,7 @@ public enum ERendererType // when adding items up the API minor version // when removing items up the API major version + DEFAULT, DEBUG, DISABLED;