Light sensor (all light not just daylight)

Discussion in 'Archived: Plugin Requests' started by Just Another Guy, Sep 10, 2013.

  1. Hi, there was a mod I used a while back, but it's terribly outdated and doesn't seem to have been changed since I last played minecraft, which was like 2 years ago, and obviously it doesn't work now.

    I had a pretty cool use for it, as two were hidden in opposite sides of a room (there were indents in the wall so you could tell where though), and you had to place a torch near both of them to activate the hidden door. Going through the hidden door would trigger water to fall and wash away the torches, so it would reseal again and remain hidden :p

    I saw the daylight sensor yesterday, but unfortunately it doesn't work with artificial lights, sooooo, I'd be really grateful if someone could manage a simple plugin where you can create a sensor to activate at a specific light level :)

    Old mod here - https://forums.bukkit.org/threads/mech-lightsensor-v0-9-light-dependant-levers-1185.5975
     
  2. Offline

    Me4502

    CraftBook has a Light Sensor IC that does this.
     
    Fire_Feather likes this.
  3. Hmm thanks, I've just tried it now, but it doesn't really do what I'm after (plus it doesn't work properly)
    I'd like something which would just output a signal if the light level gets over a certain value. The one in craftbook needs a constant clock signal feeding into it, and it doesn't even work. I set up two signals, one set at a min light level of 2 and the other 13, they both output the same signals no matter if it was pitch black or open to the sunlight :/
     
  4. Offline

    Me4502

    Read the wiki, it states how to make it not require the clock to power it, and make sure you are using the right syntax for the light sensor. Syntax is available through the ingame command /IC docs
     
  5. Offline

    Pocketkid2

    I will see what I can do. I feel pretty confident I can make a simple but working design for this.

    If I ever get around to finishing this I will let you know
     
  6. Not sure the current version of it, but for the ones not needing a clock, it does say on the wiki it's not working in CraftBook 3.0-alpha2. Anyways, I know the syntax is right, because if I make a sign and put [MC1262] on the second line, it'll display a message and put LIGHT SENSOR on the top line :p With the one which doesn't require a clock, it does the same, although the [MC0262] changes itself to [MC1262]S. Both don't do a single thing and constantly output power, if I flip the switch it'll flip back again, showing it is working, just not correctly :p

    Not the best shot ever, but this shows it not working, the level on the blocks is 5-7, and it's set to activate at 10 http://i.imgur.com/OO1hXqk.jpg

    And thanks pocketkid :D
     
  7. Offline

    Pocketkid2

    So do you still want the plugin? Or is CraftBook IC's fine? Because I'm not sure I can make a working design for your plugin so soon. Let me know if you are still interested and I can show you how it will work.
     
  8. Haha well the craftbook thing doesn't seem to work, so if you eventually get round to making something then that'd be cool, there's no rush anyways, it's just a shame nothing currently seems to work as it was a pretty awesome way of adding secret passages :)

    I would give it a shot myself, but I only know python and don't really have the time currently to learn java ;p
     
  9. Offline

    Me4502

    I just looked into it, and apparently it isn't currently possible to detect light signals with bukkit as it always outputs 15 for one of the light values, that would be why craftbook isn't working.

    Edit: apparently that issue doesn't exist anymore, use the latest dev build of craftbook, both the offset and light value were on the same line for some reason
     
  10. Hey, sorry for the late reply, been busy with moving back to uni and all, but yeah nice one for fixing it ;D

    One thing though, could you possibly link me to the dev build please? :) I've searched around a bit, but can't find anything more recent than the version I downloaded before - http://dev.bukkit.org/bukkit-plugins/craftbook/files/
     
  11. Offline

    Hoolean

  12. Ahh cheers for that :)

    On a side note though lol, it still doesn't seem to work properly with the fix (only outputs any signal when set to light level of 0), so I'll give a dev version of craftbukkit a shot tomorrow to see if it'll help :p
     
  13. Offline

    Me4502

    By default, it searches for the block the sign is connected to. On the last line of the IC, write 0:1:0, that searches for the block above that block.
     
  14. Ahh thanks, that's finally worked :) Also sorry, I know you're the guy who coded this all, but I only just realised you've also been the one posting the whole time haha. If I'd have noticed earlier I would have been more helpful in the earlier replies, I initially thought you were someone who hadn't really tried it but was just telling me to check the wiki ;P

    It's weird that the last line was needed though, because all the blocks in the area were above the light levels, including the one the sign was attached to :p
     
  15. Offline

    Me4502

    I've changed the code to default to using the block above the one the sign is attached to, so that the last line shouldn't be needed for that block :)
    The light level of any 'solid' block will always be 0, by solid I mean blocks that can't have light pass through them, for example stone.
     

Share This Page