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

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

  1. 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

    fatmarley

    I haven't played with is much since, but I will try again today.

    What was happening was, I would setup the streetlight and then i would left click it with the redstone torch and it would say creating a street light, but the glowstone would stay glowstone. Yet, if I removed the power supply, it turned to glass.

    I did try to make a new one a little later, but I kept a clock in my inv...it worked alright.

    The other plugin is called WeatherRestrictions.
     
  3. I'll take a look at WeatherRestrictions and if it interferes with the plugin on my server.

    The only cases when it stays Glowstone on my server is when I create it at night or when it's raining...
    Ah, and say are you using multiworld? If you do, I must say that I haven't implemented anything considering multiworlds yet. So I can not say how it will behave. I feel like doing this today :)
     
  4. Offline

    fatmarley

    Ive had great success with it today...we made a roadway that turns to glowstone at night..

    And love the new add on...
     
    Unscrewed likes this.
  5. Offline

    thecoolreaver

    i have the settings set to default, but i can't get it to react to weather still, its raining and they stay off, i would like to use these in my city i am building, (and not have glowstone lining the underground)

    they turn on when it hits night, but turns off when it hits day , all while its still raining

    tried without rain before built, when raining, nothing
     
  6. hm... I took a look into my serverlog and saw this
    Code:
    2011-07-06 10:47:26 [INFO] [StreetLamps] power enabled
    2011-07-06 10:47:26 [INFO] [StreetLamps] daytime enabled
    2011-07-06 10:47:26 [INFO] [StreetLamps] registered pole
    2011-07-06 10:47:26 [INFO] [StreetLamps] registered pendant
    2011-07-06 10:47:26 [INFO] [StreetLamps] registered ceiling
    2011-07-06 10:47:26 [INFO] [StreetLamps] loaded 74 pole
    2011-07-06 10:47:26 [INFO] [StreetLamps] loaded 3 pendant
    2011-07-06 10:47:26 [INFO] StreetLamps 0.4.3 is enabled
    
    It ran with default config and guess what, weathermode was not loaded :)
    one line one issue
    *fixed*
     
  7. Offline

    woodzy

    @Ginsek1988 hay just wanted you to know this works with itemcraft!!
    and CB#900 1.6.6
    im waiting for itemcraft lol
     
  8. actually whats itemcraft?^^ I read something about it on nitrado.net since there's an option to install it on your minecraftserver but we were fine with minecraft as it is
     
  9. Offline

    fatmarley

    This was spitout in log after half of my streetlamps stopped working.

    I broke em, replaced em, set em and changed to day.

    Code:
    2011-07-06 12:53:56 [SEVERE] Could not pass event BLOCK_PHYSICS to StreetLamps
    java.lang.NullPointerException
    at net.minecraft.server.World.a(World.java:1630)
    at net.minecraft.server.World.a(World.java:1604)
    at net.minecraft.server.Chunk.f(Chunk.java:141)
    at net.minecraft.server.Chunk.c(Chunk.java:132)
    at net.minecraft.server.Chunk.a(Chunk.java:300)
    at net.minecraft.server.World.setRawTypeId(World.java:305)
    at net.minecraft.server.World.setTypeId(World.java:370)
    at org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:127)
    at de.bukkit.Ginsek.StreetLamps.Lamps.Blocks.Bulb.forceOff(Bulb.java:38)
    at de.bukkit.Ginsek.StreetLamps.Lamps.SuperLamp.forceOff(SuperLamp.java:108)
    at de.bukkit.Ginsek.StreetLamps.Lamps.SuperLamp.update(SuperLamp.java:120)
    at de.bukkit.Ginsek.StreetLamps.Collections.LampCollection.update(LampCollection.java:155)
    at de.bukkit.Ginsek.StreetLamps.Lamps.Provider.SuperProvider.update(SuperProvider.java:47)
    at de.bukkit.Ginsek.StreetLamps.Collections.BuilderCollection.update(BuilderCollection.java:75)
    at de.bukkit.Ginsek.StreetLamps.Listener.SLBlockListener.onBlockPhysics(SLBlockListener.java:88)
    at org.bukkit.plugin.java.JavaPluginLoader$25.execute(JavaPluginLoader.java:413)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
    at net.minecraft.server.World.k(World.java:443)
    at net.minecraft.server.World.applyPhysics(World.java:430)
    at net.minecraft.server.World.update(World.java:399)
    at net.minecraft.server.World.setTypeId(World.java:371)
    at org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:127)
    at de.bukkit.Ginsek.StreetLamps.Lamps.Blocks.Bulb.forceOff(Bulb.java:38)
    at de.bukkit.Ginsek.StreetLamps.Lamps.SuperLamp.forceOff(SuperLamp.java:108)
    at de.bukkit.Ginsek.StreetLamps.Lamps.SuperLamp.update(SuperLamp.java:120)
    at de.bukkit.Ginsek.StreetLamps.Collections.LampCollection.update(LampCollection.java:155)
    at de.bukkit.Ginsek.StreetLamps.Lamps.Provider.SuperProvider.update(SuperProvider.java:47)
    at de.bukkit.Ginsek.StreetLamps.Collections.BuilderCollection.update(BuilderCollection.java:75)
    at de.bukkit.Ginsek.StreetLamps.Listener.SLBlockListener.onBlockPhysics(SLBlockListener.java:88)
    at org.bukkit.plugin.java.JavaPluginLoader$25.execute(JavaPluginLoader.java:413)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
    at net.minecraft.server.World.k(World.java:443)
    at net.minecraft.server.World.applyPhysics(World.java:430)
    at net.minecraft.server.World.update(World.java:399)
    at net.minecraft.server.World.setTypeId(World.java:371)
    at org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:127)
     
  10. Say, could you post your config as well?

    This is the last one from my plugin and there are two possible sources which could lead to the NULLPointer. (block and MATERIAL_OFF)
    Code:
    at de.bukkit.Ginsek.StreetLamps.Lamps.Blocks.Bulb.forceOff(Bulb.java:38)
    
    Code:
    38: block.setTypeId(SuperLamp.MATERIAL_OFF);
    
    I think there is something wrong with the MATERIAL_OFF which is loaded from the config when the plugin is loaded.
     
  11. Offline

    Meapa

    Great Mod!
    Although I did a time change and now they don't go with the time D:
    It was night time then i changed it to day time and also with the weather
    This is with a mod called Flatland (a world) they still work but its out of timeing
    u see prob?
    soz if thats not enough information(Working Now)
    The Lights have a little delay in time change but eventually it gets right
     
  12. Offline

    pwnu2387

    Great plugin! I use it in all my towns and stuff.
     
  13. Offline

    thecoolreaver

    fixed, thank you

    you should add it so that it can be just the glowstone and not a stick under it, i have some glowstone in the ground acting as a pathway and when people look down thru the glass they see the stick and my redstone (messy)
     
  14. Offline

    fatmarley

    Code:
    # # #
    # defines when the Lamps turn off/on
    #  manually   - when hit with a REDSTONETORCH (turns off everything else)
    #  daytime    - depending on daytime
    #  power      - the Block underneath the Lamp has to be powered to turn it on
    modes: daytime,power
    
    # # #
    # shall the Lamps react to weather?
    weather: true
    
    # # #
    # bulb material
    on: 89
    off: 20
    
    # # #
    # version of this config (can't touch this)
    version: 1
    I have a screenshot of the pathway i built. It worked the first day and then after a reload half of it turned off. So when i try to reset them, i got the error i posted previously.
     
  15. Offline

    Xlaits

    this would work very well with Redstone Chips and it's Sensor Library.

    Make a photocell to turn the lights on at night.

    Edit:

    And I'm a moron.

    I didn't see that it acts upon it's own Photocell...

    If you need a light sensor at a different area, try Redstone Chips.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  16. Yea okay you have a point, I think I'm going to make this an own lamp. "bottomlamp" or so, since it would not need a height to be saved.

    (If anyone can figure out better names for any lamp, let me know :) )

    Currently I just taje the time of the world and not the light level. But will add this later.

    hmhmhm... Oh well, i think I have to take a look into the source of
    Code:
    net.minecraft.server.World.a(World.java:1630)
    net.minecraft.server.World.a(World.java:1604)
    net.minecraft.server.Chunk.f(Chunk.java:141)
    net.minecraft.server.Chunk.c(Chunk.java:132)
    net.minecraft.server.Chunk.a(Chunk.java:300)
    net.minecraft.server.World.setRawTypeId(World.java:305)
    net.minecraft.server.World.setTypeId(World.java:370)
    org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:127)
    But first I am going to build a row of lamps as you described and see what happens.

    later

    I made two walkways, one with only one line of glowstone and another one with 2 of them.
    Did'nt have any problem restarting the server.
    I'll look into the source now.
    Show Spoiler


    Could you provide a screenshot of yours?

    Code:
    net.minecraft.server.World.a(World.java:1630)
    net.minecraft.server.World.a(World.java:1604)
    net.minecraft.server.Chunk.f(Chunk.java:141)
    net.minecraft.server.Chunk.c(Chunk.java:132)
    net.minecraft.server.Chunk.a(Chunk.java:300)
    net.minecraft.server.World.setRawTypeId(World.java:305)
    net.minecraft.server.World.setTypeId(World.java:370)
    org.bukkit.craftbukkit.block.CraftBlock.setTypeId(CraftBlock.java:127)
    Tha's crap... I hate it when functions are named a,b,c and variables are named i,j,k
    Some code in detail (open)

    This is taken from net.minecraft.server.World.a()
    Code:
    1607: public void a(EnumSkyBlock enumskyblock, int i, int j, int k, int l, int i1, int j1, boolean flag) {
    1620:    ...
    1621:       if (flag) {
    1627:          ...
    1628:          MetadataChunkBlock metadatachunkblock = (MetadataChunkBlock) this.C.get(this.C.size() - k2 - 1);
    1629:
    1630:          if (metadatachunkblock.a == enumskyblock && metadatachunkblock.a(i, j, k, l, i1, j1)) {
    1631:              return;
    1632:          }
    1633:       }
    1634:    }
    1635:
    1636:    this.C.add(new MetadataChunkBlock(enumskyblock, i, j, k, l, i1, j1));
    1637:    ...
    1649: }
    
    
    enumskyblock is an enum and should not be null
    i,j,k,l,i1,j1 are integers and therefor should not be null
    metadatachunkblock is from World.java:1628

    C is an ArrayList which contains MetadataChunkBlocks.
    C is private and it only gets new elements added in line 1636.
    Since I don't get what all those abc methods do ... I don't get the problem :p

    I think it was a serverissue since the only thing I did was
    "Hey WORLD, give me the block at this location."
    then this
    "What? It is null? Oh, nevermind."
    or this
    "Oh great we got a block. Hey WORLD, set this blocks typeID to 20"

    Say, did this happen several times or just once?

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

    olimoli123

    And i wanted to make homemade streetlamps -.-
    good idea :]
     
  18. If you need any additional pattern let me know :)
     
  19. Offline

    fatmarley

    Well, we have yet to reset it, as of now only 3 out of about 30 work as streetlamps.

    This is during creation, the sides were alternated.
    Show Spoiler

    [​IMG]


    There is a glass layer on top to protect the glowstone in this picture, but it was modified a little later.

    This is after a day/night cycle
    Show Spoiler

    [​IMG]
     
  20. Hm, thats strange.
    Show Spoiler

    Ahhaha, while writing this response I could reproduce your servercrash :)
    It was when I changed day/night too fast. Will look into it soon.

    In the new version there will be a bottomlamp (yes, really innovative names on my side).
    Since polelamps have a minheight of 0 right now i'll set this to 1 and convert all poles those poles to Bottoms.
    BottomLamps (open)


    I could not reproduce it again...
    The lines slightly differ from yours (e.g.: Chunk.java:144 isntead of Chunk.java:141) but still it seams to be the same problem. At the same time my timelistener throwed an exception which was not shown in the console but in the log.
    Since the timelistener and the game itself are two threads I have to make the plugin thread save. Well didn't expect this to happen^^
    Could you take a look in your serverlog and say if this happened to you, too?

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

    fatmarley

    Sure, i will pour over it tomorrow.
     
  22. Offline

    thecoolreaver

    i have noticed in from your last post, that the server does seem to freeze and lockup after changing the day and night manually and also in relation to the weather too..

    just saying, i dont have any logs right now as ive been working remotely from my laptop... (cant access my server)
     
  23. couldn't reproduce the issue and wanted to actually _play_ minecraft some time so I loaded the newest version on our server and logged in

    >> I DIDN'T UPLOAD THE NEW VERSION <<

    before uploading I forgot to delete some testing code and ended up with this
    Show Spoiler

    which ended in this
    Show Spoiler


    well ... I thought of playing around with lavalamps in a later version but ... I don't think this will ever happen
     
  24. Offline

    thecoolreaver

    cant you set lava to be stationary (other blockid?)
     
  25. I have the Electric Fence Plugin will this conflict with it?
    By the way this looks like a very neat plugin!
     
  26. not right now^^ that one was an accident :(

    I do not know this plugin. But before I deal with conflicting plugins I have to fix everything concerning my plugin itself.
     
  27. Offline

    Cid

    I have an issue where after a server restart none of the pendants or streetlights work. They are just glass. Is this normal?

    Wasn't sure if I was missing write perms on a file or something.

    Thanks for the help, great plugin!
     
  28. If you have access to the pluginfolder you could check the file lamps.yml in the StreetLamps pluginfolder.
    If you have access to the log take a look. On Serverstart there should be an entry how many lamps of which type are loaded.

    Show Spoiler
    Code:
    2011-07-08 23:07:57 [INFO] [StreetLamps] power enabled
    2011-07-08 23:07:57 [INFO] [StreetLamps] daytime enabled
    2011-07-08 23:07:57 [INFO] [StreetLamps] weather enabled
    2011-07-08 23:07:57 [INFO] [StreetLamps] registered bottom
    2011-07-08 23:07:57 [INFO] [StreetLamps] registered pole
    2011-07-08 23:07:57 [INFO] [StreetLamps] registered ceiling
    2011-07-08 23:07:57 [INFO] [StreetLamps] registered sconce
    2011-07-08 23:07:57 [INFO] [StreetLamps] registered pendant
    2011-07-08 23:07:57 [INFO] [StreetLamps] loaded 11 bottom
    2011-07-08 23:07:57 [INFO] [StreetLamps] loaded 53 pole
    2011-07-08 23:07:57 [INFO] [StreetLamps] loaded 1 ceiling
    2011-07-08 23:07:57 [INFO] [StreetLamps] loaded 1 pendant
    2011-07-08 23:07:57 [INFO] StreetLamps 0.4.5 is enabled

    That's a log of the version I am testing at the moment. But yours should look like this if there were any saved lamps.
    I should add a log entry on disable, too.
     
  29. Offline

    Cid

    Odd... here is my console log...

    Code:
    2011-07-08 14:11:23 [INFO] [StreetLamps] tool: 76 (DataValue)
    2011-07-08 14:11:23 [INFO] [StreetLamps] power enabled
    2011-07-08 14:11:23 [INFO] [StreetLamps] daytime enabled
    2011-07-08 14:11:23 [INFO] [StreetLamps] weather enabled
    2011-07-08 14:11:23 [INFO] [StreetLamps] registered pole
    2011-07-08 14:11:23 [INFO] [StreetLamps] registered pendant
    2011-07-08 14:11:23 [INFO] [StreetLamps] registered ceiling
    2011-07-08 14:11:23 [INFO] StreetLamps 0.4.4 is enabled
    I see no trace of saved pendants in that log and I confirmed that they are just glass again.

    Here are the plugins I am running if it helps.
    DropBonus
    Runecraft 2.7
    Quantum Connectors
    Permissions
    MyHome
    General
    Dynmap
    Blocks on Glass
    Craftipedia

    Let me know what I should try next.

    Thanks!
     
  30. nah, ... i don't know. This looks like the lamps were not saved. At the moment I just display how many lamps were loaded. I'll add an entry of how many lamps could not be loaded/got destroid while the plugin was not enabled.

    *edit* could you take a look at the log again, when it disabled the plugins / stopped the server?
     
  31. Offline

    Cid


    There is nothing in the log regarding stopping anything.

     

Share This Page