Place/Remove Torches in a specified /command radius?

Discussion in 'Archived: Plugin Requests' started by Malkuno, Nov 7, 2012.

  1. Offline

    Malkuno

    Hey guys, I'm looking for a plugin which would allow an Admin/Moderator to place torches in a specified radius to quickly light up dark underground caves/caverns & prevent monsters from spawning in them. A plugin like this would be extremely helpful for making efficient Monster Traps.

    Here's what I'm looking for,
    • When you type a command, the game would use an algorithm to check the brightness level of all blocks in the specified area. If any blocks are below light level (9?), it would then check to see if a torch can legitimately be placed at the location. If both checks succeed then a torch is placed.
    Example:
    /placetorch <radius>

    Which would would place enough torches in the specified <radius> to prevent mobs from spawning.
    A command to remove the torches would also be nice, if anyone decides to pick this request up.

    Thank you,
    Malkuno
     
  2. Offline

    Malkuno

    I'm still looking for someone to pick this up. =)
     
  3. Offline

    Malkuno

    Extending my desire for this plugin this plugin to be made, onto day 3!
     
  4. Offline

    wristdirect

    Hey so I started to work on this, and I have it partially finished. So far, it places torches in a square with side length radius*2 (I can eventually do a circle, but for now this'll do, it is way easier). It also makes sure that the block is something you can place a torch on (which is not as easy as it would seem...there's no Bukkit call for it so you have to get into ugly CraftBukkit code).

    Now I just have to do the checks for lightning. Never done that before, so hopefully it's not hard to do :)

    Okee dokee, here's the new BukkitDev page for Torched.

    (here's the link to the file, it's still being approved)

    I'll be in the car for the next hourish, but I'll put more info on the page after that.

    For a quick reference until then, the commands are:
    /torched radius
    and
    /torched remove radius

    Enjoy :D

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

    AndyMcB1

    Can you make it output to the player how many it placed?
     
  6. Offline

    Malkuno

    Awesome, I'll give it a try when I get a chance.. I greatly appreciate this.

    Thank you!
     
  7. Offline

    wristdirect

    Sry for the late reply, was out furniture shopping :confused:

    I'll do that right away :)

    Here ya go :)

    AndyMcB1

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

    gomeow

    wristdirect
    Where did you learn about light level?
    I would like to know how to deal with that in my own plugins
     
  9. Offline

    AndyMcB1

    Light is client side.. I was wondering this too.

    Heh. Check the output for removing torches..
    In the first exception
    In the remove if
    Torched area with x blocks

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

    wristdirect

Share This Page