Weather class

Пакет: com.hypixel.hytale.server.core.asset.type.weather.config

Файл: com/hypixel/hytale/server/core/asset/type/weather/config/Weather.java

implements: JsonAssetWithMap<String, IndexedLookupTableAssetMap<String, Weather>>, NetworkSerializable<com.hypixel.hytale.protocol.Weather>

Поля (5)

МодификаторыТипИмя
ASSET_STORE
final BuilderCodec<WeatherParticle> PARTICLE_CODEC
com.hypixel.hytale.protocol.Weather var1
com.hypixel.hytale.protocol.Weather var2
IntSet var3

Методы (51)

МодификаторыВозвратСигнатура
static IndexedLookupTableAssetMap<String, Weather> getAssetMapIndexedLookupTableAssetMap<String, Weather> getAssetMap()
static AssetStore<String, Weather, IndexedLookupTableAssetMap<String, Weather>> getAssetStoreAssetStore<String, Weather, IndexedLookupTableAssetMap<String, Weather>> getAssetStore()
public Cloud[] getCloudsCloud[] getClouds()
public TimeColor[] getColorFiltersTimeColor[] getColorFilters()
public TimeColor[] getFogColorsTimeColor[] getFogColors()
public TimeFloat[] getFogDensitiesTimeFloat[] getFogDensities()
public float[] getFogDistancefloat[] getFogDistance()
public TimeFloat[] getFogHeightFalloffsTimeFloat[] getFogHeightFalloffs()
public FogOptions getFogOptionsFogOptions getFogOptions()
public String getIdString getId()
public TimeColorAlpha[] getMoonColorsTimeColorAlpha[] getMoonColors()
public TimeColorAlpha[] getMoonGlowColorsTimeColorAlpha[] getMoonGlowColors()
public TimeFloat[] getMoonScalesTimeFloat[] getMoonScales()
public DayTexture[] getMoonsDayTexture[] getMoons()
public WeatherParticle getParticleWeatherParticle getParticle()
public String getScreenEffectString getScreenEffect()
public TimeColorAlpha[] getScreenEffectColorsTimeColorAlpha[] getScreenEffectColors()
public TimeColorAlpha[] getSkyBottomColorsTimeColorAlpha[] getSkyBottomColors()
public TimeColorAlpha[] getSkySunsetColorsTimeColorAlpha[] getSkySunsetColors()
public TimeColorAlpha[] getSkyTopColorsTimeColorAlpha[] getSkyTopColors()
public String getStarsString getStars()
public TimeColor[] getSunColorsTimeColor[] getSunColors()
public TimeColorAlpha[] getSunGlowColorsTimeColorAlpha[] getSunGlowColors()
public TimeFloat[] getSunScalesTimeFloat[] getSunScales()
public TimeColor[] getSunlightColorsTimeColor[] getSunlightColors()
public TimeFloat[] getSunlightDampingMultiplierTimeFloat[] getSunlightDampingMultiplier()
public TimeColor[] getWaterTintsTimeColor[] getWaterTints()
if if(ASSET_STORE == null)
if if(var1 != null)
if if(this.moons != null && this.moons.length > 0)
if if(this.clouds != null && this.clouds.length > 0)
if if(this.sunlightDampingMultiplier != null && this.sunlightDampingMultiplier.length > 0)
if if(this.sunlightColors != null && this.sunlightColors.length > 0)
if if(this.sunColors != null && this.sunColors.length > 0)
if if(this.sunGlowColors != null && this.sunGlowColors.length > 0)
if if(this.sunScales != null && this.sunScales.length > 0)
if if(this.moonColors != null && this.moonColors.length > 0)
if if(this.moonGlowColors != null && this.moonGlowColors.length > 0)
if if(this.moonScales != null && this.moonScales.length > 0)
if if(this.skyTopColors != null && this.skyTopColors.length > 0)
if if(this.skyBottomColors != null && this.skyBottomColors.length > 0)
if if(this.skySunsetColors != null && this.skySunsetColors.length > 0)
if if(this.fogColors != null && this.fogColors.length > 0)
if if(this.fogHeightFalloffs != null && this.fogHeightFalloffs.length > 0)
if if(this.fogDensities != null && this.fogDensities.length > 0)
if if(this.screenEffectColors != null && this.screenEffectColors.length > 0)
if if(this.colorFilters != null && this.colorFilters.length > 0)
if if(this.waterTints != null && this.waterTints.length > 0)
if if(this.fogOptions != null)
if if(this.particle != null)
if if(this.data != null)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.core.asset.type.weather.config;

class="kw">import com.hypixel.hytale.assetstore.AssetExtraInfo;
class="kw">import com.hypixel.hytale.assetstore.AssetKeyValidator;
class="kw">import com.hypixel.hytale.assetstore.AssetRegistry;
class="kw">import com.hypixel.hytale.assetstore.AssetStore;
class="kw">import com.hypixel.hytale.assetstore.codec.AssetBuilderCodec;
class="kw">import com.hypixel.hytale.assetstore.map.IndexedLookupTableAssetMap;
class="kw">import com.hypixel.hytale.assetstore.map.JsonAssetWithMap;
class="kw">import com.hypixel.hytale.codec.Codec;
class="kw">import com.hypixel.hytale.codec.KeyedCodec;
class="kw">import com.hypixel.hytale.codec.builder.BuilderCodec;
class="kw">import com.hypixel.hytale.codec.codecs.array.ArrayCodec;
class="kw">import com.hypixel.hytale.codec.schema.metadata.ui.UIDefaultCollapsedState;
class="kw">import com.hypixel.hytale.codec.schema.metadata.ui.UIEditor;
class="kw">import com.hypixel.hytale.codec.schema.metadata.ui.UIEditorFeatures;
class="kw">import com.hypixel.hytale.codec.schema.metadata.ui.UIEditorSectionStart;
class="kw">import com.hypixel.hytale.codec.validation.ValidatorCache;
class="kw">import com.hypixel.hytale.codec.validation.Validators;
class="kw">import com.hypixel.hytale.common.util.ArrayUtil;
class="kw">import com.hypixel.hytale.protocol.Color;
class="kw">import com.hypixel.hytale.protocol.ColorAlpha;
class="kw">import com.hypixel.hytale.protocol.NearFar;
class="kw">import com.hypixel.hytale.protocol.WeatherParticle;
class="kw">import com.hypixel.hytale.server.core.asset.common.CommonAssetValidator;
class="kw">import com.hypixel.hytale.server.core.asset.type.particle.config.ParticleSystem;
class="kw">import com.hypixel.hytale.server.core.codec.ProtocolCodecs;
class="kw">import com.hypixel.hytale.server.core.io.NetworkSerializable;
class="kw">import it.unimi.dsi.fastutil.ints.IntSet;
class="kw">import java.lang.ref.SoftReference;
class="kw">import java.util.Arrays;
class="kw">import java.util.Map;
class="kw">import java.util.stream.Collectors;
class="kw">import javax.annotation.Nonnull;

class="kw">public class Weather class="kw">implements JsonAssetWithMap<String, IndexedLookupTableAssetMap<String, Weather>>, NetworkSerializable<com.hypixel.hytale.protocol.Weather> {
   class="kw">public class="kw">static class="kw">final BuilderCodec<WeatherParticle> PARTICLE_CODEC = BuilderCodec.<WeatherParticle>builder(WeatherParticle.class, WeatherParticle::new)
      .documentation("Particle System that can be spawned in relation to a weather.")
      .<String>append(new KeyedCodec<>("SystemId", Codec.STRING), (var0, var1) -> var0.systemId = var1, var0 -> var0.systemId)
      .addValidator(Validators.nonNull())
      .addValidator(ParticleSystem.VALIDATOR_CACHE.getValidator())
      .add()
      .<Color>append(new KeyedCodec<>("Color", ProtocolCodecs.COLOR), (var0, var1) -> var0.color = var1, var0 -> var0.color)
      .documentation("The colour used if none was specified in the particle settings.")
      .add()
      .<Float>append(new KeyedCodec<>("Scale", Codec.FLOAT), (var0, var1) -> var0.scale = var1, var0 -> var0.scale)
      .documentation("The scale of the particle system.")
      .add()
      .<Boolean>append(new KeyedCodec<>("OvergroundOnly", Codec.BOOLEAN), (var0, var1) -> var0.isOvergroundOnly = var1, var0 -> var0.isOvergroundOnly)
      .documentation("Sets if the particles can only spawn above the columns highest blocks.")
      .add()
      .<Float>append(
         new KeyedCodec<>("PositionOffsetMultiplier", Codec.FLOAT), (var0, var1) -> var0.positionOffsetMultiplier = var1, var0 -> var0.positionOffsetMultiplier
      )
      .documentation("The amount the system will move ahead of the camera.")
      .add()
      .build();
   class="kw">public class="kw">static class="kw">final AssetBuilderCodec<String, Weather> CODEC = AssetBuilderCodec.<String, Weather>builder(
         Weather.class, Weather::new, Codec.STRING, (var0, var1) -> var0.id = var1, var0 -> var0.id, (var0, var1) -> var0.data = var1, var0 -> var0.data
      )
      .metadata(new UIEditorFeatures(UIEditorFeatures.EditorFeature.WEATHER_DAYTIME_BAR, UIEditorFeatures.EditorFeature.WEATHER_PREVIEW_LOCAL))
      .<String>appendInherited(
         new KeyedCodec<>("Stars", Codec.STRING), (var0, var1) -> var0.stars = var1, var0 -> var0.stars, (var0, var1) -> var0.stars = var1.stars
      )
      .addValidator(CommonAssetValidator.TEXTURE_SKY)
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<String>appendInherited(
         new KeyedCodec<>("ScreenEffect", Codec.STRING),
         (var0, var1) -> var0.screenEffect = var1,
         var0 -> var0.screenEffect,
         (var0, var1) -> var0.screenEffect = var1.screenEffect
      )
      .addValidator(CommonAssetValidator.UI_SCREEN_EFFECT)
      .add()
      .<double[]>appendInherited(new KeyedCodec<>("FogDistance", Codec.DOUBLE_ARRAY), (var0, var1) -> {
         var0.fogDistance = new float[2];
         var0.fogDistance[0] = (float)var1[0];
         var0.fogDistance[1] = (float)var1[1];
      }, var0 -> new double[]{var0.fogDistance[0], var0.fogDistance[1]}, (var0, var1) -> var0.fogDistance = var1.fogDistance)
      .addValidator(Validators.nonNull())
      .addValidator(Validators.doubleArraySize(2))
      .addValidator(Validators.monotonicSequentialDoubleArrayValidator())
      .documentation(
         "Array of strictly two values. First is FogNear, which is expected to be negative. Second is FogFar. FogNear determines how foggy it is at the player's position, while FogFar determines the range at which FogDensities starts ramping up."
      )
      .add()
      .<FogOptions>appendInherited(
         new KeyedCodec<>("FogOptions", FogOptions.CODEC),
         (var0, var1) -> var0.fogOptions = var1,
         var0 -> var0.fogOptions,
         (var0, var1) -> var0.fogOptions = var1.fogOptions
      )
      .documentation("Optional extra information about the fog for this Weather")
      .add()
      .appendInherited(
         new KeyedCodec<>("Particle", PARTICLE_CODEC),
         (var0, var1) -> var0.particle = var1,
         var0 -> var0.particle,
         (var0, var1) -> var0.particle = var1.particle
      )
      .add()
      .<TimeColorAlpha[]>appendInherited(
         new KeyedCodec<>("ScreenEffectColors", TimeColorAlpha.ARRAY_CODEC),
         (var0, var1) -> var0.screenEffectColors = var1,
         var0 -> var0.screenEffectColors,
         (var0, var1) -> var0.screenEffectColors = var1.screenEffectColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeFloat[]>appendInherited(
         new KeyedCodec<>("SunlightDampingMultipliers", new ArrayCodec<>(TimeFloat.CODEC, TimeFloat[]::new)),
         (var0, var1) -> var0.sunlightDampingMultiplier = var1,
         var0 -> var0.sunlightDampingMultiplier,
         (var0, var1) -> var0.sunlightDampingMultiplier = var1.sunlightDampingMultiplier
      )
      .metadata(new UIEditorSectionStart("Colors"))
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColor[]>appendInherited(
         new KeyedCodec<>("SunlightColors", TimeColor.ARRAY_CODEC),
         (var0, var1) -> var0.sunlightColors = var1,
         var0 -> var0.sunlightColors,
         (var0, var1) -> var0.sunlightColors = var1.sunlightColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColor[]>appendInherited(
         new KeyedCodec<>("SunColors", TimeColor.ARRAY_CODEC),
         (var0, var1) -> var0.sunColors = var1,
         var0 -> var0.sunColors,
         (var0, var1) -> var0.sunColors = var1.sunColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColorAlpha[]>appendInherited(
         new KeyedCodec<>("MoonColors", TimeColorAlpha.ARRAY_CODEC),
         (var0, var1) -> var0.moonColors = var1,
         var0 -> var0.moonColors,
         (var0, var1) -> var0.moonColors = var1.moonColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColorAlpha[]>appendInherited(
         new KeyedCodec<>("SunGlowColors", TimeColorAlpha.ARRAY_CODEC),
         (var0, var1) -> var0.sunGlowColors = var1,
         var0 -> var0.sunGlowColors,
         (var0, var1) -> var0.sunGlowColors = var1.sunGlowColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColorAlpha[]>appendInherited(
         new KeyedCodec<>("MoonGlowColors", TimeColorAlpha.ARRAY_CODEC),
         (var0, var1) -> var0.moonGlowColors = var1,
         var0 -> var0.moonGlowColors,
         (var0, var1) -> var0.moonGlowColors = var1.moonGlowColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeFloat[]>appendInherited(
         new KeyedCodec<>("SunScales", new ArrayCodec<>(TimeFloat.CODEC, TimeFloat[]::new)),
         (var0, var1) -> var0.sunScales = var1,
         var0 -> var0.sunScales,
         (var0, var1) -> var0.sunScales = var1.sunScales
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeFloat[]>appendInherited(
         new KeyedCodec<>("MoonScales", new ArrayCodec<>(TimeFloat.CODEC, TimeFloat[]::new)),
         (var0, var1) -> var0.moonScales = var1,
         var0 -> var0.moonScales,
         (var0, var1) -> var0.moonScales = var1.moonScales
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColorAlpha[]>appendInherited(
         new KeyedCodec<>("SkyTopColors", TimeColorAlpha.ARRAY_CODEC),
         (var0, var1) -> var0.skyTopColors = var1,
         var0 -> var0.skyTopColors,
         (var0, var1) -> var0.skyTopColors = var1.skyTopColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColorAlpha[]>appendInherited(
         new KeyedCodec<>("SkyBottomColors", TimeColorAlpha.ARRAY_CODEC),
         (var0, var1) -> var0.skyBottomColors = var1,
         var0 -> var0.skyBottomColors,
         (var0, var1) -> var0.skyBottomColors = var1.skyBottomColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColorAlpha[]>appendInherited(
         new KeyedCodec<>("SkySunsetColors", TimeColorAlpha.ARRAY_CODEC),
         (var0, var1) -> var0.skySunsetColors = var1,
         var0 -> var0.skySunsetColors,
         (var0, var1) -> var0.skySunsetColors = var1.skySunsetColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColor[]>appendInherited(
         new KeyedCodec<>("FogColors", TimeColor.ARRAY_CODEC),
         (var0, var1) -> var0.fogColors = var1,
         var0 -> var0.fogColors,
         (var0, var1) -> var0.fogColors = var1.fogColors
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeFloat[]>appendInherited(
         new KeyedCodec<>("FogHeightFalloffs", new ArrayCodec<>(TimeFloat.CODEC, TimeFloat[]::new)),
         (var0, var1) -> var0.fogHeightFalloffs = var1,
         var0 -> var0.fogHeightFalloffs,
         (var0, var1) -> var0.fogHeightFalloffs = var1.fogHeightFalloffs
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeFloat[]>appendInherited(
         new KeyedCodec<>("FogDensities", new ArrayCodec<>(TimeFloat.CODEC, TimeFloat[]::new)),
         (var0, var1) -> var0.fogDensities = var1,
         var0 -> var0.fogDensities,
         (var0, var1) -> var0.fogDensities = var1.fogDensities
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColor[]>appendInherited(
         new KeyedCodec<>("WaterTints", TimeColor.ARRAY_CODEC),
         (var0, var1) -> var0.waterTints = var1,
         var0 -> var0.waterTints,
         (var0, var1) -> var0.waterTints = var1.waterTints
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<TimeColor[]>appendInherited(
         new KeyedCodec<>("ColorFilters", TimeColor.ARRAY_CODEC),
         (var0, var1) -> var0.colorFilters = var1,
         var0 -> var0.colorFilters,
         (var0, var1) -> var0.colorFilters = var1.colorFilters
      )
      .metadata(new UIEditor(UIEditor.TIMELINE))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<DayTexture[]>appendInherited(
         new KeyedCodec<>("Moons", new ArrayCodec<>(DayTexture.CODEC, DayTexture[]::new)),
         (var0, var1) -> var0.moons = var1,
         var0 -> var0.moons,
         (var0, var1) -> var0.moons = var1.moons
      )
      .metadata(new UIEditorSectionStart("Moons"))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .<Cloud[]>appendInherited(
         new KeyedCodec<>("Clouds", new ArrayCodec<>(Cloud.CODEC, Cloud[]::new)),
         (var0, var1) -> var0.clouds = var1,
         var0 -> var0.clouds,
         (var0, var1) -> var0.clouds = var1.clouds
      )
      .metadata(new UIEditorSectionStart("Clouds"))
      .metadata(UIDefaultCollapsedState.UNCOLLAPSED)
      .add()
      .build();
   class="kw">public class="kw">static class="kw">final ValidatorCache<String> VALIDATOR_CACHE = new ValidatorCache<>(new AssetKeyValidator<>(Weather::getAssetStore));
   class="kw">private class="kw">static AssetStore<String, Weather, IndexedLookupTableAssetMap<String, Weather>> ASSET_STORE;
   class="kw">public class="kw">static class="kw">final float[] DEFAULT_FOG_DISTANCE = new float[]{-96.0F, 1024.0F};
   class="kw">public class="kw">static class="kw">final int UNKNOWN_ID = 0;
   class="kw">public class="kw">static class="kw">final Weather UNKNOWN = new Weather("Unknown");
   class="kw">protected AssetExtraInfo.Data data;
   class="kw">protected String id;
   class="kw">protected DayTexture[] moons;
   class="kw">protected Cloud[] clouds;
   class="kw">protected TimeFloat[] sunlightDampingMultiplier;
   class="kw">protected TimeColor[] sunlightColors;
   class="kw">protected TimeColor[] sunColors;
   class="kw">protected TimeColorAlpha[] moonColors;
   class="kw">protected TimeColorAlpha[] sunGlowColors;
   class="kw">protected TimeColorAlpha[] moonGlowColors;
   class="kw">protected TimeFloat[] sunScales;
   class="kw">protected TimeFloat[] moonScales;
   class="kw">protected TimeColorAlpha[] skyTopColors;
   class="kw">protected TimeColorAlpha[] skyBottomColors;
   class="kw">protected TimeColorAlpha[] skySunsetColors;
   class="kw">protected TimeColor[] fogColors;
   class="kw">protected TimeFloat[] fogHeightFalloffs;
   class="kw">protected TimeFloat[] fogDensities;
   class="kw">protected TimeColor[] waterTints;
   class="kw">protected float[] fogDistance = DEFAULT_FOG_DISTANCE;
   class="kw">protected FogOptions fogOptions;
   class="kw">protected String screenEffect;
   class="kw">protected TimeColorAlpha[] screenEffectColors;
   class="kw">protected TimeColor[] colorFilters;
   class="kw">protected String stars;
   class="kw">protected WeatherParticle particle;
   class="kw">private SoftReference<com.hypixel.hytale.protocol.Weather> cachedPacket;

   class="kw">public class="kw">static AssetStore<String, Weather, IndexedLookupTableAssetMap<String, Weather>> getAssetStore() {
      if (ASSET_STORE == null) {
         ASSET_STORE = AssetRegistry.getAssetStore(Weather.class);
      }

      class="kw">return ASSET_STORE;
   }

   class="kw">public class="kw">static IndexedLookupTableAssetMap<String, Weather> getAssetMap() {
      class="kw">return (IndexedLookupTableAssetMap<String, Weather>)getAssetStore().getAssetMap();
   }

   class="kw">public Weather(
      String var1,
      DayTexture[] var2,
      Cloud[] var3,
      TimeFloat[] var4,
      TimeColor[] var5,
      TimeColor[] var6,
      TimeColorAlpha[] var7,
      TimeColorAlpha[] var8,
      TimeColorAlpha[] var9,
      TimeFloat[] var10,
      TimeFloat[] var11,
      TimeColorAlpha[] var12,
      TimeColorAlpha[] var13,
      TimeColorAlpha[] var14,
      TimeColor[] var15,
      TimeFloat[] var16,
      TimeFloat[] var17,
      TimeColor[] var18,
      float[] var19,
      FogOptions var20,
      String var21,
      TimeColorAlpha[] var22,
      TimeColor[] var23,
      String var24,
      WeatherParticle var25
   ) {
      this.id = var1;
      this.moons = var2;
      this.clouds = var3;
      this.sunlightDampingMultiplier = var4;
      this.sunlightColors = var5;
      this.sunColors = var6;
      this.moonColors = var7;
      this.sunGlowColors = var8;
      this.moonGlowColors = var9;
      this.sunScales = var10;
      this.moonScales = var11;
      this.skyTopColors = var12;
      this.skyBottomColors = var13;
      this.skySunsetColors = var14;
      this.fogColors = var15;
      this.fogHeightFalloffs = var16;
      this.fogDensities = var17;
      this.waterTints = var18;
      this.fogDistance = var19;
      this.fogOptions = var20;
      this.screenEffect = var21;
      this.screenEffectColors = var22;
      this.colorFilters = var23;
      this.stars = var24;
      this.particle = var25;
   }

   class="kw">public Weather(String var1) {
      this.id = var1;
   }

   class="kw">protected Weather() {
   }

   @Nonnull
   class="kw">public com.hypixel.hytale.protocol.Weather toPacket() {
      com.hypixel.hytale.protocol.Weather var1 = this.cachedPacket == null ? null : this.cachedPacket.get();
      if (var1 != null) {
         class="kw">return var1;
      }

      com.hypixel.hytale.protocol.Weather var2 = new com.hypixel.hytale.protocol.Weather();
      var2.id = this.id;
      if (this.moons != null && this.moons.length > 0) {
         var2.moons = toStringMap(this.moons);
      }

      if (this.clouds != null && this.clouds.length > 0) {
         var2.clouds = ArrayUtil.copyAndMutate(this.clouds, Cloud::toPacket, com.hypixel.hytale.protocol.Cloud[]::new);
      }

      if (this.sunlightDampingMultiplier != null && this.sunlightDampingMultiplier.length > 0) {
         var2.sunlightDampingMultiplier = toFloatMap(this.sunlightDampingMultiplier);
      }

      if (this.sunlightColors != null && this.sunlightColors.length > 0) {
         var2.sunlightColors = toColorMap(this.sunlightColors);
      }

      if (this.sunColors != null && this.sunColors.length > 0) {
         var2.sunColors = toColorMap(this.sunColors);
      }

      if (this.sunGlowColors != null && this.sunGlowColors.length > 0) {
         var2.sunGlowColors = toColorAlphaMap(this.sunGlowColors);
      }

      if (this.sunScales != null && this.sunScales.length > 0) {
         var2.sunScales = toFloatMap(this.sunScales);
      }

      if (this.moonColors != null && this.moonColors.length > 0) {
         var2.moonColors = toColorAlphaMap(this.moonColors);
      }

      if (this.moonGlowColors != null && this.moonGlowColors.length > 0) {
         var2.moonGlowColors = toColorAlphaMap(this.moonGlowColors);
      }

      if (this.moonScales != null && this.moonScales.length > 0) {
         var2.moonScales = toFloatMap(this.moonScales);
      }

      if (this.skyTopColors != null && this.skyTopColors.length > 0) {
         var2.skyTopColors = toColorAlphaMap(this.skyTopColors);
      }

      if (this.skyBottomColors != null && this.skyBottomColors.length > 0) {
         var2.skyBottomColors = toColorAlphaMap(this.skyBottomColors);
      }

      if (this.skySunsetColors != null && this.skySunsetColors.length > 0) {
         var2.skySunsetColors = toColorAlphaMap(this.skySunsetColors);
      }

      if (this.fogColors != null && this.fogColors.length > 0) {
         var2.fogColors = toColorMap(this.fogColors);
      }

      if (this.fogHeightFalloffs != null && this.fogHeightFalloffs.length > 0) {
         var2.fogHeightFalloffs = toFloatMap(this.fogHeightFalloffs);
      }

      if (this.fogDensities != null && this.fogDensities.length > 0) {
         var2.fogDensities = toFloatMap(this.fogDensities);
      }

      var2.screenEffect = this.screenEffect;
      if (this.screenEffectColors != null && this.screenEffectColors.length > 0) {
         var2.screenEffectColors = toColorAlphaMap(this.screenEffectColors);
      }

      if (this.colorFilters != null && this.colorFilters.length > 0) {
         var2.colorFilters = toColorMap(this.colorFilters);
      }

      if (this.waterTints != null && this.waterTints.length > 0) {
         var2.waterTints = toColorMap(this.waterTints);
      }

      if (this.fogOptions != null) {
         var2.fogOptions = this.fogOptions.toPacket();
      }

      var2.fog = new NearFar(this.fogDistance[0], this.fogDistance[1]);
      var2.stars = this.stars;
      if (this.particle != null) {
         var2.particle = this.particle;
      }

      if (this.data != null) {
         IntSet var3 = this.data.getExpandedTagIndexes();
         var2.tagIndexes = var3.toIntArray();
      }

      this.cachedPacket = new SoftReference<>(var2);
      class="kw">return var2;
   }

   class="kw">public String getId() {
      class="kw">return this.id;
   }

   class="kw">public DayTexture[] getMoons() {
      class="kw">return this.moons;
   }

   class="kw">public Cloud[] getClouds() {
      class="kw">return this.clouds;
   }

   class="kw">public TimeFloat[] getSunlightDampingMultiplier() {
      class="kw">return this.sunlightDampingMultiplier;
   }

   class="kw">public TimeColor[] getSunlightColors() {
      class="kw">return this.sunlightColors;
   }

   class="kw">public TimeColor[] getSunColors() {
      class="kw">return this.sunColors;
   }

   class="kw">public TimeColorAlpha[] getMoonColors() {
      class="kw">return this.moonColors;
   }

   class="kw">public TimeColorAlpha[] getSunGlowColors() {
      class="kw">return this.sunGlowColors;
   }

   class="kw">public TimeColorAlpha[] getMoonGlowColors() {
      class="kw">return this.moonGlowColors;
   }

   class="kw">public TimeFloat[] getSunScales() {
      class="kw">return this.sunScales;
   }

   class="kw">public TimeFloat[] getMoonScales() {
      class="kw">return this.moonScales;
   }

   class="kw">public TimeColorAlpha[] getSkyTopColors() {
      class="kw">return this.skyTopColors;
   }

   class="kw">public TimeColorAlpha[] getSkyBottomColors() {
      class="kw">return this.skyBottomColors;
   }

   class="kw">public TimeColorAlpha[] getSkySunsetColors() {
      class="kw">return this.skySunsetColors;
   }

   class="kw">public TimeColor[] getFogColors() {
      class="kw">return this.fogColors;
   }

   class="kw">public TimeFloat[] getFogHeightFalloffs() {
      class="kw">return this.fogHeightFalloffs;
   }

   class="kw">public TimeFloat[] getFogDensities() {
      class="kw">return this.fogDensities;
   }

   class="kw">public TimeColor[] getWaterTints() {
      class="kw">return this.waterTints;
   }

   class="kw">public float[] getFogDistance() {
      class="kw">return this.fogDistance;
   }

   class="kw">public FogOptions getFogOptions() {
      class="kw">return this.fogOptions;
   }

   class="kw">public String getScreenEffect() {
      class="kw">return this.screenEffect;
   }

   class="kw">public TimeColorAlpha[] getScreenEffectColors() {
      class="kw">return this.screenEffectColors;
   }

   class="kw">public TimeColor[] getColorFilters() {
      class="kw">return this.colorFilters;
   }

   class="kw">public String getStars() {
      class="kw">return this.stars;
   }

   class="kw">public WeatherParticle getParticle() {
      class="kw">return this.particle;
   }

   @Nonnull
   @Override
   class="kw">public String toString() {
      class="kw">return "Weather{id='"
         + this.id
         + "', moons="
         + Arrays.toString(this.moons)
         + ", clouds="
         + Arrays.toString(this.clouds)
         + ", sunlightDampingMultiplier="
         + Arrays.toString(this.sunlightDampingMultiplier)
         + ", sunlightColors="
         + Arrays.toString(this.sunlightColors)
         + ", sunColors="
         + Arrays.toString(this.sunColors)
         + ", sunGlowColors="
         + Arrays.toString(this.sunGlowColors)
         + ", sunScales="
         + Arrays.toString(this.sunScales)
         + ", moonColors="
         + Arrays.toString(this.moonColors)
         + ", moonGlowColors="
         + Arrays.toString(this.moonGlowColors)
         + ", moonScales="
         + Arrays.toString(this.moonScales)
         + ", skyTopColors="
         + Arrays.toString(this.skyTopColors)
         + ", skyBottomColors="
         + Arrays.toString(this.skyBottomColors)
         + ", skySunsetColors="
         + Arrays.toString(this.skySunsetColors)
         + ", fogColors="
         + Arrays.toString(this.fogColors)
         + ", fogHeightFalloffs="
         + Arrays.toString(this.fogHeightFalloffs)
         + ", fogDensities="
         + Arrays.toString(this.fogDensities)
         + ", fogDistance="
         + Arrays.toString(this.fogDistance)
         + ", fogOptions="
         + this.fogOptions
         + ", screenEffect="
         + this.screenEffect
         + ", screenEffectColors="
         + Arrays.toString(this.screenEffectColors)
         + ", colorFilters="
         + Arrays.toString(this.colorFilters)
         + ", waterTints="
         + Arrays.toString(this.waterTints)
         + ", stars="
         + this.stars
         + ", particle="
         + this.particle
         + "}";
   }

   @Nonnull
   class="kw">public class="kw">static Map<Integer, String> toStringMap(@Nonnull DayTexture[] var0) {
      class="kw">return Arrays.stream(var0).collect(Collectors.toMap(DayTexture::getDay, DayTexture::getTexture));
   }

   @Nonnull
   class="kw">public class="kw">static Map<Float, Float> toFloatMap(@Nonnull TimeFloat[] var0) {
      class="kw">return Arrays.stream(var0).collect(Collectors.toMap(TimeFloat::getHour, TimeFloat::getValue));
   }

   @Nonnull
   class="kw">public class="kw">static Map<Float, Color> toColorMap(@Nonnull TimeColor[] var0) {
      class="kw">return Arrays.stream(var0).collect(Collectors.toMap(TimeColor::getHour, TimeColor::getColor));
   }

   @Nonnull
   class="kw">public class="kw">static Map<Float, ColorAlpha> toColorAlphaMap(@Nonnull TimeColorAlpha[] var0) {
      class="kw">return Arrays.stream(var0).collect(Collectors.toMap(TimeColorAlpha::getHour, TimeColorAlpha::getColor));
   }
}