From b0ba5b99793b51b2dfea1c774cfedb3252f54f57 Mon Sep 17 00:00:00 2001 From: floppy Date: Fri, 25 Feb 2022 18:13:47 +0100 Subject: [PATCH] fix SeaCrocodiles spawning in lakes --- world/src/layer/wildlife.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/world/src/layer/wildlife.rs b/world/src/layer/wildlife.rs index 197ee871d7..81199079c6 100644 --- a/world/src/layer/wildlife.rs +++ b/world/src/layer/wildlife.rs @@ -4,7 +4,7 @@ use common::{ calendar::{Calendar, CalendarEvent}, generation::{ChunkSupplement, EntityInfo}, resources::TimeOfDay, - terrain::Block, + terrain::{BiomeKind, Block}, time::DayPeriod, vol::{BaseVol, ReadVol, RectSizedVol, WriteVol}, }; @@ -265,7 +265,9 @@ pub fn spawn_manifest() -> Vec<(&'static str, DensityFn)> { // Ocean animals ("world.wildlife.spawn.tropical.ocean", |_c, col| { close(col.temp, CONFIG.tropical_temp, 0.1) / 10.0 - * if col.water_dist.map(|d| d < 1.0).unwrap_or(false) && col.tree_density == 0.0 { + * if col.water_dist.map(|d| d < 1.0).unwrap_or(false) + && !matches!(col.chunk.get_biome(), BiomeKind::Ocean) + { 0.001 } else { 0.0