[MECH] LightControl v0.4 - RedstoneChips library for control of light sources [1840]

Discussion in 'Inactive/Unsupported Plugins' started by Mordenkainen, Jul 24, 2011.

  1. Offline

    Mordenkainen

    LightControl- A RedstoneChips library for controlling light sources:
    Version: v0.4

    LightControl is a Redstone Chips library that allows control of various light sources.

    Features:
    • Toggle Glowstone on/off (glasslight)
    • Toggle Torches on/off (torchlight)
    • Toggle Pumpkins on/off (pumpkinlight)
    • Toggle Redstone Torches on/off (rstorchlight)
    • Toggle flaming NetherRack on/off (netherlight)
    • All chips support wireless control, address selectable outputs, or directly controlled outputs.
    • Supports lights on posts or any other structure. Allowed materials are configurable.
    • glasslight chip can be configured for dropping/not dropping glowstone when broken
    Usage:

    Indexed (Direct) control of outputs:
    - Create a chip with any number of interface blocks and the same number of input blocks.
    - Attach your output (glass for glasslight, pumpkins for pumpkinlight, etc) to the interface blocks.
    - Attach a sign with the chip name on the first line and "indexed" on the second. For example:
    -----------
    glasslight
    indexed
    -----------

    Addressed control of outputs:
    - Create a chip with any number of interface blocks.
    - This chip will need 2 input blocks, plus enough inputs to address the interface blocks (1 to address 2 interface blocks, 2 to address 4, etc.). The first input is a clock, the second the input value, the rest the address.
    - Attach your output (glass for glasslight, pumpkins for pumpkinlight, etc) to the interface blocks.
    - Attach a sign with the chip name on the first line and"addressed" on the second. For example:
    ------------
    pumpkinlight
    addressed
    ------------

    One input controls all outputs:
    - Create a chip with any number of interface blocks.
    - This chip will need 1 input block.
    - Attach your output (glass for glasslight, pumpkins for pumpkinlight, etc) to the interface blocks.
    - Attach a sign with the chip name on the first line and "all" on the second. For example:
    ------------
    rstorchlight
    all
    ------------

    Wireless control of outputs:
    - Create a chip in the same way as above (Indexed or Addressed), but do not include any input blocks.
    - Add an additional line to the sign with the name of your wireless channel.
    ------------
    netherlight
    mychannel
    ------------
    or
    ------------
    netherlight
    indexed
    mychannel
    ------------
    etc.

    Note that the line identifying the input type (addressed, indexed, all) is optional. If this line is not there the chip will attempt to figure it out automatically using the following rules:
    - If the right number of inputs vs. interface blocks for addressed mode is present, it will attempt to use Addressed mode. (I.E. 3 input and 2 interface, 4 input and 4 interface, 5 input and 7 interface, etc.)
    - If the same number of inputs and interface blocks are present, it will attempt to use Indexed mode.
    - If there is only one input, it will use All mode.
    - If more than one of the above is true, the last one is used. (All is preferred over Indexed, Indexed is preferred over Addressed)

    Lamp Posts:
    You can build complex light setups using various materials. When activated the chips will search through the blocks attached to it's outputs looking for light sources to toggle. This allows you to build lamp posts and chandeliers. The allowed materials for lamp posts defaults to Logs, Wood Planks, Fences, Iron Bars, Nether Fence, and NetherBrick. These can be changed via the configuration.
    Lamp.jpg

    Configuration:
    This plugin adds two new preferences to the RedstoneChips preferences.yml:
    - glasslight.dropGlowstone: false
    This preference controls if breaking glowstone lights drops glowstone dust or not. This defaults to false, meaning glowstone will not be dropped.

    - LightControl.lampPostBlocks: WOOD,LOG,IRON_FENCE,FENCE,NETHER_BRICK,NETHER_FENCE
    This preference is a list of block types that can be used for lamp posts. Additional blocks can be added to this entry to allow more materials to be used.



    Known Issues:
    • None
    ToDo:
    • Allow billboards made of light sources. An example with redstone torches is shown here: (Future)
    • Add CraftBukkitUpToDate support?
    Notes:

    This plugin requires RedstoneChips:
    http://forums.bukkit.org/threads/mech-redstonechips-0-9-integrated-circuits-plugin-1000.1205/

    For the glasslight chip, you may want to use a texture pack that makes Glass and Glowstone more similar to each other. This will make the transition between the on and off states look better.

    Video Demo:


    Download The LightControl Plugin: https://github.com/Mordenkainen/LightControl/raw/master/release/LightControl-0.4.jar
    Source Code: https://github.com/Mordenkainen/LightControl

    Changelog:
    Version 0.4
    • Added support for lamp posts.
    • Added configuration for glowstone drops.
    Version 0.3
    • Updated for RedstoneChips 0.94 (Thanks Eisental!)
    Version 0.2
    • Chips now save state on shutdown
    • Pumpkins maintain facing
    • Breaking Glowstone lights no longer drop anything
    • Torches are now handled properly on server restarts
    • Added "all" mode where a single input toggles all attached lights
    • Rewrote input type detection system. Chips now try to figure out what mode they are in on their own. What has been detected can be overridden by a sign argument.
    Version 0.1
    • Initial Release
     
  2. Offline

    FarSideX

    Thanx for the update!

    Although we use lampstone for our lampposts, chandeliers would be cool to turn on and off. I would use torches for those, but glowstone for anything else.

    Link still points to LightControl-0.2.jar

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  3. Offline

    Mordenkainen

    Fixed, thanks!
     
  4. Offline

    Mordenkainen

    Added support for lamp post and config settings. Original post has been updated with new version.
     

Share This Page