ZoneRequirementJsonLoader class

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

Файл: com/hypixel/hytale/server/worldgen/loader/zone/ZoneRequirementJsonLoader.java

extends: JsonLoader<SeedStringResource, Set<String>>

Поля (1)

МодификаторыТипИмя
Set var1

Методы (2)

МодификаторыВозвратСигнатура
abstract throw new IllegalArgumentExceptionthrow new IllegalArgumentException("Could not find mappings for colors in mask file. Keyword: MaskMapping")
abstract super super(var1, var2, var3)

Исходный код

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

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 java.nio.file.Path;
class="kw">import java.util.HashSet;
class="kw">import java.util.Set;
class="kw">import javax.annotation.Nonnull;

class="kw">public class ZoneRequirementJsonLoader class="kw">extends JsonLoader<SeedStringResource, Set<String>> {
   class="kw">public ZoneRequirementJsonLoader(SeedString<SeedStringResource> var1, Path var2, JsonElement var3) {
      super(var1, var2, var3);
   }

   @Nonnull
   class="kw">public Set<String> load() {
      if (!this.has("MaskMapping")) {
         throw new IllegalArgumentException("Could not find mappings for colors in mask file. Keyword: MaskMapping");
      }

      Set var1 = new HashSet<>();
      ZoneColorMappingJsonLoader.collectZones(var1, this.get("MaskMapping"));
      UniqueZoneEntryJsonLoader.collectZones(var1, this.get("UniqueZones"));
      class="kw">return var1;
   }
}