mod blocks;
mod boat;
mod body;
mod collide;
pub mod drop;
mod entity;
mod ext;
mod fluid;
pub mod launch;
mod minecart;
mod mount;
mod piston;
mod piston_shapes;
mod piston_updates;
mod player;
pub mod projectile;
pub use crate::nonliving::Side;
pub use blocks::{CollisionContext, state_collides};
pub use boat::{
BOAT_HEIGHT, BOAT_WIDTH, Boat, BoatLocation, BoatSeat, boat_item_fits, boat_push_from_player,
tick_boat,
};
pub use entity::{
OtherEntity, PushKind, Pusher, Surroundings, climbing_at, collides, hits_pushable, push_by,
push_by_with, push_kind, pushable, query_reaches, step_height,
};
pub use ext::PlayerExt;
pub use ghast_data::v1_16_5::BlockState;
pub use minecart::{MINECART_HEIGHT, MINECART_WIDTH, Minecart, tick_minecart};
pub use mount::{HorseView, Mount, MountKind, tick_mount, tick_watched};
pub use piston::{
Edits, Facing, MovingBlock, PistonCarry, PistonEntity, Pistons, PlayerPlace, search_finds,
tick_player_among_pistons, tick_with_pistons,
};
#[allow(deprecated)]
pub use piston::{edits_need_shape_updates, follows_neighbours};
pub use player::{
Effects, Enchantments, MovementInput, PlayerState, Pose, STEP_HEIGHT, SentState,
SpeedModifiers, WIDTH, box_at, in_water_or_rain, is_climbing, riptide, rocket_boost, tick,
tick_ext, tick_in,
};
use crate::input::{Packets, TickInput};
use crate::world::BlockView;
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct V1_16_5;
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct Options {}
impl crate::Ruleset for V1_16_5 {
type BlockState = BlockState;
type Player = PlayerState;
type Options = Options;
#[inline]
fn tick_with<W: BlockView<State = BlockState>>(
player: &mut PlayerState,
input: &TickInput,
world: &W,
_options: &Options,
out: &mut Packets,
) {
tick(player, input, world, out);
}
}
pub type MemoryWorld = crate::MemoryWorld<BlockState>;
#[must_use]
pub fn memory_world() -> MemoryWorld {
crate::MemoryWorld::new(|raw| BlockState::from_id(raw).unwrap_or(BlockState::AIR))
}
#[cfg(test)]
mod tests;