#[repr(C)]pub struct YogApi {Show 72 fields
pub abi_version: u32,
pub size: u32,
pub ctx: *mut c_void,
pub server: *const YogServer,
pub on_block_break: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogBlockBreakEvent, u8) -> bool),
pub on_chat: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogChatEvent, u8) -> bool),
pub on_player_join: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerEvent, u8) -> bool),
pub on_player_leave: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerEvent, u8) -> bool),
pub on_use_item: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogUseItemEvent, u8) -> bool),
pub on_use_block: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogUseBlockEvent, u8) -> bool),
pub on_attack_entity: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogAttackEntityEvent, u8) -> bool),
pub on_entity_damage: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogEntityDamageEvent, u8) -> bool),
pub on_entity_death: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogEntityDeathEvent, u8) -> bool),
pub on_entity_spawn: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogEntitySpawnEvent, u8) -> bool),
pub on_player_place_block: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlaceBlockEvent, u8) -> bool),
pub on_player_death: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerDeathEvent, u8) -> bool),
pub on_player_respawn: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerRespawnEvent, u8) -> bool),
pub on_advancement: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogAdvancementEvent, u8) -> bool),
pub on_entity_interact: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogEntityInteractEvent, u8) -> bool),
pub on_item_craft: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogCraftEvent, u8) -> bool),
pub on_explosion: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogExplosionEvent, u8) -> bool),
pub on_item_pickup: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogItemPickupEvent, u8) -> bool),
pub on_item_insert: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogItemInsertEvent, u8) -> bool),
pub on_player_move: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerMoveEvent, u8) -> bool),
pub on_container_open: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogContainerOpenEvent, u8) -> bool),
pub on_container_close: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogContainerCloseEvent, u8) -> bool),
pub on_projectile_hit: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogProjectileHitEvent, u8) -> bool),
pub on_server_tick: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer)),
pub on_server_started: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer)),
pub on_server_stopping: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer)),
pub on_packet: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPacketEvent)),
pub on_client_packet: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPacketEvent)),
pub register_command: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogCommandEvent, *mut u8, u32, *mut u32)),
pub register_typed_command: unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogCommandEvent, *mut u8, u32, *mut u32)),
pub register_content: unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *const u8, usize),
pub schedule_once: unsafe extern "C" fn(*mut c_void, u64, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer)),
pub schedule_repeating: unsafe extern "C" fn(*mut c_void, u64, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer)),
pub on_client_tick: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void)),
pub on_hud_render: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogGfxApi)),
pub on_key_press: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogKeyPressEvent) -> bool),
pub on_screen_open: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr) -> bool),
pub on_screen_close: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr) -> bool),
pub on_world_render: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogGfxApi)),
pub register_ui: unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr, YogStr)),
pub on_ui_render: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogGfxApi)),
pub register_menu_entry: unsafe extern "C" fn(*mut c_void, YogStr, YogStr),
pub mods_list: unsafe extern "C" fn(*mut c_void) -> YogOwnedStr,
pub free_str: unsafe extern "C" fn(*mut u8, u32),
pub ui_open: unsafe extern "C" fn(*mut c_void, YogStr, bool, bool),
pub interop_export: unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *const c_void),
pub interop_import: unsafe extern "C" fn(*mut c_void, YogStr, YogStr) -> *const c_void,
pub register_chunk_generator: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogChunkWriterApi)),
pub ui_close: unsafe extern "C" fn(*mut c_void, YogStr),
pub ui_consume_event: unsafe extern "C" fn(*mut c_void),
pub translate: unsafe extern "C" fn(*mut c_void, YogStr) -> YogOwnedStr,
pub ui_open_flags: unsafe extern "C" fn(*mut c_void, YogStr, u32),
pub client_play_sound: unsafe extern "C" fn(*mut c_void, YogStr, f32, f32, bool) -> u32,
pub client_stop_sound: unsafe extern "C" fn(*mut c_void, u32),
pub client_held_item: unsafe extern "C" fn(*mut c_void, bool) -> YogOwnedStr,
pub client_set_block_tint: unsafe extern "C" fn(*mut c_void, YogStr, YogBlockPos, i64),
pub client_key_down: unsafe extern "C" fn(*mut c_void, i32) -> bool,
pub on_book_page: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogGfxApi, *const u8, usize, f32, f32, f32, f32)),
pub on_item_tooltip: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *mut f32, *mut f32) -> bool, unsafe extern "C" fn(*mut c_void, *const YogGfxApi, YogStr, YogStr, f32, f32, f32, f32)),
pub is_mod_loaded: unsafe extern "C" fn(*mut c_void, YogStr) -> bool,
pub java_call: unsafe extern "C" fn(*mut c_void, YogStr, YogStr) -> YogOwnedStr,
pub on_item_text: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr)) -> bool),
pub on_machine_craft: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogMachineCraftEvent, u8) -> bool),
pub client_body_track: unsafe extern "C" fn(*mut c_void, YogStr, bool),
pub client_body_track_type: unsafe extern "C" fn(*mut c_void, YogStr, bool),
pub on_body: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const u8, usize, *mut c_void, unsafe extern "C" fn(*mut c_void, *const u8, usize))),
pub on_camera: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogCameraFrame, *mut YogCameraOut)),
pub on_travel: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogTravelFrame, *mut [f32; 3]) -> bool),
}Expand description
Stable C ABI — re-exported so mods don’t need a direct yog-abi dependency.
Passed to yog_mod_register. Call the function pointers here to register
handlers, commands, content, and schedulers.
When mods compiled against ABI N load on a runtime with ABI M > N:
fields beyond size are not present in the mod’s view — check size before
accessing fields added in later minor versions.
Fields§
§abi_version: u32§size: u32sizeof(YogApi) at the runtime’s build time.
ctx: *mut c_voidOpaque pointer to runtime handler storage.
server: *const YogServerStable server action table — pass to handlers.
on_block_break: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogBlockBreakEvent, u8) -> bool)§on_chat: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogChatEvent, u8) -> bool)§on_player_join: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerEvent, u8) -> bool)§on_player_leave: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerEvent, u8) -> bool)§on_use_item: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogUseItemEvent, u8) -> bool)§on_use_block: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogUseBlockEvent, u8) -> bool)§on_attack_entity: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogAttackEntityEvent, u8) -> bool)§on_entity_damage: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogEntityDamageEvent, u8) -> bool)§on_entity_death: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogEntityDeathEvent, u8) -> bool)§on_entity_spawn: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogEntitySpawnEvent, u8) -> bool)§on_player_place_block: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlaceBlockEvent, u8) -> bool)§on_player_death: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerDeathEvent, u8) -> bool)§on_player_respawn: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerRespawnEvent, u8) -> bool)§on_advancement: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogAdvancementEvent, u8) -> bool)§on_entity_interact: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogEntityInteractEvent, u8) -> bool)§on_item_craft: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogCraftEvent, u8) -> bool)§on_explosion: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogExplosionEvent, u8) -> bool)§on_item_pickup: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogItemPickupEvent, u8) -> bool)§on_item_insert: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogItemInsertEvent, u8) -> bool)§on_player_move: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPlayerMoveEvent, u8) -> bool)§on_container_open: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogContainerOpenEvent, u8) -> bool)§on_container_close: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogContainerCloseEvent, u8) -> bool)§on_projectile_hit: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogProjectileHitEvent, u8) -> bool)§on_server_tick: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer))§on_server_started: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer))§on_server_stopping: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer))§on_packet: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPacketEvent))§on_client_packet: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogPacketEvent))§register_command: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogCommandEvent, *mut u8, u32, *mut u32))§register_typed_command: unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogCommandEvent, *mut u8, u32, *mut u32))§register_content: unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *const u8, usize)Register content of kind (item, block, inventory, recipe,
book, dimension, startup_grant) named id: its definition as
a Yog Data blob (yog_data::binary, len bytes at data), the
shape of yog_registry’s / yog_inventory’s definitions, a recipe
in Yog’s format, a book, a dimension. One call for every kind of
content — new kinds need no new ABI.
schedule_once: unsafe extern "C" fn(*mut c_void, u64, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer))§schedule_repeating: unsafe extern "C" fn(*mut c_void, u64, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer))§on_client_tick: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void))§on_hud_render: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogGfxApi))§on_key_press: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogKeyPressEvent) -> bool)§on_screen_open: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr) -> bool)§on_screen_close: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr) -> bool)§on_world_render: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogGfxApi))Register a handler that fires after world geometry is rendered.
gfx.view_proj and gfx.camera_pos are filled; use them to project
custom 3D geometry into clip space.
register_ui: unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr, YogStr))Register a UI tree. ui_id is the unique identifier (e.g. “mymod:menu”).
layout_json is the serialized layout tree.
handler is called when an interactive element is clicked/keyed.
on_ui_render: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogGfxApi))Register a render callback that fires during YogUIScreen.render() for a
specific UI id — i.e. AFTER the screen darkening, unlike on_hud_render.
Reuses YogHudRenderFn (fn(ud, gfx)); gfx.screen_w/h are set.
Clicks are forwarded as "click:X:Y" events to the register_ui handler
so mods can do their own hit-testing with their stored layout.
Register a button/link that the host renders on vanilla screens
(TitleScreen on Fabric, ModListScreen on Forge/NeoForge).
label is the human-readable button text (e.g. “Yog Mods”).
ui_id is the Yog UI to open when clicked (e.g. “example:menu”).
mods_list: unsafe extern "C" fn(*mut c_void) -> YogOwnedStrAll installed mods as TSV, one per line:
source \t id \t name \t version \t authors \t description
where source is yog (a .yog mod) or platform (a loader mod, e.g.
a Fabric/Forge jar). Tabs and newlines inside fields become spaces.
Callable at any time after registration (also client-side).
free_str: unsafe extern "C" fn(*mut u8, u32)Free a YogOwnedStr returned by an api-table call (same allocator as
YogServer::free_str).
ui_open: unsafe extern "C" fn(*mut c_void, YogStr, bool, bool)Open the Yog UI registered as ui_id on the client (schedules onto the
render thread). Client-side only; a no-op on dedicated servers.
modal blocks game input; pause pauses a singleplayer game.
interop_export: unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *const c_void)Export a function pointer under symbol for the calling mod (mod_id).
Other mods can import it via interop_import.
interop_import: unsafe extern "C" fn(*mut c_void, YogStr, YogStr) -> *const c_voidImport a function pointer exported by mod_id under symbol.
Returns null if the symbol is not (yet) registered.
register_chunk_generator: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogChunkWriterApi))Register a chunk generator for a previously-declared dimension id.
handler is called once per chunk column that needs generating —
see YogChunkWriterApi/YogChunkGeneratorFn.
ui_close: unsafe extern "C" fn(*mut c_void, YogStr)Close the Yog UI screen showing ui_id (empty = whichever Yog UI
screen is open). Scheduled onto the render thread, so it’s safe to
call from that screen’s own event handler. Client-side only.
ui_consume_event: unsafe extern "C" fn(*mut c_void)Called from inside a register_ui handler while it handles a key:
or char: event: the mod used the key, so the host skips its default
handling (Esc closing the screen, Tab focus navigation, …).
translate: unsafe extern "C" fn(*mut c_void, YogStr) -> YogOwnedStrThe text of translation key key (e.g. mymod.screen.title) in the
game’s current language, from the loaded lang files — resource packs
and .yog mods’ assets/<ns>/lang/*.json (compiled from .yres).
YogOwnedStr::NONE when no language defines the key. Format
specifiers (%s, %1$s) come back as-is. Free with free_str.
Client-side; a dedicated server only knows en_us.
ui_open_flags: unsafe extern "C" fn(*mut c_void, YogStr, u32)Like ui_open, with ui_flags bits: MODAL, PAUSE,
NO_BACKGROUND (no dimmed/blurred world behind the screen).
Client-side only.
client_play_sound: unsafe extern "C" fn(*mut c_void, YogStr, f32, f32, bool) -> u32Play sound event sound_id for the local player only: at the
player’s position, or (looping) as a loop that follows the player
until client_stop_sound. Returns a handle (0 = failed).
client_stop_sound: unsafe extern "C" fn(*mut c_void, u32)Stop a sound started by client_play_sound (0 or unknown: no-op).
client_held_item: unsafe extern "C" fn(*mut c_void, bool) -> YogOwnedStrItem id in the local player’s main hand (off_hand false) or off
hand, YogOwnedStr::NONE for air or no player. Free with free_str.
client_set_block_tint: unsafe extern "C" fn(*mut c_void, YogStr, YogBlockPos, i64)Tints the block at pos in dim on this client (its faces with a
tint index), color 0xRRGGBB; -1 clears it.
client_key_down: unsafe extern "C" fn(*mut c_void, i32) -> boolWhether GLFW key key is held down right now (client window).
on_book_page: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogGfxApi, *const u8, usize, f32, f32, f32, f32))Draw the pictures of book pages of type drawn whose drawer is
drawer (hexcasting:pattern) — see YogPageDrawFn.
on_item_tooltip: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *mut f32, *mut f32) -> bool, unsafe extern "C" fn(*mut c_void, *const YogGfxApi, YogStr, YogStr, f32, f32, f32, f32))A picture under the tooltip of item item (Hex Casting’s scrolls
show their pattern): size says whether a stack gets one and how
big, draw draws it — see YogTooltipSizeFn, YogTooltipDrawFn.
is_mod_loaded: unsafe extern "C" fn(*mut c_void, YogStr) -> boolWhether mod id is loaded — a Yog mod or a Java one (Fabric’s,
Forge’s or NeoForge’s mod list).
java_call: unsafe extern "C" fn(*mut c_void, YogStr, YogStr) -> YogOwnedStrCalls into a Java mod’s API by reflection: expr is a chain from a
class — virtuoel.pehkui.api.ScaleTypes.BASE.getScaleData($0).getScale()
— $n the n-th of args, a list in Yog Data text (an entity is
@entity:<uuid>). The result in Yog Data text, or
YogOwnedStr::NONE when the call failed (said in the log).
Free with free_str.
on_item_text: unsafe extern "C" fn(*mut c_void, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr, YogStr, *mut c_void, unsafe extern "C" fn(*mut c_void, YogStr)) -> bool)The name and tooltip lines of stacks of item from its custom data
(a written blueprint shows its design) — see YogItemTextFn.
on_machine_craft: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogServer, *const YogMachineCraftEvent, u8) -> bool)A machine making a recipe — see YogMachineCraftEvent.
client_body_track: unsafe extern "C" fn(*mut c_void, YogStr, bool)Asks the mods about entity uuid’s body each frame (on) or not.
client_body_track_type: unsafe extern "C" fn(*mut c_void, YogStr, bool)The same for every entity of type entity_type.
on_body: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const u8, usize, *mut c_void, unsafe extern "C" fn(*mut c_void, *const u8, usize)))The body of a tracked entity, each frame — see YogBodyFn.
on_camera: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogCameraFrame, *mut YogCameraOut))The camera, each frame — see YogCameraFn.
on_travel: unsafe extern "C" fn(*mut c_void, *mut c_void, unsafe extern "C" fn(*mut c_void, *const YogTravelFrame, *mut [f32; 3]) -> bool)The local player’s travel step, each tick — see YogTravelFn.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for YogApi
impl RefUnwindSafe for YogApi
impl Unpin for YogApi
impl UnsafeUnpin for YogApi
impl UnwindSafe for YogApi
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.