ContinentThresholdsJsonLoader class

Пакет: com.hypixel.hytale.server.worldgen.loader.climate

Файл: com/hypixel/hytale/server/worldgen/loader/climate/ContinentThresholdsJsonLoader.java

extends: JsonLoader<K, ClimateNoise.Thresholds>

Поля (8)

МодификаторыТипИмя
Double DEFAULT_BEACH_SIZE
Double DEFAULT_ISLAND
Double DEFAULT_LAND
Double DEFAULT_SHALLOW_OCEAN_SIZE
String KEY_BEACH_SIZE
String KEY_ISLAND
String KEY_LAND
String KEY_SHALLOW_OCEAN_SIZE

Методы (5)

МодификаторыВозвратСигнатура
protected double loadBeachSizedouble loadBeachSize()
protected double loadIslandThresholddouble loadIslandThreshold()
protected double loadLandThresholddouble loadLandThreshold()
protected double loadShallowOceanSizedouble loadShallowOceanSize()
abstract super super(var1, var2, var3)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.worldgen.loader.climate;

class="kw">import com.google.gson.JsonElement;
class="kw">import com.hypixel.hytale.procedurallib.json.JsonLoader;
class="kw">import com.hypixel.hytale.procedurallib.json.SeedResource;
class="kw">import com.hypixel.hytale.procedurallib.json.SeedString;
class="kw">import com.hypixel.hytale.server.worldgen.climate.ClimateNoise;
class="kw">import java.nio.file.Path;
class="kw">import javax.annotation.Nonnull;

class="kw">public class ContinentThresholdsJsonLoader<K class="kw">extends SeedResource> class="kw">extends JsonLoader<K, ClimateNoise.Thresholds> {
   class="kw">public ContinentThresholdsJsonLoader(SeedString<K> var1, Path var2, JsonElement var3) {
      super(var1, var2, var3);
   }

   @Nonnull
   class="kw">public ClimateNoise.Thresholds load() {
      class="kw">return new ClimateNoise.Thresholds(this.loadLandThreshold(), this.loadIslandThreshold(), this.loadBeachSize(), this.loadShallowOceanSize());
   }

   class="kw">protected double loadLandThreshold() {
      class="kw">return this.mustGetNumber("Land", ContinentThresholdsJsonLoader.Constants.DEFAULT_LAND).doubleValue();
   }

   class="kw">protected double loadIslandThreshold() {
      class="kw">return this.mustGetNumber("Island", ContinentThresholdsJsonLoader.Constants.DEFAULT_ISLAND).doubleValue();
   }

   class="kw">protected double loadBeachSize() {
      class="kw">return this.mustGetNumber("BeachSize", ContinentThresholdsJsonLoader.Constants.DEFAULT_BEACH_SIZE).doubleValue();
   }

   class="kw">protected double loadShallowOceanSize() {
      class="kw">return this.mustGetNumber("ShallowOceanSize", ContinentThresholdsJsonLoader.Constants.DEFAULT_SHALLOW_OCEAN_SIZE).doubleValue();
   }

   class="kw">public class="kw">interface Constants {
      String KEY_LAND = "Land";
      String KEY_ISLAND = "Island";
      String KEY_BEACH_SIZE = "BeachSize";
      String KEY_SHALLOW_OCEAN_SIZE = "ShallowOceanSize";
      Double DEFAULT_LAND = 0.5;
      Double DEFAULT_ISLAND = 0.8;
      Double DEFAULT_BEACH_SIZE = 0.05;
      Double DEFAULT_SHALLOW_OCEAN_SIZE = 0.15;
   }
}