Skip to main content

TicketsRegistrar

Trait TicketsRegistrar 

pub trait TicketsRegistrar {
    // Required method
    fn register_ticket_controller(
        &mut self,
        name: &str,
        validates: bool,
    ) -> TicketController;
}
Expand description

Registrar operations for tickets.

Required Methods§

fn register_ticket_controller( &mut self, name: &str, validates: bool, ) -> TicketController

Register ticket controller name, the way NeoForge’s RegisterTicketControllersEvent does once at startup, and keep the handle for chunk.set_mod_forced. name is quarry or mymod:quarry; the controller’s id is in a namespace owned by the calling mod’s manifest (mymod:quarry), and an unowned namespace refuses the mods at startup, as does an id registered twice. validates is whether it validates its saved tickets: the validate_tickets hook then runs for it when a level loads them (NeoForge’s LoadingValidationCallback). A world’s tickets of a controller no loaded mod registers are dropped when it loads.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§