Inactive [MECH] Lampstone/Timeblock v1.0 - Automatic night-time ANYTHING [1060]

Discussion in 'Inactive/Unsupported Plugins' started by Izze, Mar 4, 2011.

  1. Offline

    Izze

    Lampstone - Automatic night-time lamps ANYTHING
    Version: v1.0

    This plugin lets you place any block which turn into another block type in the morning, and then turns back into the first block type in the evening. This lets you build nice looking lamp posts which turn themselves off in the morning and stuff like that.

    Feutures:
    • Adds the /lampstone command, which enables and disables lampstone mode
    • Use any block type for both day and night.
    Screenshots:
    [​IMG]
    [​IMG]

    Screenshots taken with a modified version of Painterly pack, to match glowstone and glass texture.

    Download Lampstone v1.0 here!
    (Mirror)

    Instructions:
    1. Download Lampstone.zip above
    2. Open Lampstone.zip
    3. Place everything inside Lampstone.zip in your plugins folder. This should include: Lampstone.jar and a folder called Lampstone, with the files called lampstoneLocations.yml and lampstoneProperties.yml inside.
    4. If you want to change the default properties, open up lampstoneProperties.yml.
    5. In lampstoneProperties.yml, change numbers behind blockDay and blockNight to your liking. (It should be block IDs, default is 20 (glass) in the day and 89 (lightstone) in the night.)
    6. Save lampstoneProperties.yml (if you changed it) and run the server
    7. To enter lampstone mode, enter "/lampstone" in the chat
    8. When in lampstone mode, place a block of the type you specified as blockNight in lampstoneProperties.yml anywhere. If you didn't change any properties, this is a glowstone block. A message in the chat should tell you that a lampstone block has been created.
    9. If you want to use another block combiantion than the defaults (the ones in the configuration file), you use the command like this:
      /lampstone [blockDay] [blockNight]
    10. To exit lampstone mode, simply enter "/lampstone" in the chat again
    Permissions:
    • Lampstone.create (self-explanatory)
    • Lampstone.break (self-explanatory)
    Changelog:
    Version 1.0
    • You can now select any block type for both day and night.
    Version 0.8
    • Fixed a lot of bugs reported by xGhOsTkiLLeRx.
    Version 0.6
    • Checks if the chunk is loaded before it tries to change the block type of a lampstone.
    • Tells you how many lampstones that were loaded at server startup.
    Version 0.5
    • Console outputs a message if it fails to load a block from the lampstoneLocations.yml file. This is for bug catching purposes.
    Version 0.4
    • Fixed bug where properties didn't work. Thanks to SuperThaTom for telling me.
    • Checks so that your properties are valid on initialization.
    Version 0.3
    • Fixed bugs
    • Files creates themselves
    • Warning: BREAKS YOUR V0.2 LAMPSTONES!!
    Version 0.2
    • Added lampstoneProperties.yml
    • You can now choose which blocks should be lampstones
    Version 0.1
    • Initial release
    Known bugs:
    • If you forget to create or remove the contents of lampstoneLocations.yml, the plugin will fail to initialize. Help needed and appreciated! Fixed with help from Nohup! Many thanks!
    • Breaks after a while for some people.
     
    Emiya Shirou, nova779 and MuttsNuts like this.
  2. Offline

    Izze

    [​IMG]
    The numbers in the red rectangle tells you which build you are running. :)
    There shouldn't be a limit. What happens if you try to place another lampstone block after you've reached this limit? And what is the limit, roughly? Is it like 10 or is it like 100 lampstone blocks? Thanks for posting bugs! :)

    I have to rewrite some parts of this plugin. I'll try to update it soon.
     
  3. Offline

    Lolf

    its b432 and as i can see now theres an error: "Could not load lampstone.jar blablaa"
     
  4. Offline

    ThomasJ

    If your plugin depends on block.getType(), this bug is probably to blame: http://leaky.bukkit.org/issues/467
     
    Izze likes this.
  5. Offline

    Lolf

    okay, sorry xD fixed the bug by loading the newest version of bukkit

    edit: maybe could make it able for 432? most other plugs arent working on the newest version :(
     
  6. Offline

    Izze

    Thank you so much. This explains a lot. Let's hope it gets fixed soon.
    What errors do you get in b432?

    @Everyone Also, I've started the plugin successfully with b522, but I haven't got time to test it anymore than that.
     
  7. Offline

    ThomasJ

    Really, if your plugins have not been updated to work yet, they are likely not going to be.
    493 was recommended one week ago, and the changes introduced between the last recommended build (440) and 493 was that broke plugins was announced one month prior to 493.

    Current recommended build is 522. I'd start looking for alternative plugins that do what you need if they have been abandoned by their authors personally. But each to their own.

    I use more than a handful of plugins, and all of them worked just fine with 493. Most plugins with active authors do.
     
  8. Offline

    Lolf

    for example mywarp, myhome, authorize, blockhead, .. (those arent all, but the list is long :3)
     
  9. Offline

    ThomasJ

    MyWarp: Works/Updated
    MyHome: Works/Updated
    Authorze: Looks abandoned
    Blockhead: Works/Updated

    And with the major exploits in all versions lower than 527 there really is no reason not to update to the current recommended build of 530.

    If authors haven't bothered to update for the changes that occured back in build 450ish which was announced one month before it occured, it's not likely they ever will. But you are welcome to do as you please with your own server. But don't expect plugin authors to keep things compatible with outdated versions which are no longer recommended or supported.
     
  10. Offline

    Izze

    Thanks for this information. :)

    I've now updated the plugin to fix some bugs and stuff. I've tested it with build 531. This time you don't need to create a folder and files for it to work, you just place the Lampstone.jar in your plugins folder, and it'll create all the necessary files by itself! Many thanks to @Nohup for helping me with this!

    ALSO:
    This update breaks your v0.2 lampstoneLocations.yml. It wont work anymore. I'm very sorry for this. To use the new version, please delete/rename your old lampstoneLocations.yml, or the plugin won't work. Again, I'm very sorry for this.
     
  11. Offline

    Neoblade298

    It is approximately 30 lampstones, give or take. Afterwards, when I place another one, sometimes it works and turns into glass during the day, but STOPS turning to lampstone during nighttime. And other times, the text saying I've placed it isn't there altogether. I'll count the exact amount of lampstones if needed.
     
  12. Offline

    Phaedrus

    bukkit 531
    Code:
    18:59:31 [SEVERE] null loading Lampstone v0.3 (Is it up to date?)
    java.lang.NullPointerException
            at org.bukkit.Location.getBlock(Location.java:73)
            at se.Izze.Lampstone.SaverAndLoader.loadBlocks(SaverAndLoader.java:95)
            at se.Izze.Lampstone.Lampstone.onEnable(Lampstone.java:51)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:451)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
     
  13. Offline

    Harrison Smith

    It appears that using beds breaks the recognition of nigh/daytime. I've had several lampstones work until we used beds to reset, then they stay on because they were on when day/night values were warped forward... any solution? If there's a way to disable beds I already kinda want to force them back into PvE during nightime construction.
     
  14. Offline

    Izze

    That's odd. I actually check what the world time is to determine if the block should change. That's something that has to be fixed in Craftbukkit, I think. Sorry!
     
  15. This is a really cool really simple mod. thank you
     
  16. Offline

    SuperThaTom

    If you change the lampstone block types in the properties file they dont change in-game
    My lamptstoneProperties file:

    blockDay: 03
    blockNight: 05

    and i also used this one:

    blockDay: 86
    blockNight: 91

    So if i place an jack-o-lantern or wood it doesnt say lampstone block placed, but if i then place a lightstone block it does...

    CB-build= 493
     
  17. Offline

    Izze

    Thanks! I'll try to fix it.
    [MERGETIME="1299949226"][/MERGETIME]
    Fixed. New version is up.
     
  18. Offline

    lokiman72

    you should add permissions, and yes i would like a config for blocks that are lampstones
     
  19. Offline

    SuperThaTom

    Thank you very much it works now :D
     
  20. Offline

    DGreatfox

    My only problem with this, is that when they all change from glass to glowstone the server lag is horrible on a light server. Is there a way to make it so that it doesn't spike my entire server every time it happens? Also, it has patchy areas sometimes where the Lampstone plugin omits and continues on later. Is this happening to anyone else or am I just beaking it? XD
     
  21. Offline

    dak393

    Only request is that you add permission support :D and you could also add your plugin to Crafbukkituptodate Thanks :)
     
  22. Offline

    Izze

    Permissions will be next, then. I'll try to add it to CraftbukkitUpToDate also.

    @DGreatfox I don't know how to make the switch less laggy. All I do is change the type of a block. I don't know if there's a faste method. I'll look into it.
     
  23. Offline

    pagan0ne

    any chance you can also upload the textures for the glass and glowstone your using? im using the painterly pack and cannot find the glass texture, i can find the exact same glowstone one, but the glass looks like it was created custom?

    Nevermind. I went ahead and re-created them. If anyone else wants them there attached here. you just have to edit them into your terrain.png file in your texture pack.
     

    Attached Files:

    Last edited by a moderator: May 11, 2016
  24. Offline

    Mark Harpur

    I have a few glowstones that do not work after the first or second time they toggle. They are in line with many others, and give the "Lampstone Created" message when being made, but they stop responding after a bit. There isn't any other objects of note in the chunk (a few wood, gravel.. it's a dock) and they have the same setup as the others.


    It first seemed like a limit on the number of them, but now looks to be a distance thing..

    any ideas?
     
  25. Offline

    pagan0ne

    ive been playing with this plugin on my server now for a few hours, and have also noticed the "bug" where they stop working. I have looked into distance/limits on the number of stones, but i think it comes down to using worldedit in the general area around the lampstones. whenever im using //copy //paste etc near (but not on) the stones, they seem to randomly stop working in the general area. It would also be nice if there was an easier way to remove lampstones, as they seem to respawn when broken (which is good), even when broken with /lampstone mode ON (which is bad). the only way i have found to REMOVE them is to break the lampstone, and replace it with another block immedently before the lampstone re-spawns.
     
  26. Offline

    DGreatfox

    @Izze That would be great, Also, I just installed 64-bit java and running 3 gigs of RAM with my server. Definitely made the switch oodles less laggy.
     
  27. Offline

    Izze

    It shouldn't respawn at all. It doesn't for me, and I have programmed it so that if it breaks, it is removed from the file and from the plugin.

    Also, I haven't got any idea why the blocks stop working. The list with the blocks is totally static, no changes are made except when you add or break a lampstone block. The code checking the world time just goes through the list och saved blocks, and turns them on and off depending on the world time. I don't know if it doesn't work because blocks get randomly erased from the list, or if my loop skips some blocks. I don't understand this at all. :(

    I will, however, try to fix this. I'll try to recreate it by placing a lot of blocks. I'll post again when I know more. Thanks for telling me about all this! I really want to fix this! :)

    EDIT: WAIT! It COULD have to do with chunks and stuff. If I try to change a block that isn't loaded, maybe it breaks. I'll look into it.
     
  28. Offline

    pagan0ne

    Edit: as long as you dont use "super pick axe" from worldedit or any worldedit commands, you can break and remove lampstones fine... when i switched to another block and broke the lampstone it didnt respawn, i thought it was because i was putting something in its place, but its because i wasnt using super pick axe :^) updated bukkit to the latest nightly and resolved some issues with other plugins and im testing to see if i can replicate issue where lampstones stop working now.

    Ok after a lot more testing, it appears that i am unable to replicate any of my previous bugs after upgrading to the latest bukkit build (b556) available here . Also upgraded craftbook as well (to nightly dev to play with IC's etc) and iZone. The only issue i can see (and i wouldnt call it an issue) is that Lampstone doesn't play nicely with worldedit commands.... //copy //paste super pickaxe etc... however i can imagine that would be extremal difficult to get working? its now 6:50am and i need sleep....

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

    Izze

    Yeah, I don't think that's anything I can control. Maybe if WorldEdit tells me when it tries to move or copy something. Thanks for testing stuff! It it is really appreciated. :)
     
  30. Offline

    dak393

    I think the best thing to do about this is add a simple way to set lampstone blocks ex: /lampset then right click on glass/ glowstone to select the blocks
    Also could you add your plugin to CraftBukkitUpToDate
     
  31. Offline

    xGhOsTkiLLeRx

    Like dak393 said,

    can you create a permanent download link? (With no version info...)
    Maybe only lampstone.jar?

    Because then it would be possible to add this plugin to

    CraftBukkitUpToDate!

    Greets

    EDIT:

    Question:

    What's about mulit-world support?!
    I'm not sure, if it's working or not...
     

Share This Page