mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed test world to run again
Update test_world.rs
This commit is contained in:
parent
14b0d9a7fe
commit
def68302c7
@ -1,5 +1,5 @@
|
||||
use common::{
|
||||
generation::{ChunkSupplement, EntityInfo, EntityKind},
|
||||
generation::{ChunkSupplement, EntityInfo},
|
||||
terrain::{Block, BlockKind, TerrainChunk, TerrainChunkMeta, TerrainChunkSize},
|
||||
vol::{ReadVol, RectVolSize, Vox, WriteVol},
|
||||
};
|
||||
@ -30,17 +30,10 @@ impl World {
|
||||
|
||||
let mut supplement = ChunkSupplement::default();
|
||||
|
||||
if chunk_pos.map(|e| e % 8 == 0).reduce_and() {
|
||||
supplement = supplement.with_entity(EntityInfo {
|
||||
pos: Vec3::<f32>::from(chunk_pos.map(|e| e as f32 * 32.0)) + Vec3::unit_z() * 256.0,
|
||||
kind: EntityKind::Waypoint,
|
||||
});
|
||||
}
|
||||
|
||||
Ok((
|
||||
TerrainChunk::new(
|
||||
256 + if rng.gen::<u8>() < 64 { height } else { 0 },
|
||||
Block::new(BlockKind::Dense, Rgb::new(200, 220, 255)),
|
||||
Block::new(BlockKind::Grass, Rgb::new(11, 102, 35)),
|
||||
Block::empty(),
|
||||
TerrainChunkMeta::void(),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user