Constants interface

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

Файл: com/hypixel/hytale/server/worldgen/loader/container/FadeContainerJsonLoader.java

Поля (5)

МодификаторыТипИмя
String KEY_FADE_HEIGHTMAP
String KEY_FADE_LENGTH
String KEY_FADE_START
String KEY_TERRAIN_LENGTH
String KEY_TERRAIN_START

Исходный код

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

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

class="kw">public class FadeContainerJsonLoader class="kw">extends JsonLoader<SeedStringResource, FadeContainer> {
   class="kw">public FadeContainerJsonLoader(@Nonnull SeedString<SeedStringResource> var1, Path var2, JsonElement var3) {
      super(var1.append(".FadeContainer"), var2, var3);
   }

   @Nonnull
   class="kw">public FadeContainer load() {
      class="kw">return new FadeContainer(this.loadFadeStart(), this.loadFadeLength(), this.loadTerrainStart(), this.loadTerrainLength(), this.loadFadeHeightmap());
   }

   class="kw">protected double loadFadeStart() {
      class="kw">return this.has("FadeStart") ? this.get("FadeStart").getAsDouble() : 0.0;
   }

   class="kw">protected double loadFadeLength() {
      class="kw">return this.has("FadeLength") ? this.get("FadeLength").getAsDouble() : 0.0;
   }

   class="kw">protected double loadTerrainStart() {
      class="kw">return this.has("TerrainStart") ? this.get("TerrainStart").getAsDouble() : 0.0;
   }

   class="kw">protected double loadTerrainLength() {
      class="kw">return this.has("TerrainLength") ? this.get("TerrainLength").getAsDouble() : 0.0;
   }

   class="kw">protected double loadFadeHeightmap() {
      double var1 = Double.NEGATIVE_INFINITY;
      if (this.has("FadeHeightmap")) {
         var1 = this.get("FadeHeightmap").getAsDouble();
      }

      class="kw">return var1;
   }

   class="kw">public class="kw">interface Constants {
      String KEY_FADE_START = "FadeStart";
      String KEY_FADE_LENGTH = "FadeLength";
      String KEY_TERRAIN_START = "TerrainStart";
      String KEY_TERRAIN_LENGTH = "TerrainLength";
      String KEY_FADE_HEIGHTMAP = "FadeHeightmap";
   }
}