Inactive [MISC] Streetlamps v0.8 - redstone controlled street-lamps [1185]

Discussion in 'Inactive/Unsupported Plugins' started by Ginsek1988, Jun 26, 2011.

  1. Offline

    Ginsek1988

    Streetlamps - redstone controlled StreetLamps:
    PluginVersion v0.8
    ServerVersion /version: git-Bukkit-0.0.0-1067-g6301507-b1185jnks (MC: 1.8.1)
    Download StreetLamps v0.8.2

    Players can build street-lamps for their towns and remote controle them by redstone and other events (daytime, weather, manually).

    For a more detailed description visit me on dev.bukkit!

    If the plugin is not working for you, please respond to this thread: [README] It's not working!!!

    Media




    Connecting lamps to a button or lever
     
    woodzy, kahlilnc and SPACEDUDE360000 like this.
  2. Offline

    Ginsek1988

    I recommend you to update to v0.5.2.1 which provides a quickfix to bottoms. Else they won't load.
    I have to figure out how to test a new release before uploading without doing it myself-.-
    Any suggestions how to manufacture and evaluate certain tests?
     
  3. Offline

    toffo

    You got me there, I have no idea.. Perhaps if you assign some testers that could specifically test some things that you would like to have tested?

    I don't think I've tried bottoms yet, but I'll have a go later on today! :) Will also download the latest version before I do that ;)

    Also, just wanted to post a screen on one of my setups ;)
    [​IMG]
     
  4. Offline

    Zarius

    Actually, turning them on in packs could look really cool (I notice as dusk that lights in my city turn on in packs at different times) :) Any way of allowing different time settings to be used? Eg. you want some house lights to turn on a little before dark and turn off at say midnight (whereas the actual lights along the street would go all night)? Staggering lights on/off can add a feeling of activity to a town.

    Perhaps an option to occasionally allow a bulb to "fail" - hitting it with the redstone torch could fix it (also, you could automatically fix it for the next cycle/night so people don't end up with multiple broken bulbs) - might also add more "life" (for those that want it)?
     
  5. Offline

    Ginsek1988

    I am using BLOCK_PHYSICS events to detect redstonechanges. REDSTONE_CHANGE does not occure when a blocks power changes. So this mightcause the lag since there were a lot of them that went down quite deep into my code.
    Checking the material of the updated block first should reduce the events getting through. I don't think that you want to use water, lava and such stuff for the bottoms of your lamp. And I also think that Grass and Dirt will be used less than Cobblestone, Wood or double Slaps.

    You seem to use double slaps for your bases. Could you test this and tell me if the lag is reduced?
    I can't test this because my server doesn't lag with its 160+ lamps.
    valid materials for bases are:
    stone, cobblestone, wood, sandstone, double slaps, bricks and mossy cobblestone
    In this version you can build lamps on every base but the change of power will only apply to those bases.
     
  6. Offline

    Amsterdom

    I'm totally loving this plugin... I've made over 300 of these lamps (worldedit helped) but it seems to "forget" that I've made them... I have to change the glass back to glowstone, and hit them all over again to get it to work.... I know it's because I have so many that it's not working... but hopefully you can remove whatever is limiting the ammount you can put :)

    come see for yourself :)
    heresville.servercraft.co:5381 (lag free)
     
  7. Offline

    toffo

    Ginsek1988, I've tried the version you linked in post #106 and I see some less lag but it still lags.
    I normally look at the animals to see how they move when I look at lag in the game as they most often either stand still or just moves very little when the server is lagging.

    The server I'm running is with me alone on, Linux with 3.0GHz and 3GB ram, 2GB just for the Minecraft server.
    It all runs just fine except when changing the power-state of the streetlamps. So it sure is quite easy to see differences like this ;)

    All in all, not much difference but a slight change indeed!
     
  8. Offline

    Amsterdom


    thanks for the help budday :D
     
  9. Offline

    toffo

    No worries, I liked your server and I'm happy you got the Streetlamps plugin fixed ;)
    I got stuck on my own server now, but I might revisit in the near future to see what you've added to get some inspiration myself! :)
     
  10. Offline

    untergrundbiber

    Please, can you make configurable the distance between base-block and power-block?
    On our server we need a powerblock thats 2-3 block under the base-block.
     
  11. Offline

    Ginsek1988

    I could add a configuration for each lamp. I think you do not want a lowered powerblock for ceilings :p (If you use them) *added to todo*
     
  12. Offline

    untergrundbiber

    THX, that would be very nice :)

    Hab gerade gesehen das du ja ein Landsmann bist :p
    Schöne Grüße und vielen Dank für das tolle Plugin, wir werden fast den ganzen Server damit bestücken :)
     
  13. Offline

    Manbeast77

    If I may, I'm going to make a suggestion. Stop saying bulb material, and just say lightstone. Several of my players were trying to make the lamps by using glass, or other materials and were getting frustrated until I got on and cleared up the mess. If you aren't going to make a config where you can change the "bulb material", just say lightstone. It makes things a bit more clear and less confusing.
     
  14. Offline

    Smee2112

    Is there some type of permisions setting required for users to activate a lamp? I am the admin and when I hit a lamp with a redstone torch, it works. When anyone else does, nothing happens.
    Thanks
     
  15. Offline

    thiefzer0

    Same here...

     
  16. Offline

    toffo

    Apparently you don't seem to understand that you can choose from several different materials, therefore it's named bulb material instead of lightstone.

    As in the config
    Code:
        material:
            bulb_on: 89
            tool: 76
            bulb_off: 20
    You could just as well use stone, wool, dirt as the bulb_off material. The bulb is the actual lamp, so it's nothing strange with it. If your users have problems understanding what they need to use, perhaps they should read through both the first post in this thread but also the config file. It should be quite clear what you need to do, to get it to work ;)

    I'm not angry at you, but it seems that your users haven't gone through all the info.
     
  17. Offline

    Ginsek1988

    No I didn't implement anything like that. (good idea) *added to todo*

    For all that are running the plugin with 300+ lamps and have lag, I suggest that you turn off powermode until the lag is fixed. I think that it lags less/not without powermode.
    Can someone confirm this?

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

    matze134

    can you add that a function, that you can create new lamps, without they are powered with redstone?

    because its complicated if you create a lamp you must set redstone and after that you must destroy it ^^
     
  19. Offline

    Ginsek1988

    You mean that lamps do not require to be powered on creation when powermode is disabled? Yeah that makes sence *added to todos*

    Anyway, here is v0.6 (unofficial). It features the requested/suggested CLUSTER mode to deal with the CPU spikes.
    Could someone test it? :) Couldn't test it that well, since I do not have a lot of lag with 300+ lamps.
    Please test it with powermode enabled ;)

    The lamps turn on/off in clusters of 20(configurable) by default. This happens every second until all are done. Actually 20 of each type at the same time, so ... up to 100lamps/sec if you have 20 of each type.
    At the moment they update in the order they are built/saved/loaded. I think they will turn on randomly when I realease v0.6.
     
  20. Offline

    matze134

    Yes that was what I mean, good work ^^
     
  21. Offline

    scout109

    can you make it so you can power a lamp on at any time of day
     
  22. Offline

    Timmie3054

    Is there away to power the lamps just by a switch and not go by day and night.

    I know you can power the light by a switch, but during the daytime it stays Glass no matter what, and it automatically turns to Glowstone when its night time, which I don't want.
    I want the lights to only turn on when I turn on the switch, and only turn off when I turn off the switch.

    Okay guys, Just figured it out. If you want to power the Lamps on with Redstone only, and not by the weather the do the following.

    In the Config file set Daytime to false, and make sure power is set to true.

    This will make the lamps ignore the weather, and only turn on if they are receiving power.

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

    toffo

    @Timmie3054 for that you'll need to change daytime to false in the config.yml file.

    First off, randomly could maybe be chosen in the config as well? So either randomly or in the order they are built/saved/loaded?

    I tested this 0.6 version and it gives, at least me, the most lag of all versions I've tried. It does work however and
    it works kind of nice. The transition to night goes much faster/smoother than the transition to day. It is way more laggy when day comes and my test-sheeps lags around 5-10 seconds after all bulbs have changed to glass as well as during the change from glowstone to glass.
    This with power-mode off.

    With power-mode on I get the same kind of lag, but during night and after flipping the power-switch either to on or off I do not get any lagging after the transition is complete. Just like running power-mode false and change from day to night.

    It seems to me that, you can probably do some things to better up the lag with your plugin, but overall I think the lag is due to the lighting system in Minecraft itself. Not only does Minecraft need to change a few blocks from one type to another, it also need to recalculate lighting around the new blocks.

    Anyhow, I'm more than willing to keep help on testing this plugin for new features and such! :D
    I would really love some sort of SQL database for the bulbs though, cause I've been thinking about the other suggestion by @untergrundbiber about the powerblock configuration. Maybe it would be possible to change this for every lamp with a "better" database.

    As in my world I have some pendant lamps directly on the ground and some on bridges. Those on bridges would probably need a powerblock like 20 blocks below, to make sure they aren't shown. While those directly on ground/land can have their powerblock just below the surface. Does anyone understand what I mean? ;)



    Finally, I also get this when /reload'ing my server on version 0.6
    Code:
    2011-07-14 14:17:40 [SEVERE] Error occurred while disabling StreetLamps v0.6 (Is it up to date?): null
    java.lang.NullPointerException
        at de.bukkit.Ginsek.StreetLamps.Collections.LampCollection.forceOn(LampCollection.java:129)
        at de.bukkit.Ginsek.StreetLamps.Collections.LampCollection.onDisable(LampCollection.java:190)
        at de.bukkit.Ginsek.StreetLamps.Lamps.LampProvider.onDisable(LampProvider.java:36)
        at de.bukkit.Ginsek.StreetLamps.Collections.BuilderCollection.onDisable(BuilderCollection.java:56)
        at de.bukkit.Ginsek.StreetLamps.StreetLamps.onDisable(StreetLamps.java:139)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:128)
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:878)
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:280)
        at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:273)
        at org.bukkit.plugin.SimplePluginManager.clearPlugins(SimplePluginManager.java:301)
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:329)
        at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:281)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:290)
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:480)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:465)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)

    Update:
    Also, ceilings doesn't seem to work at all right now. It's possible to create and destroy them, but they don't
    change material with power on/off or the like.
     
  24. Offline

    Smee2112

    So how can non-admins currently power a light? Is that not possible?
     
  25. Offline

    Ginsek1988

    please don't quote the topic post :)
    you mean without manually mode? Yes, that's possible. Actually I don't see a problem using manually and the other modes at the same time, any more.
    I got the idea of sorting the lamps after creation. So that they would turn on as the shadow progresses through the world. (Does that sound right?) yes options in the config for "random", "sorted", "as build"

    Without the powermode there should be no lag from the plugin itself. (I think)
    Try to use a material that does not emmit light and check for lag.
    If it still lags ... well then my thought was wrong :p
    I used WorldEdit to build a lot of lamps and watched some videos of how to change the terrain and this does not seam to lag. If MY addon lags more than WorldEdit (without light updates) there definitely is something wrong. I'll have a friend take a look at my code and sort out the bad ideas :D

    @dabtabases: I am currently looking into NoSQL databases.
    The goal is to use it for storage and not for lookups since I don't expect it to work much better.

    Regarding distance of powerblocks: I could add ingame commands to set those. I don't see any other chance to change those for now. Ingame commands might just set a tool like you do in WorldEdit so you could leftclick a lamp and rightclick a block to use as powerblock. With this you could use one powerblock for multiple lamps.

    I'll look into the ceilings in time.

    Actually... how does Permissions work? Does it cancel any events not allowed? I thought I had to implement Permissions support to disallow actions and not to allow them. Then I think Persmissions is stupid if it disallows any actions of other plugins by default^^ (I do not think it works this way;) )
     
  26. Offline

    Manbeast77


    They haven't, they're mostly teens too. Go figure. I pay attention and rarely have issues.
     
  27. Offline

    untergrundbiber

  28. Offline

    Drat333

    Looks nice, but I think I'll stay with Lampstone
     
  29. Offline

    Smee2112

    I think Permissions locks everything down unless explicitly granted. Except for Admins which have all perms. I have no problems giving the members of my server Admin perms for just Streetlamps but I don't know what command to use.
     
  30. Offline

    Ginsek1988

    Well... I dislike this behavior of Permissions.
    Will fix this with v0.6 I think
     
  31. Offline

    matze134

    could you add ingame commands like /lamps on/off to switch all lamps? that would be nice
     

Share This Page