Skip to content

Commit 1291144

Browse files
committed
rename some settings for better clarity
1 parent 1bf114b commit 1291144

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/main/java/com/volmit/hiddenore/generation/GenerationRules.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import static com.volmit.hiddenore.generation.Blocks.getReplacement;
2222

2323
public class GenerationRules extends BlockPopulator implements Listener {
24-
private volatile Map<String, Map<Material, Material>> worldOverrides = Map.of();
24+
private volatile Map<String, Map<Material, Material>> worldExceptions = Map.of();
2525
private volatile Map<Material, Material> defaults = Map.of();
2626
private volatile boolean enabled;
2727
private final HiddenOre plugin;
@@ -37,19 +37,19 @@ public void reload() {
3737
if (config == null || !config.getBoolean("enabled", false)) {
3838
enabled = false;
3939
defaults = Map.of();
40-
worldOverrides = Map.of();
40+
worldExceptions = Map.of();
4141
return;
4242
}
4343

44-
final ConfigurationSection overrides = config.getConfigurationSection("overrides");
45-
if (overrides == null) {
46-
this.worldOverrides = Map.of();
44+
final ConfigurationSection exceptions = config.getConfigurationSection("exceptions");
45+
if (exceptions == null) {
46+
this.worldExceptions = Map.of();
4747
} else {
48-
final Map<String, Map<Material, Material>> worldOverrides = new HashMap<>();
49-
for (final String world : overrides.getKeys(false)) {
50-
worldOverrides.put(world, parseReplacements(overrides.getConfigurationSection(world)));
48+
final Map<String, Map<Material, Material>> worldExceptions = new HashMap<>();
49+
for (final String world : exceptions.getKeys(false)) {
50+
worldExceptions.put(world, parseReplacements(exceptions.getConfigurationSection(world)));
5151
}
52-
this.worldOverrides = Map.copyOf(worldOverrides);
52+
this.worldExceptions = Map.copyOf(worldExceptions);
5353
}
5454

5555
defaults = parseReplacements(config.getConfigurationSection("global"));
@@ -86,7 +86,7 @@ public void populate(final @NotNull WorldInfo world,
8686
final int chunkX,
8787
final int chunkZ,
8888
final @NotNull LimitedRegion region) {
89-
final var blocks = worldOverrides.getOrDefault(world.getName(), defaults);
89+
final var blocks = worldExceptions.getOrDefault(world.getName(), defaults);
9090
if (blocks.isEmpty()) return;
9191

9292
final int buffer = region.getBuffer() >> 4;

src/main/resources/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ suppress_block_drop_on_custom_drop: true
44
ore-removal:
55
# If disabled, no changes will be made to the world generation
66
enabled: false
7-
# Global settings for all worlds excluding overrides
7+
# Global settings for all worlds excluding exceptions
88
global:
99
# If true, by default all ores will be removed from the world generation
1010
default: true
11-
# Override for the default value of a specific ore
11+
# Exceptions for a specific ore from the default value
1212
# accepted keys are:
1313
# COAL_ORE, COPPER_ORE, IRON_ORE, GOLD_ORE, DIAMOND_ORE, REDSTONE_ORE, LAPIS_ORE, EMERALD_ORE
1414
# DEEPSLATE_COAL_ORE, DEEPSLATE_COPPER_ORE, DEEPSLATE_IRON_ORE, DEEPSLATE_GOLD_ORE, DEEPSLATE_DIAMOND_ORE, DEEPSLATE_REDSTONE_ORE, DEEPSLATE_LAPIS_ORE, DEEPSLATE_EMERALD_ORE
1515
# NETHER_GOLD_ORE, NETHER_QUARTZ_ORE, ANCIENT_DEBRIS
1616
NETHER_GOLD_ORE: false
1717
NETHER_QUARTZ_ORE: false
1818
ANCIENT_DEBRIS: false
19-
# Overrides for specific worlds
20-
overrides:
19+
# Exceptions for specific worlds
20+
exceptions:
2121
world_the_end:
2222
default: false
2323
world_nether:

0 commit comments

Comments
 (0)