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
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 EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Sry for the late reply, was out furniture shopping I'll do that right away Here ya go AndyMcB1 EDIT by Moderator: merged posts, please use the edit button instead of double posting.
wristdirect Where did you learn about light level? I would like to know how to deal with that in my own plugins
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.
AndyMcB1 rofl Forgot to take out debug stuff XD I'll fix it and reupload it. gomeow There's actually a few get light level methods for blocks. You can check their current light level, their light level from other blocks (like torches) and their light level from the sky.