ClimateNoiseJsonLoader class
Пакет: com.hypixel.hytale.server.worldgen.loader.climate
Файл: com/hypixel/hytale/server/worldgen/loader/climate/ClimateNoiseJsonLoader.java
extends: JsonLoader<K, ClimateNoise>
Поля (4)
| Модификаторы | Тип | Имя |
|---|---|---|
|
String |
KEY_CONTINENT |
|
String |
KEY_GRID |
|
String |
KEY_NOISE |
|
String |
KEY_THRESHOLDS |
Методы (1)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
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.NoisePropertyJsonLoader;
class="kw">import com.hypixel.hytale.procedurallib.json.SeedResource;
class="kw">import com.hypixel.hytale.procedurallib.json.SeedString;
class="kw">import com.hypixel.hytale.procedurallib.property.NoiseProperty;
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 ClimateNoiseJsonLoader<K class="kw">extends SeedResource> class="kw">extends JsonLoader<K, ClimateNoise> {
class="kw">public ClimateNoiseJsonLoader(SeedString<K> var1, Path var2, JsonElement var3) {
super(var1, var2, var3);
}
@Nonnull
class="kw">public ClimateNoise load() {
class="kw">return new ClimateNoise(this.loadGrid(), this.loadContinentNoise(), this.loadTemperatureNoise(), this.loadIntensityNoise(), this.loadThresholds());
}
@Nonnull
class="kw">protected ClimateNoise.Grid loadGrid() {
class="kw">return new ClimateGridJsonLoader<>(this.seed, this.dataFolder, this.get("Grid")).load();
}
@Nonnull
class="kw">protected NoiseProperty loadContinentNoise() {
class="kw">return new NoisePropertyJsonLoader<>(this.seed, this.dataFolder, this.mustGetObject("Continent", null)).load();
}
@Nonnull
class="kw">protected NoiseProperty loadTemperatureNoise() {
class="kw">return new NoisePropertyJsonLoader<>(this.seed, this.dataFolder, this.mustGetObject("Temperature", null)).load();
}
@Nonnull
class="kw">protected NoiseProperty loadIntensityNoise() {
class="kw">return new NoisePropertyJsonLoader<>(this.seed, this.dataFolder, this.mustGetObject("Intensity", null)).load();
}
@Nonnull
class="kw">protected ClimateNoise.Thresholds loadThresholds() {
class="kw">return new ContinentThresholdsJsonLoader<>(this.seed, this.dataFolder, this.mustGetObject("Thresholds", null)).load();
}
class="kw">public class="kw">interface Constants {
String KEY_NOISE = "Noise";
String KEY_GRID = "Grid";
String KEY_THRESHOLDS = "Thresholds";
String KEY_CONTINENT = "Continent";
}
}