Go to file
David G 4c3dc63992 Document craft recipes. 2020-03-29 13:37:58 -07:00
images Document craft recipes. 2020-03-29 13:37:58 -07:00
textures Multiple updates. 2020-03-12 11:27:21 -07:00
README.md Document craft recipes. 2020-03-29 13:37:58 -07:00
crafting2.png Add flash-lamp and wear. 2020-02-10 16:53:39 -07:00
init.lua Switch to cone of light. 2020-03-12 20:38:05 -07:00
mod.conf Switch to cone of light. 2020-03-12 20:38:05 -07:00
screenshot.png Initial commit. 2019-12-28 16:59:29 -07:00
settingtypes.txt Switch to node_timers. 2019-12-31 10:34:48 -07:00

README.md

Wand of Illumination [wand_of_illumination]

Provides a wand that when used, lights up what's in front—but only for a moment.

Alternatively, provides a 1900-era flash_lamp and a futuristic super_lamp, for those without a sense of magic.

Wand of Illumination Screenshot

Picture: Torch vs Normal vs Extended Range (smooth lighting off)

Features

  • New: Now just lights up 120° in direction player is pointed.
  • New: Choice of original magic wand, 1900-era flash_lamp, or mese-powered super_lamp.
  • On left click, places a cone of invisible lights in front of the player.
  • On shift-left-click (or aux-left-click), creates an extended cone of lights.
  • Doesn't place lights where already brightly lit.
  • Uses node_timers to cause these light nodes to gradually fade away.
  • Wear added, so all lamps will only work for a limited number of uses.
  • Uses mana mod for wand if available. Current cost for use is 100 mana (normal), or 200 mana (extended).

(Note that narrow passages, like dungeon corridors, may not light up, if they don't fall on the 4x light spacing grid.)

WIP—Things that still need to be done.

  • Come up with a crafting recipes. (Updated)
  • Optimize number of uses before wearing out. (Updated)
  • Optimize mana cost.
  • Tune light generated: brightness, spacing, radius, and decay rate. (Updated)
  • Come up with better textures. (Updated)

Note about number of lights used

Note: These numbers were for a full sphere. For r=40 and a 120° cone of light, only 67000 nodes are scanned, and 1044 lights are placed.

To allow this mod to light up all the narrow twisty tunnels underground, the spacing of the lights placed needs to be as small as possible. However, I also want to minimize how many lights this mod places. With testing, a spacing of four seemed to give light coverage in most tunnels, with just a few that were too narrow to have any lights.

However, with the fixed spacing I'm using, this still adds up to a large number of lights. I did some tests in the sky, which gives the worst case numbers:

r = 15,   14000 nodes scanned,   230 lights placed
r = 30,  113000 nodes scanned,  1760 lights placed
r = 50,  523000 nodes scanned,  8100 lights placed

On my five-year-old computer, even this last test case only takes a few seconds to generate (in singleplayer), so I'm not too worried about performance. (Your mileage may vary.)

Here's a screenshot with r=15 and r=50 (using meselamps to make the lights visible):

Example of light patterns

Dependencies

  • Optionally depends on Wuzzy's mana mod.
  • Optionally depends on default and tnt mods to enable craft recipes.

Craft Recipes

Crafting 1 Crafting 2

Crafting 3 Crafting 4

Licenses

Source code

The MIT License (MIT)

Media (textures)

Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)

Current textures based on farming_tool_stonehoe.png by BlockMen