1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Blackstone json
## The rough implementations
```ts
type PlayerLeftClickEvent {
get clickBlockLocation {
$(
"slot": 1,
"item": {
"id": "g_val",
"data": {
"target": "Default",
"type": "Event Block Location"
}
}
)$
}
}
type Player {
function sendMessage(thing: any) {
$(
...
)$
}
}
```
## Blackstone source code
```ts
plot.playerEvent.leftClick(e: PlayerLeftClickEvent) {
e.player.sendMessage(e.clickBlockLocation)
}
```
## JSON
```json
{
"id": "block",
"block": "event",
"args": {
"items": []
},
"action": "LeftClick"
},
{
"id": "block",
"block": "player_action",
"args": {
"items": [
{
"slot": 26,
"item": {
"id": "bl_tag",
"data": {
"action": "SendMessage",
"block": "player_action",
"option": "Regular",
"tag": "Alignment Mode"
}
}
},
{
"slot": 25,
"item": {
"id": "bl_tag",
"data": {
"action": "SendMessage",
"block": "player_action",
"option": "Add spaces",
"tag": "Text Value Merging"
}
}
},
{
"slot": 0,
"item": {
"id": "txt",
"data": {
"name": "Block Location: "
}
}
},
{
"slot": 1,
"item": {
"id": "g_val",
"data": {
"target": "Default",
"type": "Event Block Location"
}
}
}
]
},
"action": "SendMessage",
"target": "Default"
}
```
https://dfonline.dev/edit/?template=gbynccsnpkn753zj2x4dz