Date: 2017/10/23 20:26:51 UTC-07: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
66
67
fakeFurnaceCommand:
type: command
name: furnace
usage: /furnace
script:
- define arg1 <c.args.get[1]||null>
- choose %arg1%:
- case reload:
- run lightFurnaces
- narrate "<green>Reloaded Furnaces"
- case remove:
- define loc <player.location.cursor_on>
- if <yaml[litFurnaces].read[furnaces].contains[%loc%].not> {
- narrate "<red>There are no furnaces there..."
- queue clear
}
- yaml id:litFurnaces set furnaces:<-:%loc%
- run saveYAML 'def:litFurnaces|decor/furnaces.yml'
- run lightFurnaces
- narrate "<green>Removed Furnace"
- default:
- define loc <player.location.cursor_on>
- if <yaml[litFurnaces].read[furnaces].contains[%loc%]> {
- narrate "<red>Already a furnace there, do /furnace reload if you cant see it"
- queue clear
}
- if <def[loc].material.name.is[==].to[furnace]> {
- yaml id:litFurnaces set furnaces:->:%loc%
- run saveYAML 'def:litFurnaces|decor/furnaces.yml'
- run lightFurnaces
- narrate "<green>Made a lit furnace"
} else {
- narrate "<red>you can only make furnaces lit, point at a furnace"
}
FakeFurnaces:
type: world
events:
on server start:
- run loadYAML 'def:litFurnaces|decor/furnaces.yml'
- run lightFurnaces
on system time minutely:
- run lightFurnaces
on player clicks furnace:
- if <yaml[litFurnaces].read[furnaces].contains[<c.location>]> {
- determine passively CANCELLED
}
lightFurnaces:
type: task
debug: false
script:
- foreach <yaml[litFurnaces].read[furnaces]> {
- run showFakeBurning 'def:%value%'
}
showFakeBurning:
type: task
debug: false
script:
- define loc %1%
- define direction <def[loc].material.data>
- if <def[loc].chunk.is_loaded> {
- showfake %loc% m@burning_furnace
}
- repeat 11:
- wait 5s
- if <def[loc].chunk.is_loaded> {
- showfake %loc% m@burning_furnace,%direction% players:<def[loc].world.players>
}