Skip to main content

yog_event/item/
actions.rs

1//! Items and item stacks: the host's actions.
2
3use crate::Point;
4use yog_core::Stack;
5use yog_ids as ids;
6
7actions! {
8    /// Drops a stack into the world; the item entity's uuid.
9    SpawnItem { dim: String, pos: Point, velocity: Point, item: String, count: u32, snbt: String } -> Option<String> = ids::service_item::SPAWN, "YogItemActions.spawnItem";
10    /// An item entity's stack.
11    EntityStack { uuid: String } -> Option<Stack> = ids::service_item::ENTITY_STACK, "YogQueries.itemEntityStack";
12    /// Sets an item entity's stack.
13    SetEntityStack { uuid: String, item: String, count: u32, snbt: String } -> bool = ids::service_item::SET_ENTITY_STACK, "YogItemActions.itemEntitySetStack";
14    /// The block `item` places, if any.
15    Block { item: String } -> Option<String> = ids::service_item::BLOCK, "YogItemActions.itemBlock";
16}