|
@@ -41,7 +41,6 @@ import java.util.OptionalInt;
|
|
import java.util.function.Supplier;
|
|
import java.util.function.Supplier;
|
|
|
|
|
|
public final class BiomeHooks {
|
|
public final class BiomeHooks {
|
|
- @NotNull
|
|
|
|
public static BiomeProperties getBiomeProperties(Biome biome) {
|
|
public static BiomeProperties getBiomeProperties(Biome biome) {
|
|
return new BiomeWrapped(biome);
|
|
return new BiomeWrapped(biome);
|
|
}
|
|
}
|
|
@@ -74,31 +73,26 @@ public final class BiomeHooks {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public ClimateProperties getClimateProperties() {
|
|
public ClimateProperties getClimateProperties() {
|
|
return climateProperties;
|
|
return climateProperties;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties getEffectsProperties() {
|
|
public EffectsProperties getEffectsProperties() {
|
|
return effectsProperties;
|
|
return effectsProperties;
|
|
}
|
|
}
|
|
|
|
|
|
- @NotNull
|
|
|
|
@Override
|
|
@Override
|
|
public GenerationProperties getGenerationProperties() {
|
|
public GenerationProperties getGenerationProperties() {
|
|
return generationProperties;
|
|
return generationProperties;
|
|
}
|
|
}
|
|
|
|
|
|
- @NotNull
|
|
|
|
@Override
|
|
@Override
|
|
public SpawnProperties getSpawnProperties() {
|
|
public SpawnProperties getSpawnProperties() {
|
|
return spawnProperties;
|
|
return spawnProperties;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public BiomeCategory getCategory() {
|
|
public BiomeCategory getCategory() {
|
|
return biome.biomeCategory;
|
|
return biome.biomeCategory;
|
|
}
|
|
}
|
|
@@ -138,41 +132,38 @@ public final class BiomeHooks {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public @NotNull ClimateProperties.Mutable getClimateProperties() {
|
|
|
|
|
|
+ public ClimateProperties.Mutable getClimateProperties() {
|
|
return (ClimateProperties.Mutable) super.getClimateProperties();
|
|
return (ClimateProperties.Mutable) super.getClimateProperties();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public @NotNull EffectsProperties.Mutable getEffectsProperties() {
|
|
|
|
|
|
+ public EffectsProperties.Mutable getEffectsProperties() {
|
|
return (EffectsProperties.Mutable) super.getEffectsProperties();
|
|
return (EffectsProperties.Mutable) super.getEffectsProperties();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public @NotNull GenerationProperties.Mutable getGenerationProperties() {
|
|
|
|
|
|
+ public GenerationProperties.Mutable getGenerationProperties() {
|
|
return (GenerationProperties.Mutable) super.getGenerationProperties();
|
|
return (GenerationProperties.Mutable) super.getGenerationProperties();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public @NotNull SpawnProperties.Mutable getSpawnProperties() {
|
|
|
|
|
|
+ public SpawnProperties.Mutable getSpawnProperties() {
|
|
return (SpawnProperties.Mutable) super.getSpawnProperties();
|
|
return (SpawnProperties.Mutable) super.getSpawnProperties();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
- public Mutable setCategory(@NotNull BiomeCategory category) {
|
|
|
|
|
|
+ public Mutable setCategory(BiomeCategory category) {
|
|
biome.biomeCategory = category;
|
|
biome.biomeCategory = category;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Mutable setDepth(float depth) {
|
|
public Mutable setDepth(float depth) {
|
|
biome.depth = depth;
|
|
biome.depth = depth;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Mutable setScale(float scale) {
|
|
public Mutable setScale(float scale) {
|
|
biome.scale = scale;
|
|
biome.scale = scale;
|
|
return this;
|
|
return this;
|
|
@@ -191,35 +182,30 @@ public final class BiomeHooks {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
- public Mutable setPrecipitation(@NotNull Biome.Precipitation precipitation) {
|
|
|
|
|
|
+ public Mutable setPrecipitation(Biome.Precipitation precipitation) {
|
|
climateSettings.precipitation = precipitation;
|
|
climateSettings.precipitation = precipitation;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Mutable setTemperature(float temperature) {
|
|
public Mutable setTemperature(float temperature) {
|
|
climateSettings.temperature = temperature;
|
|
climateSettings.temperature = temperature;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
- public Mutable setTemperatureModifier(@NotNull Biome.TemperatureModifier temperatureModifier) {
|
|
|
|
|
|
+ public Mutable setTemperatureModifier(Biome.TemperatureModifier temperatureModifier) {
|
|
climateSettings.temperatureModifier = temperatureModifier;
|
|
climateSettings.temperatureModifier = temperatureModifier;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Mutable setDownfall(float downfall) {
|
|
public Mutable setDownfall(float downfall) {
|
|
climateSettings.downfall = downfall;
|
|
climateSettings.downfall = downfall;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Biome.Precipitation getPrecipitation() {
|
|
public Biome.Precipitation getPrecipitation() {
|
|
return climateSettings.precipitation;
|
|
return climateSettings.precipitation;
|
|
}
|
|
}
|
|
@@ -230,7 +216,6 @@ public final class BiomeHooks {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Biome.TemperatureModifier getTemperatureModifier() {
|
|
public Biome.TemperatureModifier getTemperatureModifier() {
|
|
return climateSettings.temperatureModifier;
|
|
return climateSettings.temperatureModifier;
|
|
}
|
|
}
|
|
@@ -253,84 +238,72 @@ public final class BiomeHooks {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setFogColor(int color) {
|
|
public EffectsProperties.Mutable setFogColor(int color) {
|
|
effects.fogColor = color;
|
|
effects.fogColor = color;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setWaterColor(int color) {
|
|
public EffectsProperties.Mutable setWaterColor(int color) {
|
|
effects.waterColor = color;
|
|
effects.waterColor = color;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setWaterFogColor(int color) {
|
|
public EffectsProperties.Mutable setWaterFogColor(int color) {
|
|
effects.waterFogColor = color;
|
|
effects.waterFogColor = color;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setSkyColor(int color) {
|
|
public EffectsProperties.Mutable setSkyColor(int color) {
|
|
effects.skyColor = color;
|
|
effects.skyColor = color;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setFoliageColorOverride(@Nullable Integer colorOverride) {
|
|
public EffectsProperties.Mutable setFoliageColorOverride(@Nullable Integer colorOverride) {
|
|
effects.foliageColorOverride = Optional.ofNullable(colorOverride);
|
|
effects.foliageColorOverride = Optional.ofNullable(colorOverride);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setGrassColorOverride(@Nullable Integer colorOverride) {
|
|
public EffectsProperties.Mutable setGrassColorOverride(@Nullable Integer colorOverride) {
|
|
effects.grassColorOverride = Optional.ofNullable(colorOverride);
|
|
effects.grassColorOverride = Optional.ofNullable(colorOverride);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
- public EffectsProperties.Mutable setGrassColorModifier(@NotNull GrassColorModifier modifier) {
|
|
|
|
|
|
+ public EffectsProperties.Mutable setGrassColorModifier(GrassColorModifier modifier) {
|
|
effects.grassColorModifier = modifier;
|
|
effects.grassColorModifier = modifier;
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setAmbientParticle(@Nullable AmbientParticleSettings settings) {
|
|
public EffectsProperties.Mutable setAmbientParticle(@Nullable AmbientParticleSettings settings) {
|
|
effects.ambientParticleSettings = Optional.ofNullable(settings);
|
|
effects.ambientParticleSettings = Optional.ofNullable(settings);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setAmbientLoopSound(@Nullable SoundEvent sound) {
|
|
public EffectsProperties.Mutable setAmbientLoopSound(@Nullable SoundEvent sound) {
|
|
effects.ambientLoopSoundEvent = Optional.ofNullable(sound);
|
|
effects.ambientLoopSoundEvent = Optional.ofNullable(sound);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setAmbientMoodSound(@Nullable AmbientMoodSettings settings) {
|
|
public EffectsProperties.Mutable setAmbientMoodSound(@Nullable AmbientMoodSettings settings) {
|
|
effects.ambientMoodSettings = Optional.ofNullable(settings);
|
|
effects.ambientMoodSettings = Optional.ofNullable(settings);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setAmbientAdditionsSound(@Nullable AmbientAdditionsSettings settings) {
|
|
public EffectsProperties.Mutable setAmbientAdditionsSound(@Nullable AmbientAdditionsSettings settings) {
|
|
effects.ambientAdditionsSettings = Optional.ofNullable(settings);
|
|
effects.ambientAdditionsSettings = Optional.ofNullable(settings);
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public EffectsProperties.Mutable setBackgroundMusic(@Nullable Music music) {
|
|
public EffectsProperties.Mutable setBackgroundMusic(@Nullable Music music) {
|
|
effects.backgroundMusic = Optional.ofNullable(music);
|
|
effects.backgroundMusic = Optional.ofNullable(music);
|
|
return this;
|
|
return this;
|
|
@@ -357,49 +330,41 @@ public final class BiomeHooks {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public OptionalInt getFoliageColorOverride() {
|
|
public OptionalInt getFoliageColorOverride() {
|
|
return effects.foliageColorOverride.map(OptionalInt::of).orElseGet(OptionalInt::empty);
|
|
return effects.foliageColorOverride.map(OptionalInt::of).orElseGet(OptionalInt::empty);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public OptionalInt getGrassColorOverride() {
|
|
public OptionalInt getGrassColorOverride() {
|
|
return effects.grassColorOverride.map(OptionalInt::of).orElseGet(OptionalInt::empty);
|
|
return effects.grassColorOverride.map(OptionalInt::of).orElseGet(OptionalInt::empty);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public GrassColorModifier getGrassColorModifier() {
|
|
public GrassColorModifier getGrassColorModifier() {
|
|
return effects.grassColorModifier;
|
|
return effects.grassColorModifier;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Optional<AmbientParticleSettings> getAmbientParticle() {
|
|
public Optional<AmbientParticleSettings> getAmbientParticle() {
|
|
return effects.ambientParticleSettings;
|
|
return effects.ambientParticleSettings;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Optional<SoundEvent> getAmbientLoopSound() {
|
|
public Optional<SoundEvent> getAmbientLoopSound() {
|
|
return effects.ambientLoopSoundEvent;
|
|
return effects.ambientLoopSoundEvent;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Optional<AmbientMoodSettings> getAmbientMoodSound() {
|
|
public Optional<AmbientMoodSettings> getAmbientMoodSound() {
|
|
return effects.ambientMoodSettings;
|
|
return effects.ambientMoodSettings;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Optional<AmbientAdditionsSettings> getAmbientAdditionsSound() {
|
|
public Optional<AmbientAdditionsSettings> getAmbientAdditionsSound() {
|
|
return effects.ambientAdditionsSettings;
|
|
return effects.ambientAdditionsSettings;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Optional<Music> getBackgroundMusic() {
|
|
public Optional<Music> getBackgroundMusic() {
|
|
return effects.backgroundMusic;
|
|
return effects.backgroundMusic;
|
|
}
|
|
}
|
|
@@ -417,22 +382,22 @@ public final class BiomeHooks {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public @NotNull Optional<Supplier<ConfiguredSurfaceBuilder<?>>> getSurfaceBuilder() {
|
|
|
|
|
|
+ public Optional<Supplier<ConfiguredSurfaceBuilder<?>>> getSurfaceBuilder() {
|
|
return Optional.ofNullable(settings.getSurfaceBuilder());
|
|
return Optional.ofNullable(settings.getSurfaceBuilder());
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public @NotNull List<Supplier<ConfiguredWorldCarver<?>>> getCarvers(GenerationStep.Carving carving) {
|
|
|
|
|
|
+ public List<Supplier<ConfiguredWorldCarver<?>>> getCarvers(GenerationStep.Carving carving) {
|
|
return settings.getCarvers(carving);
|
|
return settings.getCarvers(carving);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public @NotNull List<List<Supplier<ConfiguredFeature<?, ?>>>> getFeatures() {
|
|
|
|
|
|
+ public List<List<Supplier<ConfiguredFeature<?, ?>>>> getFeatures() {
|
|
return settings.features();
|
|
return settings.features();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public @NotNull List<Supplier<ConfiguredStructureFeature<?, ?>>> getStructureStarts() {
|
|
|
|
|
|
+ public List<Supplier<ConfiguredStructureFeature<?, ?>>> getStructureStarts() {
|
|
return (List<Supplier<ConfiguredStructureFeature<?, ?>>>) settings.structures();
|
|
return (List<Supplier<ConfiguredStructureFeature<?, ?>>>) settings.structures();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -454,13 +419,11 @@ public final class BiomeHooks {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Map<MobCategory, List<MobSpawnSettings.SpawnerData>> getSpawners() {
|
|
public Map<MobCategory, List<MobSpawnSettings.SpawnerData>> getSpawners() {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- @NotNull
|
|
|
|
public Map<EntityType<?>, MobSpawnSettings.MobSpawnCost> getMobSpawnCosts() {
|
|
public Map<EntityType<?>, MobSpawnSettings.MobSpawnCost> getMobSpawnCosts() {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|