diff --git a/assets/voxygen/shaders/particle-vert.glsl b/assets/voxygen/shaders/particle-vert.glsl index 08b54e54a8..32de189e4c 100644 --- a/assets/voxygen/shaders/particle-vert.glsl +++ b/assets/voxygen/shaders/particle-vert.glsl @@ -46,6 +46,7 @@ const int FIREWORK_RED = 7; const int FIREWORK_YELLOW = 8; const int LEAF = 9; const int FIREFLY = 10; +const int BEE = 11; // meters per second squared (acceleration) const float earth_gravity = 9.807; @@ -227,6 +228,18 @@ void main() { vec4(vec3(5, 5, 1.1), 1), spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 5) ); + } else if (inst_mode == BEE) { + float lower = pow(sin(3.1416 * lifetime / inst_lifespan), 0.2); + attr = Attr( + vec3(0, 0, lower * -0.5) + vec3( + sin(lifetime * 2.0 + rand0) + sin(lifetime * 9.0 + rand3) * 0.3, + sin(lifetime * 3.0 + rand1) + sin(lifetime * 10.0 + rand4) * 0.3, + sin(lifetime * 4.0 + rand2) + sin(lifetime * 11.0 + rand5) * 0.3 + ) * 0.5, + lower, + vec4(vec3(1, 0.7, 0), 1), + spin_in_axis(vec3(rand6, rand7, rand8), rand9 * 3 + lifetime * 5) + ); } else { attr = Attr( linear_motion( diff --git a/assets/voxygen/voxel/sprite/beehive/beehive.vox b/assets/voxygen/voxel/sprite/beehive/beehive.vox new file mode 100644 index 0000000000..7aaa4ab050 --- /dev/null +++ b/assets/voxygen/voxel/sprite/beehive/beehive.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:438bb33e45e89b6f10beb9e2ac1df3e7a07d67578e9a60237c4a088e94b0f6bf +size 2100 diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index 55574a6b30..398b50638c 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -1959,4 +1959,16 @@ Reed: Some(( ], wind_sway: 0.65, )), + +// Beehive +Beehive: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.beehive.beehive", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.1, +)), ) diff --git a/common/src/terrain/block.rs b/common/src/terrain/block.rs index 6fe11fd434..60674b0f95 100644 --- a/common/src/terrain/block.rs +++ b/common/src/terrain/block.rs @@ -94,6 +94,7 @@ make_case_elim!( DropGateBottom = 0x51, GrassSnow = 0x52, Reed = 0x53, + Beehive = 0x54, } ); @@ -202,6 +203,7 @@ impl BlockKind { BlockKind::DropGateBottom => false, BlockKind::GrassSnow => true, BlockKind::Reed => true, + BlockKind::Beehive => true, _ => false, } } @@ -299,6 +301,7 @@ impl BlockKind { BlockKind::DropGateBottom => false, BlockKind::GrassSnow => false, BlockKind::Reed => false, + BlockKind::Beehive => false, _ => true, } } @@ -506,7 +509,8 @@ impl Block { | BlockKind::Chest | BlockKind::DropGate | BlockKind::DropGateBottom - | BlockKind::Door => Some(self.color[0] & 0b111), + | BlockKind::Door + | BlockKind::Beehive => Some(self.color[0] & 0b111), _ => None, } } diff --git a/server/src/events/entity_creation.rs b/server/src/events/entity_creation.rs index a94907b88a..757573a132 100644 --- a/server/src/events/entity_creation.rs +++ b/server/src/events/entity_creation.rs @@ -119,7 +119,7 @@ pub fn handle_create_waypoint(server: &mut Server, pos: Vec3) { .state .create_object(Pos(pos), comp::object::Body::CampfireLit) .with(LightEmitter { - col: Rgb::new(1.0, 0.6, 0.0), + col: Rgb::new(1.0, 0.3, 0.1), strength: 5.0, flicker: 1.0, animated: true, diff --git a/voxygen/src/render/pipelines/particle.rs b/voxygen/src/render/pipelines/particle.rs index 63c99c339c..5854009517 100644 --- a/voxygen/src/render/pipelines/particle.rs +++ b/voxygen/src/render/pipelines/particle.rs @@ -104,6 +104,7 @@ pub enum ParticleMode { FireworkYellow = 8, Leaf = 9, Firefly = 10, + Bee = 11, } impl ParticleMode { diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index 1756d1ebed..046389d750 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -328,6 +328,14 @@ impl ParticleMgr { ParticleMode::Firefly, |sd| sd.state.get_day_period().is_dark(), ), + ( + |boi| &boi.beehives, + 3, + 0.5, + 30.0, + ParticleMode::Bee, + |sd| sd.state.get_day_period().is_light(), + ), ]; let mut rng = thread_rng(); diff --git a/voxygen/src/scene/terrain.rs b/voxygen/src/scene/terrain.rs index 5587f4dfd0..04dccd9558 100644 --- a/voxygen/src/scene/terrain.rs +++ b/voxygen/src/scene/terrain.rs @@ -91,7 +91,6 @@ struct SpriteModelConfig { lod_axes: (f32, f32, f32), } -<<<<<<< HEAD #[derive(Deserialize)] /// Configuration data for a group of sprites (currently associated with a /// particular BlockKind). diff --git a/voxygen/src/scene/terrain/watcher.rs b/voxygen/src/scene/terrain/watcher.rs index 57d672fd8a..4fe40c0ede 100644 --- a/voxygen/src/scene/terrain/watcher.rs +++ b/voxygen/src/scene/terrain/watcher.rs @@ -9,6 +9,7 @@ pub struct BlocksOfInterest { pub leaves: Vec>, pub grass: Vec>, pub embers: Vec>, + pub beehives: Vec>, } impl BlocksOfInterest { @@ -16,6 +17,7 @@ impl BlocksOfInterest { let mut leaves = Vec::new(); let mut grass = Vec::new(); let mut embers = Vec::new(); + let mut beehives = Vec::new(); chunk .vol_iter( @@ -33,6 +35,8 @@ impl BlocksOfInterest { grass.push(pos); } else if block.kind() == BlockKind::Ember { embers.push(pos); + } else if block.kind() == BlockKind::Beehive { + beehives.push(pos); } }); @@ -40,6 +44,7 @@ impl BlocksOfInterest { leaves, grass, embers, + beehives, } } } diff --git a/world/src/block/mod.rs b/world/src/block/mod.rs index fe668ff040..a63db55b01 100644 --- a/world/src/block/mod.rs +++ b/world/src/block/mod.rs @@ -574,10 +574,12 @@ pub fn block_from_structure( // None of these BlockKinds has an orientation, so we just use zero for the other color // bits. StructureBlock::Liana => Some(Block::new(BlockKind::Liana, Rgb::zero())), - StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 3 > 0 { - Block::empty() - } else { + StructureBlock::Fruit => Some(if field.get(pos + structure_pos) % 24 == 0 { + Block::new(BlockKind::Beehive, Rgb::zero()) + } else if field.get(pos + structure_pos + 1) % 3 == 0 { Block::new(BlockKind::Apple, Rgb::zero()) + } else { + Block::empty() }), StructureBlock::Coconut => Some(if field.get(pos + structure_pos) % 3 > 0 { Block::empty()