Constants interface
Пакет: com.hypixel.hytale.server.worldgen.loader.climate
Файл: com/hypixel/hytale/server/worldgen/loader/climate/ClimatePointJsonLoader.java
Поля (6)
| Модификаторы | Тип | Имя |
|---|---|---|
|
Double |
DEFAULT_INTENSITY |
|
Double |
DEFAULT_MODIFIER |
|
Double |
DEFAULT_TEMPERATURE |
|
String |
KEY_INTENSITY |
|
String |
KEY_MODIFIER |
|
String |
KEY_TEMPERATURE |
Исходный код
Показать/скрыть
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.ClimatePoint;
class="kw">import java.nio.file.Path;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;
class="kw">public class ClimatePointJsonLoader<K class="kw">extends SeedResource> class="kw">extends JsonLoader<K, ClimatePoint> {
class="kw">public ClimatePointJsonLoader(SeedString<K> var1, Path var2, @Nullable JsonElement var3) {
super(var1, var2, var3);
}
@Nonnull
class="kw">public ClimatePoint load() {
class="kw">return new ClimatePoint(this.loadTemperature(), this.loadIntensity(), this.loadModifier());
}
class="kw">protected double loadTemperature() {
class="kw">return this.mustGetNumber("Temperature", ClimatePointJsonLoader.Constants.DEFAULT_TEMPERATURE).doubleValue();
}
class="kw">protected double loadIntensity() {
class="kw">return this.mustGetNumber("Intensity", ClimatePointJsonLoader.Constants.DEFAULT_INTENSITY).doubleValue();
}
class="kw">protected double loadModifier() {
class="kw">return this.mustGetNumber("Modifier", ClimatePointJsonLoader.Constants.DEFAULT_MODIFIER).doubleValue();
}
class="kw">public class="kw">interface Constants {
String KEY_TEMPERATURE = "Temperature";
String KEY_INTENSITY = "Intensity";
String KEY_MODIFIER = "Modifier";
Double DEFAULT_TEMPERATURE = 0.5;
Double DEFAULT_INTENSITY = 0.5;
Double DEFAULT_MODIFIER = 1.0;
}
}