Skip to content

Commit

Permalink
use empty map if we can use the API
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Aug 8, 2024
1 parent be361f1 commit e21a5ce
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import java.io.File;
import java.time.Duration;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
Expand Down Expand Up @@ -58,8 +59,11 @@ public Config() throws Exception {
this.nether_ceiling_max_y = getInt("general.nether-ceiling-y", 127,
"The Y-level at which the nether ceiling generates the last layer\n" +
"of bedrock on your server.");
this.worldMinHeights = new HashMap<>(4);
if (!WorldUtil.GET_MIN_WORLD_HEIGHT_AVAILABLE) {

if (WorldUtil.GET_MIN_WORLD_HEIGHT_AVAILABLE) {
this.worldMinHeights = Collections.emptyMap();
} else {
this.worldMinHeights = new HashMap<>(6);
Map<String, Object> defaults = new HashMap<>();
defaults.put("world", PlatformUtil.getMinecraftVersion() > 17 ? -64 : 0);
defaults.put("world_nether", 0);
Expand Down

0 comments on commit e21a5ce

Please sign in to comment.