From bf01069f44ec508dffad110a7799a1761fe0f79b Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Thu, 10 Oct 2019 10:11:46 +0100 Subject: [PATCH] Balanced chest spawning --- world/src/block/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/world/src/block/mod.rs b/world/src/block/mod.rs index 9cd41b481c..66efd8103f 100644 --- a/world/src/block/mod.rs +++ b/world/src/block/mod.rs @@ -617,7 +617,11 @@ pub fn block_from_structure( .map(|e| e as u8), )), StructureBlock::Fruit => Some(Block::new(BlockKind::Apple, Rgb::new(194, 30, 37))), - StructureBlock::Chest => Some(Block::new(BlockKind::Chest, Rgb::new(0, 0, 0))), + StructureBlock::Chest => Some(if structure_seed % 10 < 7 { + Block::empty() + } else { + Block::new(BlockKind::Chest, Rgb::new(0, 0, 0)) + }), StructureBlock::Liana => Some(Block::new( BlockKind::Liana, Lerp::lerp(