yog-event 0.8.0

Yog event system — pub/sub for game/server events.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Items and item stacks: the host's actions.

use crate::Point;
use yog_core::Stack;
use yog_ids as ids;

actions! {
    /// Drops a stack into the world; the item entity's uuid.
    SpawnItem { dim: String, pos: Point, velocity: Point, item: String, count: u32, snbt: String } -> Option<String> = ids::service_item::SPAWN, "YogItemActions.spawnItem";
    /// An item entity's stack.
    EntityStack { uuid: String } -> Option<Stack> = ids::service_item::ENTITY_STACK, "YogQueries.itemEntityStack";
    /// Sets an item entity's stack.
    SetEntityStack { uuid: String, item: String, count: u32, snbt: String } -> bool = ids::service_item::SET_ENTITY_STACK, "YogItemActions.itemEntitySetStack";
    /// The block `item` places, if any.
    Block { item: String } -> Option<String> = ids::service_item::BLOCK, "YogItemActions.itemBlock";
}