Skip to content

Commit

Permalink
Fix effective ambience not playing
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor4t committed Feb 20, 2025
1 parent 71ff8e6 commit 92d1e32
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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/" }
Expand Down
3 changes: 3 additions & 0 deletions src/client/java/org/ladysnake/effective/Effective.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class EffectiveAmbientConditions {
public static final Set<AmbientCondition> 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)));
Expand Down

0 comments on commit 92d1e32

Please sign in to comment.