- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





Staff Pick: Torch Light


By mcmonkey
Created: 2015/01/02 20:20:48 UTC-08:00 (9 years and 108 days ago)
Edited: 2016/12/14 20:24:02 UTC-08:00 (7 years and 126 days ago)
Likes: 2

Staff pick as of: 2016/08/06 06:55:53 UTC-07:00 (7 years and 257 days ago)
Denizen Version: 0.9.8
Script Version: 1.2
Description:

# +----------------------
# | Torch Light
# |
# | Light from your torch without placing it!
# +----------------------
#
# @author mcmonkey
# @denizen-version 0.9.8
# @version 1.2
#
# Installation:
# Just drop it in your scripts folder :)
#
# Usage:
# Hold a torch and run around! Also works in your offhand!
#
# +----------------------

FORUM: https://forum.mcmonkey.org/viewtopic.php?f=9&t=8


Download script | View raw 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
4900

# +----------------------
# | Torch Light
# |
# | Light from your torch without placing it!
# +----------------------
#
# @author mcmonkey
# @denizen-version 0.9.8
# @version 1.2
#
# Installation:
# Just drop it in your scripts folder :)
#
# Usage:
# Hold a torch and run around! Also works in your offhand!
#
# +----------------------

torch_light_world:
    type: world
    debug: false
    events:
        on player steps on block:
        - if <player.has_flag[torch_light_prev]> {
          - light <context.previous_location> reset
          - flag player torch_light_prev:!
          }
        - if <player.item_in_hand.material.name||null> == torch || <player.item_in_offhand.material.name||null> == torch {
          - light <context.location.add[0,1,0]> 14
          - flag player torch_light_prev
          }
        on player quits:
        - if <player.has_flag[torch_light_prev]> {
          - light <player.location> reset
          - flag player torch_light_prev:!
          }

torch_light_version:
  type: version
  name: Torch Light
  id: 13
  description: Lights your way!
  version: 1.2










View History