[MECH] Portable Torches v1.04 - Portable Headlamp Lighting [740]

Discussion in 'Inactive/Unsupported Plugins' started by FuzzeWuzze, Mar 23, 2011.

  1. Offline


    Portable Torches:
    Version: v1.04

    This is a plugin to allow a player to have a headlamp type torch light that lasts for some set amount of time following them around and lighting up their surrounding area for them to work deep in the mines or out in the wilderness at night.

    I got the idea and some of the lighting code from Ryan Carretta's TorchBurn plugin(mucho props)
    I needed something like this for my new hardcore world that uses Towny, because i didnt want people building outside of towns, and i didnt want the entire landscape to be scattered with torches as they always do, thus making the survival part of the game trivial. This allows people to go mining deep underground with a stack of torches and still be able to see.

    How it works
    -Player equips a torch and left clicks.
    -1 torch is removed from the stack and the player is lit up
    -After the server set lightTime expires, their light will turn off

    • Allows players to create a torchlight that will follow them around while mining or out in the wilderness
    • The ability to alter how long the torches last, as well as how bright and far they radiate(default is good ive found). Intensity = light brightness, falloff = rate the light falls off. The radius the light will spread from the player is intensity/falloff.
    • Permissions Support
      • PortableTorch.Allow, without this permission a player cannot use this mod. If Permissions is not installed, everyone can.
      • PortableTorch.Permanent, allows a player to have permanent light. Also does not consume a torch. Light still dies if you place a torch to prevent possible lighting bugs.
    Config File

    • Intensity Limits 0 - 15
    • Falloff Limits 0 - 15
    • lightTime: 400 = About 20 seconds
    Download The Plugin

    Be sure to extract the PortableTorch folder into your Plugins folder as well, theres no code to create the config if its not there
    For CB740

    Version 1.04
    • There was a bug in those that had Permanent torch abilities, the torches werent moving with the player! This has been fixed.
    • Updated CraftBukkit
    Version 1.03

    • Added Permission PortableTorch.Permanent to allow a player to have light always. Lights still turn off upon placing a torch to prevent possible lighting bugs.
    Version 1.02

    • Bukkit made changes to how player interaction is done, fixed those.
    • Players now left click to use torches, and it will go off thanks to new Bukkit hooks. No more right clicking and accidentally placing a torch.
    • Trying a fix for block placement bug, when someone places a block their light may still flicker off but it should immediately turn back on. Need to see if there's some way i can block the client from updating lighting on block placement.
    • Fixed bug related to players having queued tasks to kill their current torch triggering after they already used a new one(causing it to go out quicker than it should).
    Version 1.01

    • Code Cleanup
    • Permissions Support - PortableTorch.Allow, without this permission a player cannot use this mod. If Permissions is not installed, everyone can.
    Version 1.0

    • Initial Release

    • Permissions Support
    • Add more settings to config file
    • Fix bugs related to blocks moving(sand/gravel falling) killing the torch.
    • Fix bug related to placing a block killing the light
      • Taking Feedback if players like the relighting when blocks are placed method. Right now it should immediately attempt to relight the area after placing a block. I'm not sold on it right now and almost prefer to just keep it to relight on move, when in really dark areas placing blocks can make the light flicker on and off in a seizure inducing event if your placing blocks fast. Until i can find a way to block the client from redoing the light calculations.

    • Upon placing a block your light turns off until you move - Needs to get fixed asap
  2. Offline


    Please dont abandon this :(
  3. Offline


    I wont be, ill be hopefully updating this for RB818 after i get my other plugin(Towny) up and running.
    embty, Kartus and kahlilnc like this.
  4. Offline


    SOUNDS GREAT !!! Thanks boss ! ...
    (a week later) soo ummm no update yet :confused: c'mon fuzze you got this !

  5. Offline


    awaiting the update
    this goes perfectly with the dungeon plugin! :D
  6. Offline


    You should make an option where the torches last forever. Nice Plugin!
  7. Offline


    Would it be possible to have the torch slowly "fade out" after 50% of the time is up?
  8. Offline


    I think the plug has been abandoned :(
    anyone know of a working flashlight or portable torch plug ?

  9. Anyone know what this is gonna be updated to 860?
  10. Offline


    Looking forward to that!
  11. Offline


    second this
  12. Offline


    Fuzze....have you left us out in the dark?
    Justinwiz likes this.
  13. Offline


    Can you update PPPLLLEEEAAASSSEEE !!!!! :'(
  14. Offline


    I'm also having this problem, after placing a torch you can destroy it with an item other than the torch and it works fine but when you destroy a torch with a torch in hand the light still remains if I walk away from it. It still stays even when I disconnect and reconnect.
  15. Offline


    Sorry fuzzball. Looks like I'll be removing this plugin :(
  16. Offline


    OMG He left us stumbling in the dark!!! :'(
  17. Offline


    Hot damn...
  18. Offline


    Hey man, any chance you could find some time to update this? Would be great!

    Its a very nice plugin!
  19. Offline


    OW ... me and my premium users have been stubbing our toes for weeks , cmon fuzze it hurts....
    :'( it really hurts... everything is all blocky...
  20. Offline


    Hey everybody! I took the liberty of decompiling his plugin, and checking out his source code.
    Within today I'll either have a fix for the plugin, or I'll give up and shoot it around the web.
    Here is the entire source, if you're handy with java.

    [EDIT] Well, I fixed it up a bit, made it look nice to me, and made it "work", so there are no errors or major issues... However, the lighting acts a little funny, and you'll have a barrier of light surrounding you sometimes, even if you don't have a torch equipped. If you are desperate, or need something to work from besides the link above, here is my somewhat working version of the plugin, that has no serious problems. Thanks are appreciated. :)
    GasP likes this.
  21. Offline


    awesome. seems to work. at one point outside a few random areas around me got lit up, but placing the torch and walking around a little cleared it up. thanks for this =)
    insanj likes this.
  22. Offline


    Thanks insanej works fine :)
  23. Offline


    You should make it so torches can only be used if you are wearing a gold helmet(customizable) once torch is activated, helmet degrades slowly and then torch goes out. If you can figure that out then you will be amazing
  24. Offline


    UPDATE PLS !!!!!!!!!!!!!!!!!!!!!!! :'(
  25. Offline


    It lights up all half steps that are actually half a block... (not double stacked ones) dont know why...
  26. If the admin group has the wildcard of '*', how can I disable the permanent torch?? I tried the below code but it didn't work
    - '*'
    - -'PortableTorch.Permanent'
  27. - '*'
    - '-PortableTorch.Permanent'
    Should do the trick quite nicely.
    insanj likes this.
  28. Sorry, still doesn't work, I think i might wait for a newer version :)
  29. Offline


    Try this, in the meantime.
  30. Haha thanks man, but I've already got that one installed :) I was hoping to try get both working, cuz the torchlight mod only provides light if you have it in your hands
    insanj likes this.
  31. Offline


    ..Does it still work?

Share This Page