diff --git a/assets/world/manifests/spots/jungle/saurok-altar.ron b/assets/world/manifests/spots/jungle/saurok-altar.ron index 0488c8777d..cde1018b8a 100644 --- a/assets/world/manifests/spots/jungle/saurok-altar.ron +++ b/assets/world/manifests/spots/jungle/saurok-altar.ron @@ -4,5 +4,9 @@ ( specifier: "world.structure.natural.saurok-altar", center: (10, 13, 3), + custom_indices: { + 105: Filled(GlowingRock, (r: 161, g: 255, b: 133)), + 113: Filled(GlowingRock, (r: 139, g: 245, b: 104)), + }, ), ] diff --git a/assets/world/manifests/spots_grasslands/gnarling_totem.ron b/assets/world/manifests/spots_grasslands/gnarling_totem.ron index f98792c228..d32452e1f6 100644 --- a/assets/world/manifests/spots_grasslands/gnarling_totem.ron +++ b/assets/world/manifests/spots_grasslands/gnarling_totem.ron @@ -3,6 +3,9 @@ [ ( specifier: "world.structure.natural.gnarling_totem", - center: (9, 5, 5) + center: (9, 5, 5), + custom_indices: { + 217: Filled(GlowingRock, (r: 0, g: 255, b: 246)), + }, ), ] diff --git a/assets/world/manifests/trees/airship_crash.ron b/assets/world/manifests/trees/airship_crash.ron index 7e89d08867..8ae9dbef19 100644 --- a/assets/world/manifests/trees/airship_crash.ron +++ b/assets/world/manifests/trees/airship_crash.ron @@ -1,8 +1,8 @@ #![enable(unwrap_newtypes)] -[ +[ ( specifier: "world.structure.natural.airship-crashsite_0", - center: (28, 40, 14) + center: (28, 40, 14), ), ] diff --git a/assets/world/structure/dungeon/pillar_entrance/4.vox b/assets/world/structure/dungeon/pillar_entrance/4.vox index f9e8e1030d..afd44d6f0c 100644 --- a/assets/world/structure/dungeon/pillar_entrance/4.vox +++ b/assets/world/structure/dungeon/pillar_entrance/4.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:81b784fb9eaac194420bd392a0f654a3426a9569b72f4e245054a40a63eae0e9 -size 92924 +oid sha256:de0d3f465ed0904ec80dd6341e544ac4b7930c10c55c01633f5b4aa8a4147814 +size 92944 diff --git a/assets/world/structure/natural/airship-crashsite_0.vox b/assets/world/structure/natural/airship-crashsite_0.vox index ab1fc16e41..0c1f536ce7 100644 --- a/assets/world/structure/natural/airship-crashsite_0.vox +++ b/assets/world/structure/natural/airship-crashsite_0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c86aa8448d18f56ebe0625c026ba0d3699f7670f096f9b49d4cabda252c8b88a -size 23264 +oid sha256:c37514dd104546e273ec4ea4a82717f2a17e149800691283bcbe269346cc48df +size 25604 diff --git a/assets/world/structure/natural/dwarven_grave.vox b/assets/world/structure/natural/dwarven_grave.vox index 8d625b6170..9f75b4448b 100644 --- a/assets/world/structure/natural/dwarven_grave.vox +++ b/assets/world/structure/natural/dwarven_grave.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98f6ec91ba6d81761184458e7de75973e71a43a8cacf53bb4cdf6dd22ea4ee5f -size 25760 +oid sha256:26469d1dc68820a2dd5f9b2d9d96e77594579d89d81eddebcdbdbef9815f0176 +size 25772 diff --git a/assets/world/structure/natural/gnarling_totem.vox b/assets/world/structure/natural/gnarling_totem.vox index 19057aa31e..42df432b9c 100644 --- a/assets/world/structure/natural/gnarling_totem.vox +++ b/assets/world/structure/natural/gnarling_totem.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d78016291e22197dc2cc2ef9af6e7ca77a559d79edbb48072816374cc5a0269 -size 5832 +oid sha256:e6a845e478bbf731017047ee0bb8f646523797ea27753a200ca6bdd89cf314fa +size 5824 diff --git a/assets/world/structure/natural/lionrock_0.vox b/assets/world/structure/natural/lionrock_0.vox index d70824359b..ced6a66b6d 100644 --- a/assets/world/structure/natural/lionrock_0.vox +++ b/assets/world/structure/natural/lionrock_0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8ba8cd3dd58b7410499224420080c383abae40651f64097a51ec5c0180eef9ed -size 22128 +oid sha256:4bdcc7499dc204c5d2849380cd205ac0748276a878b7fbd090b869fb11ef569b +size 22528 diff --git a/assets/world/structure/natural/myrmidon-temple.vox b/assets/world/structure/natural/myrmidon-temple.vox index 8ba09c6134..f0e9b57560 100644 --- a/assets/world/structure/natural/myrmidon-temple.vox +++ b/assets/world/structure/natural/myrmidon-temple.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c126e9c99e9cb3d6f16806bce56947e8a61759ae8149889aa150e260531999f2 -size 53860 +oid sha256:896420811094107fdf25c54c2e7b4aa0243b9d89a5fec44655e2d3ab299ceefe +size 53872 diff --git a/assets/world/structure/natural/rock-circle.vox b/assets/world/structure/natural/rock-circle.vox index e3bbd90aa3..34fc6bbfb1 100644 --- a/assets/world/structure/natural/rock-circle.vox +++ b/assets/world/structure/natural/rock-circle.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11b9bfe9bb97f6073e27f733735d26fd884b602601159b1ef36680a7636dcc0c -size 54256 +oid sha256:a6756a65d5c93489ec87adae8d62a873cef7136be3e50b9bd97a07d29fdb5cd3 +size 55964 diff --git a/assets/world/structure/natural/saurok-altar.vox b/assets/world/structure/natural/saurok-altar.vox index d924cd1d7c..858fee1137 100644 --- a/assets/world/structure/natural/saurok-altar.vox +++ b/assets/world/structure/natural/saurok-altar.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68ebede33de4acb5e7fbb44d62500e77079d549dd89141d98b02877cf82767dc -size 15292 +oid sha256:5b952e3eb33ecfb3d3e73e38d56aa80c20f3e15e6d565027b17c1e79a88d8059 +size 15312 diff --git a/assets/world/structure/natural/skull-large.vox b/assets/world/structure/natural/skull-large.vox index cb855f9576..e235273dd5 100644 --- a/assets/world/structure/natural/skull-large.vox +++ b/assets/world/structure/natural/skull-large.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2a500426f6e90c7653d1f732a57c79bbd3782a69f67e3b8451ade64e9cdc4911 -size 8464 +oid sha256:d42eba34bc4f12e59def229981f44906d2a5a97adc3a90ca2f3a09093aaa4bad +size 8508 diff --git a/assets/world/structure/natural/witch-hut-black_0.vox b/assets/world/structure/natural/witch-hut-black_0.vox index f6bb66e366..08320ec78d 100644 --- a/assets/world/structure/natural/witch-hut-black_0.vox +++ b/assets/world/structure/natural/witch-hut-black_0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1ba5684fd0b4b14bee511c208bda688670737658594ac70f461c07987abd0e4 -size 34372 +oid sha256:e38a81edae8894abc3b2c25becb3ef1c5318c704beb2252564c3d81fcffe080f +size 34376 diff --git a/common/src/terrain/block.rs b/common/src/terrain/block.rs index 6d7b793899..5a99767d0b 100644 --- a/common/src/terrain/block.rs +++ b/common/src/terrain/block.rs @@ -237,6 +237,7 @@ impl Block { BlockKind::Snow => Some(0.1), BlockKind::Lava => None, _ => self.get_sprite().and_then(|sprite| match sprite { + sprite if sprite.is_container() => None, SpriteKind::Anvil | SpriteKind::Cauldron | SpriteKind::CookingPot diff --git a/common/src/terrain/structure.rs b/common/src/terrain/structure.rs index 9641beebc1..f017b582ff 100644 --- a/common/src/terrain/structure.rs +++ b/common/src/terrain/structure.rs @@ -13,7 +13,7 @@ use vek::*; make_case_elim!( structure_block, #[derive(Copy, Clone, PartialEq, Debug, Deserialize)] - #[repr(u32)] + #[repr(u8)] pub enum StructureBlock { None = 0, Grass = 1, diff --git a/world/src/block/mod.rs b/world/src/block/mod.rs index 6821bbe2b6..e0daa4194a 100644 --- a/world/src/block/mod.rs +++ b/world/src/block/mod.rs @@ -239,7 +239,7 @@ pub fn block_from_structure( match sblock { StructureBlock::None => None, - StructureBlock::Hollow => Some(with_sprite(SpriteKind::Empty)), + StructureBlock::Hollow => Some(Block::air(SpriteKind::Empty)), StructureBlock::Grass => Some(Block::new( BlockKind::Grass, sample.surface_color.map(|e| (e * 255.0) as u8), @@ -270,10 +270,16 @@ pub fn block_from_structure( } }, StructureBlock::Chest => { - if structure_seed % 10 < 7 { - Some(Block::empty()) + let old_block = with_sprite(SpriteKind::Empty); + let block = if old_block.is_fluid() { + old_block } else { - Some(with_sprite(SpriteKind::Chest)) + Block::air(SpriteKind::Empty) + }; + if field.get(pos + structure_pos) % 16 < 8 { + Some(block) + } else { + Some(block.with_sprite(SpriteKind::Chest)) } }, StructureBlock::Log => Some(Block::new(BlockKind::Wood, Rgb::new(60, 30, 0))), diff --git a/world/src/layer/spot.rs b/world/src/layer/spot.rs index 0be4abb76f..1b54965728 100644 --- a/world/src/layer/spot.rs +++ b/world/src/layer/spot.rs @@ -279,7 +279,7 @@ impl Spot { / 1000.0f32.powi(2)) .ceil() as u64 { - let pos = world_size.map(|e| world.rng.gen_range(0..e as i32)); + let pos = world_size.map(|e| (world.rng.gen_range(0..e) & !0b11) as i32); if let Some((_, chunk)) = world .get_gradient_approx(pos) .zip(world.get_mut(pos)) @@ -367,7 +367,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { Spot::LionRock => SpotConfig { base_structures: Some("spots_savannah.lion_rock"), entity_radius: 20.0, - entities: &[(0..8, "common.entity.wild.aggressive.lion")], + entities: &[(5..8, "common.entity.wild.aggressive.lion")], }, Spot::TreeStumpForest => SpotConfig { base_structures: Some("trees.oak_stumps"), diff --git a/world/src/sim/mod.rs b/world/src/sim/mod.rs index bdef079640..ba80fd76fb 100644 --- a/world/src/sim/mod.rs +++ b/world/src/sim/mod.rs @@ -2065,7 +2065,10 @@ impl WorldSim { let env = Environment { humid: chunk.humidity, temp: chunk.temp, - near_water: if chunk.river.is_lake() || chunk.river.near_river() { + near_water: if chunk.river.is_lake() + || chunk.river.near_river() + || chunk.alt < CONFIG.sea_level + 3.0 + { 1.0 } else { 0.0