Skip to main content

KeysHost

Trait KeysHost 

pub trait KeysHost {
    // Provided methods
    fn block_keys(&self) -> Vec<BlockKey> { ... }
    fn item_keys(&self) -> Vec<ItemKey> { ... }
    fn entity_type_keys(&self) -> Vec<EntityTypeKey> { ... }
    fn menu_keys(&self) -> Vec<MenuKey> { ... }
    fn enchantment_keys(&self) -> Vec<EnchantmentKey> { ... }
}
Expand description

The host’s registry-wide key reads of the keys area, implemented by the game and reached through Host.

Provided Methods§

fn block_keys(&self) -> Vec<BlockKey>

Side: both. Every block key in the registry’s registration order: vanilla’s first, then mod blocks in the order they registered. A block registry lists a name once per state; this yields it once. Empty before the block table completes.

fn item_keys(&self) -> Vec<ItemKey>

Side: both. Every item key in the registry’s registration order: vanilla’s first, then mod items in the order they registered. Empty before the item table completes.

fn entity_type_keys(&self) -> Vec<EntityTypeKey>

Side: both. Every built-in entity-type key in registry order (BuiltInRegistries.ENTITY_TYPE order): vanilla’s first, then mod types in the order they registered.

fn menu_keys(&self) -> Vec<MenuKey>

Side: both. Every built-in menu-type key in registry order (BuiltInRegistries.MENU order): vanilla’s first, then mod types in the order they registered.

fn enchantment_keys(&self) -> Vec<EnchantmentKey>

Side: both. Every enchantment key in global sorted loaded-registry order, including vanilla and mod data-pack entries together (RegistryDataLoader sorts by id).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§