[MECH] LightSensor v0.9 - Light dependant levers [1185]

Discussion in 'Inactive/Unsupported Plugins' started by Tiramon, Feb 25, 2011.

  1. Offline

    Tiramon

    I know this sounds exactly like iLDR, but because iLDR never worked for me i wrote my own.

    The basic idea is to turn redstone circuits on and off dependant on the surrounding light.
    For example to close doors at night or something like that. Or what i want to do in combination with ControllerBlock fade out my torches at day and fade them in aga in at night.

    How to:
    Just hit a lever with a redstone torch to turn it into a LightSensor. From now on it will automatically turn on if the lightlevel of the lever is equal or less to the configured value (default: 7) and turn off again as soon as the light level increases above the configured value.
    Each LightSensor can be configured with a separate value.
    If you right click a LightSensor it shows you the configured value and the current lightlevel. If you right click the lever again within 2 seconds the configured value is increased by one (if 16 would be reached it steps down to 1)

    Currently i check all 2 seconds the lightlevel of all registered LightSensors

    LightSensor v0.9 Download

    Features:
    - automatically downloads sqlite.jar if needed
    - each lever can get his own configuration
    - lever turns on when light level is equal or less the configured value
    - lever turns off when light level is above the configured value
    - configurable check interval (default 2seconds)
    - configurable default light sensitivity (default 7)

    TODO:

    Known Issues:
    - Sensor attached to sand or gravel are not deleted when the block falls down and so unattaches the lever

    Changelog:
    Version 0.9
    -Only interact with a LightSensor when the chunk is loaded
    -deleting the lightsensor from db when the block where the sensor should be is not a lever
    -Hopefully fixed the classcast of post #77

    older Changelog (open)

    Version 0.8
    - making it working again with b1000

    Version 0.7
    - catching ConcurrentModificationException in LightSensorThread
    - closing database connection in onDisable

    Version 0.6
    - removed spaming debug output
    - fallback method for byId return value is null
    - NullPointer Check in LightSensorPlayerListener:19

    Version 0.5
    - sensor check is disabled while no player is online, this fixes the reported bug on disconnect of last player
    - adapted to event changes in b561

    Version 0.4
    - configurable check interval (default 2sec)
    - configurable default value (default 7)
    - fix for the not working redstone

    Version 0.3
    -fixed Bug with new implemented Physics
    -fixed lever switching and this way attaching the lever to another wall
    -sensors attached to a broken block are now deleted correctly

    Version 0.2
    -removed unsed command and so removed PLAYER_COMMAND
    -bugfix: if a block where a lightsensor is put on was destroyed the sensor wasn't deleted (because i can't get the user involved in destroying the sensor, i make an log output 'LighSensor deleted by Physics' )

    Version 0.1
    First Release


    Forgot to add bukkit build in the title, if someone who can change the title could please add the [440]

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

    Chris Lewis

    @Tiramon
    Ok thanks, just let me know if you get this updated/fixed, love this plugin! its so cool to see my city light up at night... if you get this fixed i'll fraps it coming to life for you

    new error

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

    Tiramon

  4. Offline

    Chris Lewis

    Great thanks, testing now. If it does I will be frapsing or having on of my players fraps and upload the video of our power system using Craftbook and this plugin.
     
  5. Offline

    Chris Lewis

  6. Offline

    Tiramon

    nice one :)

    i put that video in the top post if it's ok for you
     
  7. Offline

    Chris Lewis

    Thats fine. Its nice to see the city light up, keeps the mobs at bay ;)
     
  8. Offline

    Ratte

    well... it worked for me, for like 10 minutes. after that the switch started spazzing out, turned itself on and off every second and now it wont even work after reinstalling the mod. i dont even get any error messages, the only lightsensor related message in the server log is the following:
    2011-04-10 12:22:39 [INFO] [LIGHTSENSOR] 0 sensors loaded
    2011-04-10 12:22:39 [INFO] LightSensor version 0.7 is enabled!

    to give some more information: i've connected the switch with about 20 to 30 redstone repeaters which open and close the city's gates (plugin: http://forums.bukkit.org/threads/me...easy-and-realistic-portcullises-556-670.7346/)
    wanted to automate that at night so no mobs can get in.
     
  9. Offline

    Liam Gore

    i have a really annoying problem. i have it all wired up to a iron door. when it turns daytime the door opens which is how i want it but when it becomes night the door refuses to close. the redstone is off but the door wont close unless i break the circuit. any ideas?
     
  10. Offline

    Zetorung

    I am having the same problems as some others with the switch just going back and forth repeatedly. It seems to happen when I go into the nether and back out again. Also when I hit the torch it gives me no messages like it normally does.
     
  11. Offline

    Chris Lewis

    For those having issues, make sure you have craftbukkit build 670+ (current recommended build is 684). Then delete the entire LightSensor folder in your plugins folder, and delete the .jar file. Download the latest .7 version of this and then reinstall. Its possible the .db was corrupt causing this issue.
    Although i have noticed that it no longer uses redstone torches to activate or give you the message? Whats up with that?
     
  12. Offline

    Chris Lewis

    Hope you come back to update this.... i really want to use it for the new builds!!

    this is on CB 709

     
  13. Offline

    Arrorn

    I agree... I'm getting the same error on 711

    Code:
    2011-04-24 09:52:38 [SEVERE] Exception in thread "LightSensor check"
    2011-04-24 09:52:38 [SEVERE] java.lang.NoSuchMethodError: net.minecraft.server.Block.a(Lnet/minecraft/server/World;IIILnet/minecraft/server/EntityHuman;)Z
    2011-04-24 09:52:38 [SEVERE]     at de.tiramon.bukkit.lightsensor.Sensor.interact(Sensor.java:155)
    2011-04-24 09:52:38 [SEVERE]     at de.tiramon.bukkit.lightsensor.Sensor.check(Sensor.java:147)
    2011-04-24 09:52:38 [SEVERE]     at de.tiramon.bukkit.lightsensor.LightSensorList.check(LightSensorList.java:89)
    2011-04-24 09:52:38 [SEVERE]     at de.tiramon.bukkit.lightsensor.LightSensor.check(LightSensor.java:227)
    2011-04-24 09:52:38 [SEVERE]     at de.tiramon.bukkit.lightsensor.LightSensorThread.run(LightSensorThread.java:26)
     
  14. Offline

    Chris Lewis

    Oh please come back developer... we love you ;)
    Recommended build 733
     
  15. Offline

    Nitnelave

    Oh no! my whole night-protection system activated by light is broken! please update quickly!! Thanks again for your great work!
     
  16. Offline

    Tiramon

    Sorry was a bit busy the last days.
    Also i won't have any time at the upcoming weekend, but i will see what i can do.

    Just installing my testserver with the new recommended
     
  17. Offline

    belfedia

    Hoping a release soon :)

    Thanks !
     
  18. Offline

    Nautules

    I love the concept, it is however not working for me. Currently running craftbukkit 740.

    The lightsensor levers do not respond to a change in lightning level (using torches or daylight levels).

    Something I might be doing wrong?
     
  19. Offline

    Chris Lewis

    it has not been updated for a while, we are anxiously awaiting the update but he said it will be a couple of days since he is busy with life ;)
     
  20. Offline

    GGreenBass

    I am definitely keeping tabs on this one :3
     
  21. Offline

    Tuttu

    Hi Tiramon !

    Your plugin sounds good. I have placed a request for something similar here. Do you think that you can adapt your plugin to fit the weather part ? Or I will have to look for someone else ?
     
  22. Offline

    kenneth123

    VERY NICE plugin only please update it for the new build its a really popular thing in my server as i have made bunkers everwhere and they close at night for protection of traveling players, i really like this plugin but please update it fast : )
     
  23. Offline

    Zaros

    This plugin really needs to be updated. This is so useful, but it isnt working.
     
  24. Offline

    Simanova


    Confirmed - not working on CraftBukkit 760 - 779 and perhaps also ealier builds
     
  25. Offline

    Plague

    CB 670 - inactive
     
  26. Offline

    Nautules

    Inactive? NOOOOOooooo
     
  27. Offline

    Arcwolf

    For anyone who still cares about this plugin I've managed to get it updated to 857 bukkit. I believe it should work with 818.

    Link is here

    For anyone who wants to fix it themselves later on the source is on my GitHub

    This is totally unofficial until Tiramon comes back... I just was tired of all my broken light sensors hanging around so I fixed it... Figured I'd share with the community.

    Enjoy.
     
  28. Offline

    Nitnelave

    Too late, I'm using Falsebook now...
     
  29. Offline

    Zaros

    [air][diamond][air][diamond][air]
    [diamond][air][diamond][air][diamond]
    [diamond][air][air][air][diamond]
    [air][diamond][air][diamond][air]
    [air][air][diamond][air][air]
     
  30. Offline

    Nautules

    you sir, are awesome
     
  31. Offline

    Arcwolf

    Since the latest CraftBucket commit (#937) is mentioning a bunch of renaming... I figured I should update this from using the b method to the interact method... ahead of the breakage that will probably occur next recommended. Hopefully that keeps things working... I'll be keeping an eye on it though :cool:

    Link is here

    its on my GitHub here
     
    Xaostica likes this.

Share This Page