EffectsProperties.java 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * This file is part of architectury.
  3. * Copyright (C) 2020, 2021, 2022 architectury
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 3 of the License, or (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public License
  16. * along with this program; if not, write to the Free Software Foundation,
  17. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. */
  19. package me.shedaniel.architectury.hooks.biome;
  20. import net.minecraft.sounds.Music;
  21. import net.minecraft.sounds.SoundEvent;
  22. import net.minecraft.world.level.biome.AmbientAdditionsSettings;
  23. import net.minecraft.world.level.biome.AmbientMoodSettings;
  24. import net.minecraft.world.level.biome.AmbientParticleSettings;
  25. import net.minecraft.world.level.biome.BiomeSpecialEffects.GrassColorModifier;
  26. import org.jetbrains.annotations.Nullable;
  27. import java.util.Optional;
  28. import java.util.OptionalInt;
  29. public interface EffectsProperties {
  30. int getFogColor();
  31. int getWaterColor();
  32. int getWaterFogColor();
  33. int getSkyColor();
  34. OptionalInt getFoliageColorOverride();
  35. OptionalInt getGrassColorOverride();
  36. GrassColorModifier getGrassColorModifier();
  37. Optional<AmbientParticleSettings> getAmbientParticle();
  38. Optional<SoundEvent> getAmbientLoopSound();
  39. Optional<AmbientMoodSettings> getAmbientMoodSound();
  40. Optional<AmbientAdditionsSettings> getAmbientAdditionsSound();
  41. Optional<Music> getBackgroundMusic();
  42. interface Mutable extends EffectsProperties {
  43. EffectsProperties.Mutable setFogColor(int color);
  44. EffectsProperties.Mutable setWaterColor(int color);
  45. EffectsProperties.Mutable setWaterFogColor(int color);
  46. EffectsProperties.Mutable setSkyColor(int color);
  47. EffectsProperties.Mutable setFoliageColorOverride(@Nullable Integer colorOverride);
  48. EffectsProperties.Mutable setGrassColorOverride(@Nullable Integer colorOverride);
  49. EffectsProperties.Mutable setGrassColorModifier(GrassColorModifier modifier);
  50. EffectsProperties.Mutable setAmbientParticle(@Nullable AmbientParticleSettings settings);
  51. EffectsProperties.Mutable setAmbientLoopSound(@Nullable SoundEvent sound);
  52. EffectsProperties.Mutable setAmbientMoodSound(@Nullable AmbientMoodSettings settings);
  53. EffectsProperties.Mutable setAmbientAdditionsSound(@Nullable AmbientAdditionsSettings settings);
  54. EffectsProperties.Mutable setBackgroundMusic(@Nullable Music music);
  55. }
  56. }