TileBiomeJsonLoader class

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

Файл: com/hypixel/hytale/server/worldgen/loader/biome/TileBiomeJsonLoader.java

extends: BiomeJsonLoader

Поля (7)

МодификаторыТипИмя
String KEY_SIZE_MODIFIER
String KEY_WEIGHT
String SEED_PREFIX
double var1
var1
double var1
var1

Методы (2)

МодификаторыВозвратСигнатура
protected double loadSizeModifierdouble loadSizeModifier()
protected double loadWeightdouble loadWeight()

Исходный код

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

class="kw">import com.google.gson.JsonElement;
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.biome.TileBiome;
class="kw">import com.hypixel.hytale.server.worldgen.loader.context.BiomeFileContext;
class="kw">import java.nio.file.Path;
class="kw">import javax.annotation.Nonnull;

class="kw">public class TileBiomeJsonLoader class="kw">extends BiomeJsonLoader {
   class="kw">public TileBiomeJsonLoader(@Nonnull SeedString<SeedStringResource> var1, Path var2, JsonElement var3, @Nonnull BiomeFileContext var4) {
      super(var1.append(String.format(".TileBiome-%s", var4.getName())), var2, var3, var4);
   }

   @Nonnull
   class="kw">public TileBiome load() {
      class="kw">return new TileBiome(
         this.biomeContext.getId(),
         this.biomeContext.getName(),
         this.loadInterpolation(),
         this.loadTerrainHeightThreshold(),
         this.loadCoverContainer(),
         this.loadLayerContainers(),
         this.loadPrefabContainer(),
         this.loadTintContainer(),
         this.loadEnvironmentContainer(),
         this.loadWaterContainer(),
         this.loadFadeContainer(),
         this.loadHeightmapNoise(),
         this.loadWeight(),
         this.loadSizeModifier(),
         this.loadColor()
      );
   }

   class="kw">protected double loadWeight() {
      double var1 = 1.0;
      if (this.has("Weight")) {
         var1 = this.get("Weight").getAsDouble();
      }

      class="kw">return var1;
   }

   class="kw">protected double loadSizeModifier() {
      double var1 = 1.0;
      if (this.has("SizeModifier")) {
         var1 = this.get("SizeModifier").getAsDouble();
      }

      class="kw">return var1 * var1;
   }

   class="kw">public class="kw">interface Constants {
      String KEY_WEIGHT = "Weight";
      String KEY_SIZE_MODIFIER = "SizeModifier";
      String SEED_PREFIX = ".TileBiome-%s";
   }
}