Date: 2019/12/16 13:17:48 UTC-08:00
Type: Denizen Script
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
MirrorCommand:
type: command
debug: false
name: mirror
description: Mirror Blocks
usage: /mirror (full|half|cancel)
permission: icecapade.mirror
permission message: <&3>You need the permission <permission> to use that command!
tab complete:
- if <context.args.size> <= 0:
- determine <list[half|full|cancel]>
- if <context.args.size> == 1 && "!<context.raw_args.ends_with[ ]>":
- determine <list[half|full|cancel].filter[starts_with[<context.args.first>]]>
script:
- choose <context.args.first||disable>:
- case full:
- flag player mirrorall
- flag player mirroring
- narrate "<&3>[Mirror]Left click a block to select a center"
- case half:
- flag player mirror
- flag player mirroring
- narrate "<&3>[Mirror]Left click a block to select a center"
- case cancel:
- flag player mirror:!
- flag player mirroring:!
- flag player mirrorall:!
- if <server.list_notables[locations].parse[notable_name].contains[<player.uuid>_mirror_point]>:
- note remove as:<player.uuid>_mirror_point
- narrate "<&3>[Mirror] Mirror disabled"
MirrorWorld:
type: world
debug: false
events:
on player left clicks block flagged:mirroring:
- note <location[<context.location>]> as:<player.uuid>_mirror_point
- flag player mirroring:!
- narrate "<&3>[Mirror] Center has been set! You can place blocks now! :)"
- narrate "<&3>[Mirror] Cancel mirroring with /mirror or /mirror cancel"
on player breaks block flagged:mirroring:
- determine cancelled
on player places block flagged:mirror:
- define loc:<location[<player.uuid>_mirror_point]>
- define maths:<location[<[loc].x>,<context.location.y>,<[loc].z>,<player.location.world>].add[<[loc].x.sub[<context.location.x>]>,0,<[loc].z.sub[<context.location.z>]>]>
- modifyblock <[maths]> <context.material>
on player breaks block flagged:mirror:
- define loc:<location[<player.uuid>_mirror_point]>
- define maths:<location[<[loc].x>,<context.location.y>,<[loc].z>,<player.location.world>].add[<[loc].x.sub[<context.location.x>]>,0,<[loc].z.sub[<context.location.z>]>]>
- modifyblock <[maths]> air
on player places block flagged:mirrorall:
- define loc:<location[<player.uuid>_mirror_point]>
- define maths:<location[<[loc].x>,<context.location.y>,<[loc].z>,<player.location.world>].add[<[loc].x.sub[<context.location.x>]>,0,<[loc].z.sub[<context.location.z>]>]>
- modifyblock <[maths]> <context.material>
- define mathsone:<location[<[loc].x>,<context.location.y>,<[loc].z>,<player.location.world>].add[<[loc].z.sub[<context.location.z>]>,0,<context.location.x.sub[<[loc].x>]>]>
- modifyblock <[mathsone]> <context.material>
- define mathstwo:<location[<[loc].x>,<context.location.y>,<[loc].z>,<player.location.world>].add[<context.location.z.sub[<[loc].z>]>,0,<[loc].x.sub[<context.location.x>]>]>
- modifyblock <[mathstwo]> <context.material>
on player breaks block flagged:mirrorall:
- define loc:<location[<player.uuid>_mirror_point]>
- define maths:<location[<[loc].x>,<context.location.y>,<[loc].z>,<player.location.world>].add[<[loc].x.sub[<context.location.x>]>,0,<[loc].z.sub[<context.location.z>]>]>
- modifyblock <[maths]> air
- define mathsone:<location[<[loc].x>,<context.location.y>,<[loc].z>,<player.location.world>].add[<[loc].z.sub[<context.location.z>]>,0,<context.location.x.sub[<[loc].x>]>]>
- modifyblock <[mathsone]> air
- define mathstwo:<location[<[loc].x>,<context.location.y>,<[loc].z>,<player.location.world>].add[<context.location.z.sub[<[loc].z>]>,0,<[loc].x.sub[<context.location.x>]>]>
- modifyblock <[mathstwo]> air