2020-04-15 14:22:03 +02:00
|
|
|
package com.minelittlepony.unicopia;
|
2019-01-13 21:07:44 +01:00
|
|
|
|
2022-10-17 17:28:13 +02:00
|
|
|
import java.util.HashSet;
|
2020-04-25 13:32:33 +02:00
|
|
|
import java.util.Set;
|
2019-01-13 21:07:44 +01:00
|
|
|
|
2023-09-10 19:51:21 +02:00
|
|
|
import com.google.gson.GsonBuilder;
|
2020-04-25 13:32:33 +02:00
|
|
|
import com.minelittlepony.common.util.GamePaths;
|
2023-09-10 19:51:21 +02:00
|
|
|
import com.minelittlepony.common.util.registry.RegistryTypeAdapter;
|
2022-10-12 19:30:06 +02:00
|
|
|
import com.minelittlepony.common.util.settings.*;
|
2019-01-13 21:07:44 +01:00
|
|
|
|
2022-10-12 19:30:06 +02:00
|
|
|
public class Config extends com.minelittlepony.common.util.settings.Config {
|
2022-10-17 17:28:13 +02:00
|
|
|
public final Setting<Set<String>> speciesWhiteList = value("server", "speciesWhiteList", (Set<String>)new HashSet<String>())
|
2022-10-12 19:30:06 +02:00
|
|
|
.addComment("A whitelist of races permitted on the server")
|
|
|
|
.addComment("Races added to this list can be used by anyone,")
|
|
|
|
.addComment("whilst any ones left off are not permitted")
|
|
|
|
.addComment("An empty list disables whitelisting entirely.");
|
2019-01-13 21:07:44 +01:00
|
|
|
|
2024-04-26 17:09:37 +02:00
|
|
|
@Deprecated
|
2023-05-05 22:12:21 +02:00
|
|
|
public final Setting<Set<String>> wantItNeedItEntityExcludelist = value("server", "wantItNeedItEntityExcludelist", (Set<String>)new HashSet<>(Set.of("minecraft:creeper")))
|
|
|
|
.addComment("A list of entity types that are immune to the want it need it spell's effects");
|
|
|
|
|
2024-04-26 17:09:37 +02:00
|
|
|
@Deprecated
|
2023-09-11 00:28:53 +02:00
|
|
|
public final Setting<Set<String>> dimensionsWithoutAtmosphere = value("server", "dimensionsWithoutAtmosphere", (Set<String>)new HashSet<String>())
|
|
|
|
.addComment("A list of dimensions ids that do not have an atmosphere, and thus shouldn't allow pegasi to fly.");
|
|
|
|
|
2022-10-12 19:30:06 +02:00
|
|
|
public final Setting<Boolean> enableCheats = value("server", "enableCheats", false)
|
2023-09-11 00:28:53 +02:00
|
|
|
.addComment("Allows use of the /tribe, /unicopia disguise, and /unicopia gravity commands");
|
2022-10-11 17:19:50 +02:00
|
|
|
|
2022-10-12 19:30:06 +02:00
|
|
|
public final Setting<Race> preferredRace = value("client", "preferredRace", Race.EARTH)
|
|
|
|
.addComment("The default preferred race")
|
|
|
|
.addComment("This is the race a client requests when first joining a game")
|
|
|
|
.addComment("It is the default used both when Mine Little Pony is not installed")
|
|
|
|
.addComment("and when they respond with a human race.");
|
2019-01-27 20:34:02 +01:00
|
|
|
|
2022-10-12 19:30:06 +02:00
|
|
|
public final Setting<Boolean> ignoreMineLP = value("client", "ignoreMineLP", false)
|
|
|
|
.addComment("If true Mine Little Pony will not be considered when determining the race to use")
|
|
|
|
.addComment("The result will always be what is set by this config file.");
|
2019-01-27 20:34:02 +01:00
|
|
|
|
2024-04-08 23:13:08 +02:00
|
|
|
public final Setting<Boolean> toggleAbilityKeys = value("client", "toggleAbilityKeys", false)
|
|
|
|
.addComment("If true the ability keybinds will function as toggle keys rather than hold keys");
|
|
|
|
|
2022-12-27 20:40:24 +01:00
|
|
|
public final Setting<Integer> hudPage = value("client", "hudActivePage", 0)
|
|
|
|
.addComment("The page of abilities currently visible in the HUD. You can change this in-game using the PG_UP and PG_DWN keys (configurable)");
|
|
|
|
|
2022-10-12 19:30:06 +02:00
|
|
|
public final Setting<Boolean> disableWaterPlantsFix = value("compatibility", "disableWaterPlantsFix", false)
|
|
|
|
.addComment("Disables this mod's built in fix for making sea plants waterlogged")
|
|
|
|
.addComment("Turn this ON if you're using another mod that does something similar of if you encounter copatibility issues with other mods.");
|
2022-10-11 17:19:06 +02:00
|
|
|
|
2022-12-04 16:57:53 +01:00
|
|
|
public final Setting<Boolean> disableButterflySpawning = value("compatibility", "disableButterflySpawning", false)
|
|
|
|
.addComment("Removes butterflies from spawning in your world")
|
|
|
|
.addComment("Turn this ON if you have another mod that adds butterflies.");
|
|
|
|
|
2024-01-27 05:21:31 +01:00
|
|
|
public final Setting<Boolean> simplifiedPortals = value("compatibility", "simplifiedPortals", false)
|
|
|
|
.addComment("Disables dynamic portal rendering");
|
|
|
|
|
2024-02-11 12:01:35 +01:00
|
|
|
public final Setting<Boolean> disableShaders = value("compatibility", "disableShaders", false)
|
|
|
|
.addComment("Disables post-effect shaders used by the corruption mechanic");
|
|
|
|
|
2024-01-27 05:21:31 +01:00
|
|
|
public final Setting<Long> fancyPortalRefreshRate = value("client", "fancyPortalRefreshRate", -1L)
|
|
|
|
.addComment("Sets the refresh rate of portals when using fancy portal rendering")
|
|
|
|
.addComment("Set to -1 (default) for unlimited");
|
|
|
|
|
|
|
|
public final Setting<Integer> maxPortalRecursion = value("client", "maxPortalRecursion", 2)
|
|
|
|
.addComment("Sets the maximum depth to reach when rendering portals through portals");
|
|
|
|
|
2021-02-07 18:57:35 +01:00
|
|
|
public Config() {
|
2023-09-10 19:51:21 +02:00
|
|
|
super(new HeirarchicalJsonConfigAdapter(new GsonBuilder()
|
|
|
|
.registerTypeAdapter(Race.class, RegistryTypeAdapter.of(Race.REGISTRY))
|
|
|
|
), GamePaths.getConfigDirectory().resolve("unicopia.json"));
|
2019-01-27 20:34:02 +01:00
|
|
|
}
|
2024-04-26 17:09:37 +02:00
|
|
|
|
|
|
|
public SyncedConfig toSynced() {
|
|
|
|
return new SyncedConfig(wantItNeedItEntityExcludelist.get(), dimensionsWithoutAtmosphere.get());
|
|
|
|
}
|
2019-01-13 21:07:44 +01:00
|
|
|
}
|