From 92d1e3235ed0f0b27e27379dd69a867f24f18f3b Mon Sep 17 00:00:00 2001 From: doctor4t Date: Thu, 20 Feb 2025 22:08:34 +0100 Subject: [PATCH] Fix effective ambience not playing --- build.gradle | 14 ++++++++++++-- .../java/org/ladysnake/effective/Effective.java | 3 +++ .../index/EffectiveAmbientConditions.java | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 6c7637b..607400e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'fabric-loom' version '1.9-SNAPSHOT' - id "io.github.ladysnake.chenille" version "0.14.0" + id "io.github.ladysnake.chenille" version "0.15.0" } version = project.mod_version; @@ -33,7 +33,17 @@ loom { repositories { // Modrinth - maven { url "https://api.modrinth.com/maven" } + exclusiveContent { + forRepository { + maven { + name = "Modrinth" + url = "https://api.modrinth.com/maven" + } + } + filter { + includeGroup "maven.modrinth" + } + } // Veil maven { url "https://maven.blamejared.com/" } diff --git a/src/client/java/org/ladysnake/effective/Effective.java b/src/client/java/org/ladysnake/effective/Effective.java index c9b99ed..6049ea9 100644 --- a/src/client/java/org/ladysnake/effective/Effective.java +++ b/src/client/java/org/ladysnake/effective/Effective.java @@ -24,6 +24,7 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import org.ladysnake.effective.gui.ParryScreen; +import org.ladysnake.effective.index.EffectiveAmbientConditions; import org.ladysnake.effective.index.EffectiveLights; import org.ladysnake.effective.index.EffectiveParticles; import org.ladysnake.effective.index.EffectiveSounds; @@ -96,6 +97,8 @@ public static Identifier id(String string) { @Override public void onInitializeClient() { + EffectiveAmbientConditions.initialize(); + // Enable Veil albedo buffer VeilEventPlatform.INSTANCE.onVeilRendererAvailable(veilRenderer -> { VeilRenderSystem.renderer().enableBuffers(Effective.id("albedo"), DynamicBufferType.ALBEDO); diff --git a/src/client/java/org/ladysnake/effective/index/EffectiveAmbientConditions.java b/src/client/java/org/ladysnake/effective/index/EffectiveAmbientConditions.java index 2425b4a..97c41f0 100644 --- a/src/client/java/org/ladysnake/effective/index/EffectiveAmbientConditions.java +++ b/src/client/java/org/ladysnake/effective/index/EffectiveAmbientConditions.java @@ -13,7 +13,7 @@ public class EffectiveAmbientConditions { public static final Set INSTANCE = new HashSet<>(); - public void initialize() { + public static void initialize() { // bees in floral biomes during the day INSTANCE.add(new AmbientCondition(EffectiveSounds.AMBIENT_ANIMAL_BEES, AmbientCondition.Type.ANIMAL, (world, pos, player) -> EffectiveUtils.isInOverworld(world, pos) && !EffectiveUtils.isInCave(world, pos) && world.getBiome(pos).isIn(ConventionalBiomeTags.IS_FLORAL) && !Effective.isNightTime(world)));