use ghast_data::v26_1::{BlockData, StatePhys, VoxelShapeRef};
pub trait Rules: 'static {
type State: Copy + PartialEq;
const PROTOCOL: i32;
const AIR: Self::State;
fn phys(s: Self::State) -> StatePhys;
fn block(s: Self::State) -> &'static BlockData;
fn voxel(i: u16) -> &'static VoxelShapeRef;
const FULL_CUBE_VOXEL: u16;
const SCAFFOLDING_BOTTOM_VOXEL: u16;
const POWDER_SNOW_FALLING_VOXEL: u16;
const POSITION_THRESHOLD_SQ: f64;
const POSITION_REMINDER: i32;
const HORIZONTAL_CUTOFF_SQ: f64;
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub struct V26_1;
impl Rules for V26_1 {
type State = ghast_data::v26_1::BlockState;
const PROTOCOL: i32 = 775;
const AIR: Self::State = ghast_data::v26_1::BlockState::AIR;
#[inline]
fn phys(s: Self::State) -> StatePhys {
s.phys()
}
#[inline]
fn block(s: Self::State) -> &'static BlockData {
s.block().data()
}
#[inline]
fn voxel(i: u16) -> &'static VoxelShapeRef {
&ghast_data::v26_1::voxel_shapes()[usize::from(i)]
}
const FULL_CUBE_VOXEL: u16 = ghast_data::v26_1::FULL_CUBE_VOXEL;
const SCAFFOLDING_BOTTOM_VOXEL: u16 = ghast_data::v26_1::SCAFFOLDING_BOTTOM_VOXEL;
const POWDER_SNOW_FALLING_VOXEL: u16 = ghast_data::v26_1::POWDER_SNOW_FALLING_VOXEL;
const POSITION_THRESHOLD_SQ: f64 = 2.0e-4 * 2.0e-4;
const POSITION_REMINDER: i32 = 20;
const HORIZONTAL_CUTOFF_SQ: f64 = 9.0e-6;
}