mod registry;
pub use registry::{CServer, Mod, Registry};
pub use yog_gfx::{GfxContext, core as gfx_core, gl as gfx_gl, draw2d as gfx_draw2d};
pub use yog_abi::{ABI_VERSION, YogApi};
#[doc(hidden)]
pub use std::os::raw::c_void as __c_void;
#[macro_export]
macro_rules! export_mod {
($mod_ty:ty) => {
#[no_mangle]
pub extern "C" fn yog_abi_version() -> u32 {
$crate::ABI_VERSION
}
#[no_mangle]
pub unsafe extern "C" fn yog_mod_register(
api: *const $crate::YogApi,
_ctx: *mut $crate::__c_void,
) {
let outcome = ::std::panic::catch_unwind(::std::panic::AssertUnwindSafe(|| {
let mut registry = unsafe { $crate::Registry::from_raw(api) };
<$mod_ty as $crate::Mod>::register(&mut registry);
}));
if outcome.is_err() {
$crate::error!("mod {} panicked during register", ::core::stringify!($mod_ty));
}
}
};
}
pub use yog_command::CommandContext;
pub use yog_core::{BlockPos, Server};
pub use yog_event::{
AdvancementEvent, AttackEntityEvent, BlockBreakEvent, ChatEvent, ClientTickEvent,
ContainerCloseEvent, ContainerOpenEvent, CraftEvent, EntityDamageEvent, EntityDeathEvent,
EntityInteractEvent, EntitySpawnEvent, EventPhase, ExplosionEvent,
ItemPickupEvent, KeyPressEvent, PlaceBlockEvent, PlayerDeathEvent, PlayerJoinEvent,
PlayerLeaveEvent, PlayerMoveEvent, PlayerRespawnEvent, ProjectileHitEvent, ScreenEvent,
UseBlockEvent, UseItemEvent,
};
pub use yog_entity::Entity;
pub use yog_network::{Packet, PacketEvent, PacketField};
#[doc(inline)]
pub use yog_network::packet;
pub use yog_player::Player;
pub use yog_registry::{BlockDef, FoodDef, FurnaceRecipe, ItemDef, ShapedRecipe, ShapelessRecipe, BookRecipe, ItemModifier, AdvancementReward};
pub use yog_config::Config;
pub use yog_storage::{Storage, StorageScope, Value};
pub use yog_world::World;
pub use yog_book::{Book, BookCategory, BookEntry, BookPage, BookMacro, BookRegistry};
pub use yog_book::{text_page, spotlight_page, crafting_page, smelting_page, image_page, entity_page, relations_page, pattern_page};
pub use yog_logging::{error, info, warn};
pub mod core {
pub use yog_core::*;
}
pub mod event {
pub use yog_event::*;
}
pub mod world {
pub use yog_world::*;
}
pub mod entity {
pub use yog_entity::*;
}
pub mod player {
pub use yog_player::*;
}
pub mod content {
pub use yog_registry::*;
}
pub mod network {
pub use yog_network::*;
}
pub mod command {
pub use yog_command::*;
}
pub mod storage {
pub use yog_storage::*;
}
pub mod config {
pub use yog_config::*;
}
pub mod book {
pub use yog_book::*;
}