From 2f051f9c6a0383ad7672b50b48af90abe6ad7ba2 Mon Sep 17 00:00:00 2001 From: Syniis Date: Sun, 25 Feb 2024 14:58:07 +0100 Subject: [PATCH] Fix bat entity path --- world/src/layer/cave.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/world/src/layer/cave.rs b/world/src/layer/cave.rs index ef5c2c931c..578764bff6 100644 --- a/world/src/layer/cave.rs +++ b/world/src/layer/cave.rs @@ -1570,7 +1570,7 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio 0.5, ), ( - Some("common.entity.wild.aggressive.bat"), + Some("common.entity.wild.peaceful.bat"), biome.mushroom + 0.1, 0.25, 0.5, @@ -1630,7 +1630,7 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio 0.5, ), ( - Some("common.entity.wild.aggressive.bat"), + Some("common.entity.wild.peaceful.bat"), biome.leafy + 0.1, 0.25, 0.5, @@ -1666,7 +1666,7 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio 0.5, ), ( - Some("common.entity.wild.aggressive.bat"), + Some("common.entity.wild.peaceful.bat"), biome.dusty.max(biome.sandy).max(biome.snowy) + 0.1, 0.25, 0.5, @@ -1784,8 +1784,12 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio .iter() .filter_map(|(entity, biome_modifier, chance, cutoff)| { if let Some(entity) = entity { - let close = close(1.0, *biome_modifier, *cutoff, 2); - (close > 0.0).then(|| (Some(entity), close * chance)) + if *biome_modifier > *cutoff { + let close = close(1.0, *biome_modifier, *cutoff, 2); + (close > 0.0).then(|| (Some(entity), close * chance)) + } else { + None + } } else { Some((None, 100.0)) }