-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJetPack.dsc
58 lines (53 loc) · 1.44 KB
/
JetPack.dsc
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
jetpack_config:
type: data
debug: false
speed_multiplier: 2
jetpack_item:
type: item
debug: false
material: elytra
display name: <gray><bold>JetPack
lore:
- <white>Fly high and don't die!
mechanisms:
unbreakable: true
jetpack_handler:
type: world
debug: false
events:
after player starts gliding:
- inject jetpack_check
- run jetpack_activate
after player starts sneaking:
- inject jetpack_check
- stop if:!<player.gliding>
- if <player.has_flag[jetpack_activaited]>:
- flag <player> jetpack_activaited:!
- else:
- run jetpack_activate
jetpack_activate:
type: task
debug: false
script:
- flag <player> jetpack_activaited
- define multiplier <script[jetpack_config].data_key[speed_multiplier]>
- while <player.gliding.if_null[false]> && <player.has_flag[jetpack_activaited]>:
- playeffect effect:smoke at:<player.location.forward> offset:0.1,0.1,0.1 quantity:10
- adjust <player> velocity:<player.location.direction.vector.mul[<[multiplier]>]>
- wait 1t
- flag <player> jetpack_activaited:!
jetpack_check:
type: task
debug: false
script:
- stop if:!<player.equipment_map.get[chestplate].script.name.equals[jetpack_item].if_null[false]>
jetpack_command:
type: command
debug: false
name: get-jetpack
description: Gives you a jetpack
usage: /get-jetpack
permission: jetpack.get
script:
- if <context.source_type> == PLAYER:
- give jetpack_item