Struct ProfessionDefinition
pub struct ProfessionDefinition {
pub key: ProfessionKey,
pub workstations: Vec<ProfessionWorkstation>,
pub held_poi: Vec<PoiKey>,
pub acquirable_poi: Vec<PoiKey>,
pub requested_items: Vec<Identifier>,
pub secondary_blocks: Vec<Identifier>,
pub work_sound: Option<Identifier>,
pub trades: Vec<(u8, TradeSetKey)>,
}Expand description
Declarative profession metadata, collected once for the owning mod load. References resolve together before any candidate table becomes active.
Fields§
§key: ProfessionKeyPersistent qualified identity; the minecraft namespace is reserved.
workstations: Vec<ProfessionWorkstation>Custom POI block-state selectors owned by this profession.
held_poi: Vec<PoiKey>POIs at which an existing job remains valid.
acquirable_poi: Vec<PoiKey>POIs from which an unemployed villager may acquire this job.
requested_items: Vec<Identifier>Items requested by this profession; this grants no farmer AI.
secondary_blocks: Vec<Identifier>Secondary work-site blocks.
work_sound: Option<Identifier>Optional work sound.
trades: Vec<(u8, TradeSetKey)>Explicit level (1–5) to trade-set mappings; omitted levels add no offers.
Trait Implementations§
§impl Clone for ProfessionDefinition
impl Clone for ProfessionDefinition
§fn clone(&self) -> ProfessionDefinition
fn clone(&self) -> ProfessionDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ProfessionDefinition
impl Debug for ProfessionDefinition
impl Eq for ProfessionDefinition
§impl PartialEq for ProfessionDefinition
impl PartialEq for ProfessionDefinition
impl StructuralPartialEq for ProfessionDefinition
Auto Trait Implementations§
impl Freeze for ProfessionDefinition
impl RefUnwindSafe for ProfessionDefinition
impl Send for ProfessionDefinition
impl Sync for ProfessionDefinition
impl Unpin for ProfessionDefinition
impl UnsafeUnpin for ProfessionDefinition
impl UnwindSafe for ProfessionDefinition
Blanket Implementations§
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
Mutably borrows from an owned value. Read more