classicube_helpers\events/
user.rs

1use classicube_sys::{BlockID, IVec3};
2
3use crate::make_event_handler;
4
5make_event_handler!(
6    /// User changes a block
7    User,
8    BlockChanged,
9    Block,
10    (
11        {
12            name: coords,
13            rust_type: IVec3,
14            c_type: IVec3,
15            to_rust: |a| a,
16        },
17        {
18            name: old_block,
19            rust_type: BlockID,
20            c_type: BlockID,
21            to_rust: |a| a,
22        },
23        {
24            name: block,
25            rust_type: BlockID,
26            c_type: BlockID,
27            to_rust: |a| a,
28        },
29    )
30);
31
32make_event_handler!(
33    /// Hack permissions of the player changes
34    User,
35    HackPermsChanged,
36    Void,
37    ()
38);
39
40make_event_handler!(
41    /// Held block in hotbar changes
42    User,
43    HeldBlockChanged,
44    Void,
45    ()
46);
47
48make_event_handler!(
49    /// Hack states changed (e.g. stops flying)
50    User,
51    HacksStateChanged,
52    Void,
53    ()
54);