-
-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Opt-in to Neo's config gui to allow modifying our configs when the ga…
…me is running (#5794)
- Loading branch information
1 parent
0601185
commit 8ab6c52
Showing
36 changed files
with
571 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
src/additions/java/mekanism/additions/common/config/AdditionsConfigTranslations.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package mekanism.additions.common.config; | ||
|
||
import mekanism.additions.common.MekanismAdditions; | ||
import mekanism.common.config.IConfigTranslation; | ||
import net.minecraft.Util; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public enum AdditionsConfigTranslations implements IConfigTranslation { | ||
CLIENT_TOP_LEVEL("client", "Mekanism Additions Client Config. This config only exists on the client"), | ||
|
||
CLIENT_VOICE_KEY_TOGGLE("client.voice_key_is_toggle", "If the voice server is enabled and voiceKeyIsToggle is also enabled, the voice key will " | ||
+ "act as a toggle instead of requiring to be held while talking."), | ||
|
||
SERVER_TOP_LEVEL("server", "Mekanism Additions Config. This config is synced between server and client."), | ||
|
||
SERVER_OBSIDIAN_DELAY("server.obsidian_tnt.delay", "Fuse time for Obsidian TNT."), | ||
SERVER_OBSIDIAN_RADIUS("server.obsidian_tnt.radius", "Radius of the explosion of Obsidian TNT."), | ||
|
||
SERVER_VOICE_ENABLED("server.voice.enabled", "Enables the voice server for Walkie Talkies."), | ||
SERVER_VOICE_PORT("server.voice.port", "TCP port for the Voice server to listen on."), | ||
|
||
SERVER_BABY_ARROW_DAMAGE("server.baby.arrow_damage_multiplier", "Damage multiplier of arrows shot by baby mobs."), | ||
SERVER_BABY_SPAWNING("server.baby.spawning", "Config options regarding spawning of entities."), | ||
|
||
; | ||
|
||
private final String key; | ||
private final String translation; | ||
|
||
AdditionsConfigTranslations(String path, String translation) { | ||
this.key = Util.makeDescriptionId("configuration", MekanismAdditions.rl(path)); | ||
this.translation = translation; | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public String getTranslationKey() { | ||
return key; | ||
} | ||
|
||
@Override | ||
public String translation() { | ||
return translation; | ||
} | ||
|
||
public record BabySpawnTranslations( | ||
IConfigTranslation topLevel, | ||
IConfigTranslation shouldSpawn, | ||
IConfigTranslation weight, | ||
IConfigTranslation minSize, | ||
IConfigTranslation maxSize, | ||
IConfigTranslation costPerEntity, | ||
IConfigTranslation maxCost, | ||
IConfigTranslation biomeBlacklist, | ||
IConfigTranslation structureBlacklist | ||
) { | ||
|
||
private static String getKey(String name, String path) { | ||
name = name.replace(" ", "_"); | ||
return Util.makeDescriptionId("configuration", MekanismAdditions.rl("server.baby.spawning." + name + "." + path)); | ||
} | ||
|
||
public static BabySpawnTranslations create(String name) { | ||
return new BabySpawnTranslations( | ||
new ConfigTranslation(getKey(name, "top_level"), "Config options regarding " + name + "."), | ||
new ConfigTranslation(getKey(name, "should_spawn"), "Enable the spawning of " + name + ". Think baby zombies."), | ||
new ConfigTranslation(getKey(name, "weight"), "The multiplier for weight of " + name + " spawns, compared to the adult mob."), | ||
new ConfigTranslation(getKey(name, "min_size"), "The multiplier for minimum group size of " + name + " spawns, compared to the adult mob."), | ||
new ConfigTranslation(getKey(name, "max_size"), "The multiplier for maximum group size of " + name + " spawns, compared to the adult mob."), | ||
new ConfigTranslation(getKey(name, "cost_per_entity"), "The multiplier for spawn cost per entity of " + name + " spawns, compared to the adult mob."), | ||
new ConfigTranslation(getKey(name, "max_cost"), "The multiplier for max spawn cost of " + name + " spawns, compared to the adult mob."), | ||
new ConfigTranslation(getKey(name, "biome_blacklist"), "The list of biome ids that " + name + " will not spawn in even if the normal mob variant can spawn."), | ||
new ConfigTranslation(getKey(name, "structure_blacklist"), "The list of structure ids that " + name + " will not spawn in even if the normal mob variant can spawn.") | ||
); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/datagen/generated/mekanism/.cache/c10fcd8abbb6a520fc3ac2cf14b627d36958dd55
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
src/datagen/generated/mekanismadditions/.cache/dfe6eafb7c0d05a49bee122125cab06c7b53ab0b
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.