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

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

  1. Offline

    FuzzeWuzze

    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

    Features:
    • 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
    http://dl.dropbox.com/u/2798684/PortableTorchV1.04_CB740.zip

    Changelog:
    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
    TODO:



    • 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.
    BUGS:



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

    Crooker

    I did it three time now, still not working.

    Anytime i upload the PortableTorch.jar and the PortableTorch and try Left-Clicking in-game to light the torch, it just won't work. We don't have any permission plugin on the server so it actually should be working, but unfortunately it just doesn't. Can anyone help me to solve this? We really want to have that Plug-In.

    Crooker.
     
  3. Offline

    RedFox071

    Bjourk likes this.
  4. Offline

    ronelee

    How does this work in-game? because i can't figure it out....
     
  5. Offline

    Machete.Panda

    Hi FuzzeWuzze,
    Great plugin, a little glitch in the neither but otherwise I enjoy it. I want to use your HeadLamp plugin with BlockHat so that if you put a lit pumpkin on your head it uses the headlamp automatically. How do I do this?

    Also... is this working with the official CB release #1597 as you intended? I ask because I didn't see the build mentioned in your post.
    Thank you,
    ~MP
     
  6. why not place an glowstone for an player under his feet by Player.sendBlockChange(Location loc, Material material, byte data) , to fix the blinking light effect
     

Share This Page