Struct PackRegistration
#[non_exhaustive]pub struct PackRegistration {
pub location: Identifier,
pub pack_type: PackType,
pub title: Text,
pub source: PackSource,
pub always_active: bool,
pub position: PackPosition,
}Expand description
A pack bundled with a mod. location names the mod and a directory beneath
its package root, e.g. example:assets/example/resourcepacks/high_contrast. That directory must
contain pack.mcmeta. Packages may be folders or archives; discovery and
reload read the same logical directory without extracting it.
The repository id is mod/<location>. Optional packs remain unselected until
the player selects them. Always-active packs cannot be disabled; position
determines their default priority (later resource layers win).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.location: IdentifierMod id and logical directory beneath that mod’s package root.
pack_type: PackTypeThe kind of repository this pack contributes to.
title: TextThe pack screen’s title; use a translated component for visible text.
source: PackSourceThe pack’s source label and experiment classification.
always_active: boolRequire this pack in every selection, preventing it from being disabled.
position: PackPositionThe default insertion position of an always-active pack.
Implementations§
§impl PackRegistration
impl PackRegistration
pub fn new(
location: Identifier,
pack_type: PackType,
title: Text,
) -> PackRegistration
pub fn new( location: Identifier, pack_type: PackType, title: Text, ) -> PackRegistration
An optional built-in pack, offered at the top of the selection.
Trait Implementations§
§impl Clone for PackRegistration
impl Clone for PackRegistration
§fn clone(&self) -> PackRegistration
fn clone(&self) -> PackRegistration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more