# +---------------------- # | # | T o r c h L i g h t # | # | Light from your torch without placing it! # | # +---------------------- # # @author mcmonkey # @date 2019/08/16 # @denizen-build REL-1681 # @script-version 2.8 # # Installation: # Just put the script in your scripts folder and reload. # # Configuration # You can add extra items and/or change their levels at the marked section below. # # Usage: # Hold a torch and run around! Also works in your offhand! # # ---------------------------- END HEADER ---------------------------- torch_light_world: type: world debug: false items: # =============== Add more material names here =============== - torch - lantern - redstone_torch - glowstone - glowstone_dust levels: # =============== Add alternate levels here =============== redstone_torch: 8 glowstone_dust: 6 # =============== end of editable section =============== subpaths: reset_delayed: - light <[1]> reset reset: - if == <[loc].simple>: - stop - if : - run locally subpaths.reset_delayed def: delay:2t - flag player torch_light_loc:! update: - wait 1t - define loc - inject locally subpaths.reset - if ]>: - light <[loc]> ]> - flag player torch_light_loc:<[loc]> - else if ]>: - light <[loc]> ]> - flag player torch_light_loc:<[loc]> events: on player holds item: - inject locally subpaths.update on player steps on block: - inject locally subpaths.update on player quits: - inject locally subpaths.reset