alex/beta-minecraft-rust
Minecraft Beta 1.7.3 Rewrite
BRANCH main
SNAPSHOT Draw terrain GPU-driven from packed per-section buffers with GPU occlusion culling, add a render distance slider (2-128) with a quad/disk shape, cut chunk bookkeeping at high render distances, and fix a light underflow at y=0
DOWNLOAD
root crates server src entity vehicles mod.rs
mod boat;
mod cart;
pub use boat::Boat;
pub use cart::Cart;
use common::entity::Entity;
use common::protocol::Packet;
use crate::level::Level;
impl Level {
/// Drops the rider of a broken vehicle.
fn eject_rider(&mut self, entity: &mut Entity) {
if let Some(id) = entity.rider.take()
&& let Some(rider) = self.entities.get_mut(id)
{
rider.entity.riding = None;
self.events.push(Packet::AttachEntity {
entity: id,
vehicle: -1,
});
}
}
}