aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch
blob: 0cdd374cd38ecb01c496680f7c4aa6faae10d14a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -5,6 +5,7 @@
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
 import com.mojang.logging.LogUtils;
+import com.mojang.serialization.DataResult;
 import com.mojang.serialization.Dynamic;
 import com.mojang.serialization.JsonOps;
 import java.nio.charset.StandardCharsets;
@@ -12,6 +13,7 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Optional;
 import java.util.Properties;
 import java.util.UUID;
@@ -19,6 +21,7 @@
 import java.util.regex.Pattern;
 import javax.annotation.Nullable;
 import net.minecraft.core.Holder;
+import net.minecraft.core.HolderLookup;
 import net.minecraft.core.Registry;
 import net.minecraft.core.RegistryAccess;
 import net.minecraft.core.registries.Registries;
@@ -41,10 +44,16 @@
 import net.minecraft.world.level.levelgen.presets.WorldPresets;
 import org.slf4j.Logger;
 
+// CraftBukkit start
+import joptsimple.OptionSet;
+// CraftBukkit end
+
 public class DedicatedServerProperties extends Settings<DedicatedServerProperties> {
+
     static final Logger LOGGER = LogUtils.getLogger();
     private static final Pattern SHA1 = Pattern.compile("^[a-fA-F0-9]{40}$");
     private static final Splitter COMMA_SPLITTER = Splitter.on(',').trimResults();
+    public final boolean debug = this.get("debug", false); // CraftBukkit
     public final boolean onlineMode = this.get("online-mode", true);
     public final boolean preventProxyConnections = this.get("prevent-proxy-connections", false);
     public final String serverIp = this.get("server-ip", "");
@@ -55,83 +64,119 @@
     public final String motd = this.get("motd", "A Minecraft Server");
     public final boolean forceGameMode = this.get("force-gamemode", false);
     public final boolean enforceWhitelist = this.get("enforce-whitelist", false);
-    public final Difficulty difficulty = this.get(
-        "difficulty", dispatchNumberOrString(Difficulty::byId, Difficulty::byName), Difficulty::getKey, Difficulty.EASY
-    );
-    public final GameType gamemode = this.get("gamemode", dispatchNumberOrString(GameType::byId, GameType::byName), GameType::getName, GameType.SURVIVAL);
-    public final String levelName = this.get("level-name", "world");
-    public final int serverPort = this.get("server-port", 25565);
+    public final Difficulty difficulty;
+    public final GameType gamemode;
+    public final String levelName;
+    public final int serverPort;
     @Nullable
-    public final Boolean announcePlayerAchievements = this.getLegacyBoolean("announce-player-achievements");
-    public final boolean enableQuery = this.get("enable-query", false);
-    public final int queryPort = this.get("query.port", 25565);
-    public final boolean enableRcon = this.get("enable-rcon", false);
-    public final int rconPort = this.get("rcon.port", 25575);
-    public final String rconPassword = this.get("rcon.password", "");
-    public final boolean hardcore = this.get("hardcore", false);
-    public final boolean allowNether = this.get("allow-nether", true);
-    public final boolean spawnMonsters = this.get("spawn-monsters", true);
-    public final boolean useNativeTransport = this.get("use-native-transport", true);
-    public final boolean enableCommandBlock = this.get("enable-command-block", false);
-    public final int spawnProtection = this.get("spawn-protection", 16);
-    public final int opPermissionLevel = this.get("op-permission-level", 4);
-    public final int functionPermissionLevel = this.get("function-permission-level", 2);
-    public final long maxTickTime = this.get("max-tick-time", TimeUnit.MINUTES.toMillis(1L));
-    public final int maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", 1000000);
-    public final int rateLimitPacketsPerSecond = this.get("rate-limit", 0);
-    public final int viewDistance = this.get("view-distance", 10);
-    public final int simulationDistance = this.get("simulation-distance", 10);
-    public final int maxPlayers = this.get("max-players", 20);
-    public final int networkCompressionThreshold = this.get("network-compression-threshold", 256);
-    public final boolean broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
-    public final boolean broadcastConsoleToOps = this.get("broadcast-console-to-ops", true);
-    public final int maxWorldSize = this.get("max-world-size", integer -> Mth.clamp(integer, 1, 29999984), 29999984);
-    public final boolean syncChunkWrites = this.get("sync-chunk-writes", true);
-    public final boolean enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
-    public final boolean enableStatus = this.get("enable-status", true);
-    public final boolean hideOnlinePlayers = this.get("hide-online-players", false);
-    public final int entityBroadcastRangePercentage = this.get("entity-broadcast-range-percentage", integer -> Mth.clamp(integer, 10, 1000), 100);
-    public final String textFilteringConfig = this.get("text-filtering-config", "");
+    public final Boolean announcePlayerAchievements;
+    public final boolean enableQuery;
+    public final int queryPort;
+    public final boolean enableRcon;
+    public final int rconPort;
+    public final String rconPassword;
+    public final boolean hardcore;
+    public final boolean allowNether;
+    public final boolean spawnMonsters;
+    public final boolean useNativeTransport;
+    public final boolean enableCommandBlock;
+    public final int spawnProtection;
+    public final int opPermissionLevel;
+    public final int functionPermissionLevel;
+    public final long maxTickTime;
+    public final int maxChainedNeighborUpdates;
+    public final int rateLimitPacketsPerSecond;
+    public final int viewDistance;
+    public final int simulationDistance;
+    public final int maxPlayers;
+    public final int networkCompressionThreshold;
+    public final boolean broadcastRconToOps;
+    public final boolean broadcastConsoleToOps;
+    public final int maxWorldSize;
+    public final boolean syncChunkWrites;
+    public final boolean enableJmxMonitoring;
+    public final boolean enableStatus;
+    public final boolean hideOnlinePlayers;
+    public final int entityBroadcastRangePercentage;
+    public final String textFilteringConfig;
     public final Optional<MinecraftServer.ServerResourcePackInfo> serverResourcePackInfo;
     public final DataPackConfig initialDataPackConfiguration;
-    public final Settings<DedicatedServerProperties>.MutableValue<Integer> playerIdleTimeout = this.getMutable("player-idle-timeout", 0);
-    public final Settings<DedicatedServerProperties>.MutableValue<Boolean> whiteList = this.getMutable("white-list", false);
-    public final boolean enforceSecureProfile = this.get("enforce-secure-profile", true);
-    public final boolean logIPs = this.get("log-ips", true);
+    public final Settings<DedicatedServerProperties>.MutableValue<Integer> playerIdleTimeout;
+    public final Settings<DedicatedServerProperties>.MutableValue<Boolean> whiteList;
+    public final boolean enforceSecureProfile;
+    public final boolean logIPs;
     private final DedicatedServerProperties.WorldDimensionData worldDimensionData;
     public final WorldOptions worldOptions;
 
-    public DedicatedServerProperties(Properties properties) {
-        super(properties);
-        String string = this.get("level-seed", "");
+    // CraftBukkit start
+    public DedicatedServerProperties(Properties properties, OptionSet optionset) {
+        super(properties, optionset);
+        // CraftBukkit end
+        this.difficulty = (Difficulty) this.get("difficulty", dispatchNumberOrString(Difficulty::byId, Difficulty::byName), Difficulty::getKey, Difficulty.EASY);
+        this.gamemode = (GameType) this.get("gamemode", dispatchNumberOrString(GameType::byId, GameType::byName), GameType::getName, GameType.SURVIVAL);
+        this.levelName = this.get("level-name", "world");
+        this.serverPort = this.get("server-port", 25565);
+        this.announcePlayerAchievements = this.getLegacyBoolean("announce-player-achievements");
+        this.enableQuery = this.get("enable-query", false);
+        this.queryPort = this.get("query.port", 25565);
+        this.enableRcon = this.get("enable-rcon", false);
+        this.rconPort = this.get("rcon.port", 25575);
+        this.rconPassword = this.get("rcon.password", "");
+        this.hardcore = this.get("hardcore", false);
+        this.allowNether = this.get("allow-nether", true);
+        this.spawnMonsters = this.get("spawn-monsters", true);
+        this.useNativeTransport = this.get("use-native-transport", true);
+        this.enableCommandBlock = this.get("enable-command-block", false);
+        this.spawnProtection = this.get("spawn-protection", 16);
+        this.opPermissionLevel = this.get("op-permission-level", 4);
+        this.functionPermissionLevel = this.get("function-permission-level", 2);
+        this.maxTickTime = this.get("max-tick-time", TimeUnit.MINUTES.toMillis(1L));
+        this.maxChainedNeighborUpdates = this.get("max-chained-neighbor-updates", 1000000);
+        this.rateLimitPacketsPerSecond = this.get("rate-limit", 0);
+        this.viewDistance = this.get("view-distance", 10);
+        this.simulationDistance = this.get("simulation-distance", 10);
+        this.maxPlayers = this.get("max-players", 20);
+        this.networkCompressionThreshold = this.get("network-compression-threshold", 256);
+        this.broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
+        this.broadcastConsoleToOps = this.get("broadcast-console-to-ops", true);
+        this.maxWorldSize = this.get("max-world-size", (integer) -> {
+            return Mth.clamp(integer, 1, 29999984);
+        }, 29999984);
+        this.syncChunkWrites = this.get("sync-chunk-writes", true);
+        this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
+        this.enableStatus = this.get("enable-status", true);
+        this.hideOnlinePlayers = this.get("hide-online-players", false);
+        this.entityBroadcastRangePercentage = this.get("entity-broadcast-range-percentage", (integer) -> {
+            return Mth.clamp(integer, 10, 1000);
+        }, 100);
+        this.textFilteringConfig = this.get("text-filtering-config", "");
+        this.playerIdleTimeout = this.getMutable("player-idle-timeout", 0);
+        this.whiteList = this.getMutable("white-list", false);
+        this.enforceSecureProfile = this.get("enforce-secure-profile", true);
+        this.logIPs = this.get("log-ips", true);
+        String s = this.get("level-seed", "");
         boolean flag = this.get("generate-structures", true);
-        long l = WorldOptions.parseSeed(string).orElse(WorldOptions.randomSeed());
-        this.worldOptions = new WorldOptions(l, flag, false);
-        this.worldDimensionData = new DedicatedServerProperties.WorldDimensionData(
-            this.get("generator-settings", string1 -> GsonHelper.parse(!string1.isEmpty() ? string1 : "{}"), new JsonObject()),
-            this.get("level-type", string1 -> string1.toLowerCase(Locale.ROOT), WorldPresets.NORMAL.location().toString())
-        );
-        this.serverResourcePackInfo = getServerPackInfo(
-            this.get("resource-pack-id", ""),
-            this.get("resource-pack", ""),
-            this.get("resource-pack-sha1", ""),
-            this.getLegacyString("resource-pack-hash"),
-            this.get("require-resource-pack", false),
-            this.get("resource-pack-prompt", "")
-        );
-        this.initialDataPackConfiguration = getDatapackConfig(
-            this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())),
-            this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled()))
-        );
+        long i = WorldOptions.parseSeed(s).orElse(WorldOptions.randomSeed());
+
+        this.worldOptions = new WorldOptions(i, flag, false);
+        this.worldDimensionData = new DedicatedServerProperties.WorldDimensionData((JsonObject) this.get("generator-settings", (s1) -> {
+            return GsonHelper.parse(!s1.isEmpty() ? s1 : "{}");
+        }, new JsonObject()), (String) this.get("level-type", (s1) -> {
+            return s1.toLowerCase(Locale.ROOT);
+        }, WorldPresets.NORMAL.location().toString()));
+        this.serverResourcePackInfo = getServerPackInfo(this.get("resource-pack-id", ""), this.get("resource-pack", ""), this.get("resource-pack-sha1", ""), this.getLegacyString("resource-pack-hash"), this.get("require-resource-pack", false), this.get("resource-pack-prompt", ""));
+        this.initialDataPackConfiguration = getDatapackConfig(this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())), this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled())));
     }
 
-    public static DedicatedServerProperties fromFile(Path path) {
-        return new DedicatedServerProperties(loadFromFile(path));
+    // CraftBukkit start
+    public static DedicatedServerProperties fromFile(Path path, OptionSet optionset) {
+        return new DedicatedServerProperties(loadFromFile(path), optionset);
     }
 
     @Override
-    protected DedicatedServerProperties reload(RegistryAccess registryAccess, Properties properties) {
-        return new DedicatedServerProperties(properties);
+    protected DedicatedServerProperties reload(RegistryAccess iregistrycustom, Properties properties, OptionSet optionset) {
+        return new DedicatedServerProperties(properties, optionset);
+        // CraftBukkit end
     }
 
     @Nullable
@@ -139,99 +184,106 @@
         if (!Strings.isNullOrEmpty(json)) {
             try {
                 return Component.Serializer.fromJson(json);
-            } catch (Exception var2) {
-                LOGGER.warn("Failed to parse resource pack prompt '{}'", json, var2);
+            } catch (Exception exception) {
+                DedicatedServerProperties.LOGGER.warn("Failed to parse resource pack prompt '{}'", json, exception);
             }
         }
 
         return null;
     }
 
-    private static Optional<MinecraftServer.ServerResourcePackInfo> getServerPackInfo(
-        String string, String string1, String string2, @Nullable String string3, boolean flag, String string4
-    ) {
-        if (string1.isEmpty()) {
+    private static Optional<MinecraftServer.ServerResourcePackInfo> getServerPackInfo(String s, String s1, String s2, @Nullable String s3, boolean flag, String s4) {
+        if (s1.isEmpty()) {
             return Optional.empty();
         } else {
-            String string5;
-            if (!string2.isEmpty()) {
-                string5 = string2;
-                if (!Strings.isNullOrEmpty(string3)) {
-                    LOGGER.warn("resource-pack-hash is deprecated and found along side resource-pack-sha1. resource-pack-hash will be ignored.");
+            String s5;
+
+            if (!s2.isEmpty()) {
+                s5 = s2;
+                if (!Strings.isNullOrEmpty(s3)) {
+                    DedicatedServerProperties.LOGGER.warn("resource-pack-hash is deprecated and found along side resource-pack-sha1. resource-pack-hash will be ignored.");
                 }
-            } else if (!Strings.isNullOrEmpty(string3)) {
-                LOGGER.warn("resource-pack-hash is deprecated. Please use resource-pack-sha1 instead.");
-                string5 = string3;
+            } else if (!Strings.isNullOrEmpty(s3)) {
+                DedicatedServerProperties.LOGGER.warn("resource-pack-hash is deprecated. Please use resource-pack-sha1 instead.");
+                s5 = s3;
             } else {
-                string5 = "";
+                s5 = "";
             }
 
-            if (string5.isEmpty()) {
-                LOGGER.warn(
-                    "You specified a resource pack without providing a sha1 hash. Pack will be updated on the client only if you change the name of the pack."
-                );
-            } else if (!SHA1.matcher(string5).matches()) {
-                LOGGER.warn("Invalid sha1 for resource-pack-sha1");
+            if (s5.isEmpty()) {
+                DedicatedServerProperties.LOGGER.warn("You specified a resource pack without providing a sha1 hash. Pack will be updated on the client only if you change the name of the pack.");
+            } else if (!DedicatedServerProperties.SHA1.matcher(s5).matches()) {
+                DedicatedServerProperties.LOGGER.warn("Invalid sha1 for resource-pack-sha1");
             }
 
-            Component component = parseResourcePackPrompt(string4);
-            UUID uUID;
-            if (string.isEmpty()) {
-                uUID = UUID.nameUUIDFromBytes(string1.getBytes(StandardCharsets.UTF_8));
-                LOGGER.warn("resource-pack-id missing, using default of {}", uUID);
+            Component ichatbasecomponent = parseResourcePackPrompt(s4);
+            UUID uuid;
+
+            if (s.isEmpty()) {
+                uuid = UUID.nameUUIDFromBytes(s1.getBytes(StandardCharsets.UTF_8));
+                DedicatedServerProperties.LOGGER.warn("resource-pack-id missing, using default of {}", uuid);
             } else {
                 try {
-                    uUID = UUID.fromString(string);
-                } catch (IllegalArgumentException var10) {
-                    LOGGER.warn("Failed to parse '{}' into UUID", string);
+                    uuid = UUID.fromString(s);
+                } catch (IllegalArgumentException illegalargumentexception) {
+                    DedicatedServerProperties.LOGGER.warn("Failed to parse '{}' into UUID", s);
                     return Optional.empty();
                 }
             }
 
-            return Optional.of(new MinecraftServer.ServerResourcePackInfo(uUID, string1, string5, flag, component));
+            return Optional.of(new MinecraftServer.ServerResourcePackInfo(uuid, s1, s5, flag, ichatbasecomponent));
         }
     }
 
     private static DataPackConfig getDatapackConfig(String initalEnabledPacks, String initialDisabledPacks) {
-        List<String> parts = COMMA_SPLITTER.splitToList(initalEnabledPacks);
-        List<String> parts1 = COMMA_SPLITTER.splitToList(initialDisabledPacks);
-        return new DataPackConfig(parts, parts1);
+        List<String> list = DedicatedServerProperties.COMMA_SPLITTER.splitToList(initalEnabledPacks);
+        List<String> list1 = DedicatedServerProperties.COMMA_SPLITTER.splitToList(initialDisabledPacks);
+
+        return new DataPackConfig(list, list1);
     }
 
     public WorldDimensions createDimensions(RegistryAccess registryAccess) {
         return this.worldDimensionData.create(registryAccess);
     }
 
-    static record WorldDimensionData(JsonObject generatorSettings, String levelType) {
-        private static final Map<String, ResourceKey<WorldPreset>> LEGACY_PRESET_NAMES = Map.of(
-            "default", WorldPresets.NORMAL, "largebiomes", WorldPresets.LARGE_BIOMES
-        );
+    public static record WorldDimensionData(JsonObject generatorSettings, String levelType) {
 
+        private static final Map<String, ResourceKey<WorldPreset>> LEGACY_PRESET_NAMES = Map.of("default", WorldPresets.NORMAL, "largebiomes", WorldPresets.LARGE_BIOMES);
+
         public WorldDimensions create(RegistryAccess registryAccess) {
-            Registry<WorldPreset> registry = registryAccess.registryOrThrow(Registries.WORLD_PRESET);
-            Holder.Reference<WorldPreset> reference = registry.getHolder(WorldPresets.NORMAL)
-                .or(() -> registry.holders().findAny())
-                .orElseThrow(() -> new IllegalStateException("Invalid datapack contents: can't find default preset"));
-            Holder<WorldPreset> holder = Optional.ofNullable(ResourceLocation.tryParse(this.levelType))
-                .map(resourceLocation -> ResourceKey.create(Registries.WORLD_PRESET, resourceLocation))
-                .or(() -> Optional.ofNullable(LEGACY_PRESET_NAMES.get(this.levelType)))
-                .flatMap(registry::getHolder)
-                .orElseGet(() -> {
-                    DedicatedServerProperties.LOGGER.warn("Failed to parse level-type {}, defaulting to {}", this.levelType, reference.key().location());
-                    return reference;
-                });
-            WorldDimensions worldDimensions = holder.value().createWorldDimensions();
+            Registry<WorldPreset> iregistry = registryAccess.registryOrThrow(Registries.WORLD_PRESET);
+            Holder.Reference<WorldPreset> holder_c = (Holder.Reference) iregistry.getHolder(WorldPresets.NORMAL).or(() -> {
+                return iregistry.holders().findAny();
+            }).orElseThrow(() -> {
+                return new IllegalStateException("Invalid datapack contents: can't find default preset");
+            });
+            Optional<ResourceKey<WorldPreset>> optional = Optional.ofNullable(ResourceLocation.tryParse(this.levelType)).map((minecraftkey) -> { // CraftBukkit - decompile error
+                return ResourceKey.create(Registries.WORLD_PRESET, minecraftkey);
+            }).or(() -> {
+                return Optional.ofNullable(DedicatedServerProperties.WorldDimensionData.LEGACY_PRESET_NAMES.get(this.levelType)); // CraftBukkit - decompile error
+            });
+
+            Objects.requireNonNull(iregistry);
+            Holder<WorldPreset> holder = (Holder) optional.flatMap(iregistry::getHolder).orElseGet(() -> {
+                DedicatedServerProperties.LOGGER.warn("Failed to parse level-type {}, defaulting to {}", this.levelType, holder_c.key().location());
+                return holder_c;
+            });
+            WorldDimensions worlddimensions = ((WorldPreset) holder.value()).createWorldDimensions();
+
             if (holder.is(WorldPresets.FLAT)) {
-                RegistryOps<JsonElement> registryOps = RegistryOps.create(JsonOps.INSTANCE, registryAccess);
-                Optional<FlatLevelGeneratorSettings> optional = FlatLevelGeneratorSettings.CODEC
-                    .parse(new Dynamic<>(registryOps, this.generatorSettings()))
-                    .resultOrPartial(DedicatedServerProperties.LOGGER::error);
-                if (optional.isPresent()) {
-                    return worldDimensions.replaceOverworldGenerator(registryAccess, new FlatLevelSource(optional.get()));
+                RegistryOps<JsonElement> registryops = RegistryOps.create(JsonOps.INSTANCE, (HolderLookup.Provider) registryAccess);
+                DataResult<FlatLevelGeneratorSettings> dataresult = FlatLevelGeneratorSettings.CODEC.parse(new Dynamic(registryops, this.generatorSettings())); // CraftBukkit - decompile error
+                Logger logger = DedicatedServerProperties.LOGGER;
+
+                Objects.requireNonNull(logger);
+                Optional<FlatLevelGeneratorSettings> optional1 = dataresult.resultOrPartial(logger::error);
+
+                if (optional1.isPresent()) {
+                    return worlddimensions.replaceOverworldGenerator(registryAccess, new FlatLevelSource((FlatLevelGeneratorSettings) optional1.get()));
                 }
             }
 
-            return worldDimensions;
+            return worlddimensions;
         }
     }
 }