Realistic Torches
Realistic Torches
Make Torches and Jack-O-Lanterns burn out!
Latest version for DL to the right ( -> ) on the big download button.
Previous version was at: http:dl.dropbox.com/u/7174774/dl/RealisticTorches.jar
Both need Java 7 JRE to run.
Currently ToDo:
- add mySQL support
- add some sort of permissions
Comments:
If you want me to read your comment, place them on dev.bukkit.org, not on curse.com.
The link to the dev.bukkit.org page is: http:dev.bukkit.org/server-mods/realistic-torches/
Video:
v2.2.1:
Plugin's Information:
- You can set Torches to burn out after some time (the time is configurable) or when it's raining (configurable)
- When burned out, it will be turned into a RedstoneTorch or it will be removed (configurable)
- When burned out, it will drop a Stick (configurable)
- You can set Jack-O-Lanterns to burn out after some time (the time is configurable) or when it's raining (configurable)
- When burned out, it will get turned into a Pumpkin
- When burned out, it will drop a Stick (configurable)
- You can turn Pumpkins into Jack-O-Lanterns by punching them with a Torch (configurable)
- This will cost you 1 Torch (configurable)
- You can turn RedstoneTorches into Torches by punching them with a Flint and Steel (configurable)
- This will cost your Flint and Steel 2 durability (configurable)
- This will cost your Flint and Steel 2 durability (configurable)
Config:
(will be automaticly generated if there isn't any)
#torch: # turnIntoDisabledRedstoneTorch: true Turn the torch into a disabled-redstone-torch instead of removing it? # dropStick: false Drop a stick when the torch is removed? (or when the disabled-redstone-torch has been destroyed) # burnoutDelay: 86400 Time before the torch will be removed (in seconds, 86400 = 1 day) # weatherExtinguishesItem: true Does rain destroys torches? # #jack-o-lantern: # dropStick: true Drop a stick when the Jack-O-Lantern will be transformed into a pumpkin? # burnoutDelay: 604800 Time before the Jack-O-Lantern will be turned into a pumpkin (in seconds, 604800 = 1 week) # weatherExtinguishesItem: false Does rain turns Jack-O-Lanterns into pumpkins? # # #pumpkin: # lightWhenPunchedWithTorch: true Turn a pumpkin into a Jack-O-Lantern when the pumpkin is punched with a torch? # howmanyTorchesDoesLightingCosts: 1 Howmany torches will the player lose when he lights a pumpkin? # #disabled_redstone_torch: # lightWhenPunchedWithFlintAndSteel: true Turn a disabled-redstone-torch into a torch when the disabled-redstone-torch is punched with a flint-and-steel? # howmuchDurabilityWillLightingCost: 2 Howmuch durability will the flint-and-steel lose when the player uses it to light a disabled-redstone-torch? (a flint-and-steel has 65 durability)
Known Bugs:
- none known at the moment
Requests:
If you want an extra function (or something made configurable), just ask me and I'll add it that option to the config!
Credits:
- NeatMoster made RealisticTorches v1.4.1 (last updated: 22 Oct 2011) and gave me the sources, which caused me to start creating Bukkit plugins. Without him, I would have never created a Bukkit plugin.
No longer working on 1.2.4-R1.0 (RB). Attempted wiping the save data and config as well, no luck. Error follows:
09:48:26 [SEVERE] Error occurred while enabling RealisticTorches v2.3.2 (Is it up to date?) java.lang.NullPointerException at java.util.Hashtable.containsKey(Unknown Source) at zwarmapapa.RealisticTorches.Data.jackOLanternExists(Data.java:172) at zwarmapapa.RealisticTorches.Data.removeJackOLantern(Data.java:193) at zwarmapapa.RealisticTorches.RealisticTorches.dataRemoveJackOLantern(RealisticTorches.java:403) at zwarmapapa.RealisticTorches.RealisticTorches.removeJackOLantern(RealisticTorches.java:557) at zwarmapapa.RealisticTorches.RealisticTorches.checkAndStartAllJackOLanterns(RealisticTorches.java:343) at zwarmapapa.RealisticTorches.RealisticTorches.checkAndStartAllTimers(RealisticTorches.java:287) at zwarmapapa.RealisticTorches.RealisticTorches.onEnable(RealisticTorches.java:47) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:336) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:250) at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:232) at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:374) at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:361) at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:187) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
@JoneKone
Hmm strange, getting any errors?
Have you enabled it in your config file?
Does the bug also happens when you disable all other plugins?
If I know the cause of this bug, I'll probably be able to fix it.
In 1.2.3r3
I can't restart extinguished torches.. With Flint and steel
@chessmaster42
Hm yeah, I fixed enough of his bugs to re-implement the multiworld config now.
I'll add it soon, it shouldn't be hard, I just gotto find the time to do it.
When will you have multiworld configuration re-implemented? I noticed that you removed it when you ported the source from the old plugin.
Thanks!
It does work up to a point with 1.2.3
But i can feel some bugs...
Hey, thanks for continuing this. I'll let other people know about it.
@deleted_6886149
Thanks for letting me know.
After I read your comment I started looking trough all code, and I found a bug where rain won't do anything with torches/lanterns when the plugin was still checking all chunks on server startup.
It is fixed in v2.3.2.
@Royalgamer06
Light in hand: http:dev.bukkit.org/server-mods/torchlightplus/
The torches isn't Extinguishing in rain.
Config
Using version 2.3.1
@notcam45
Sorry, I didn't see your comment before.
The answer is: ehm no, check the video, it stays an disabled redstone torch.
It does this by doing this:
Very cool! Thanks for the quick reply.
@sheepwool7
It only loads the chunk (when it isn't already loaded) of a torch/lantern when a timer of that torch/lantern starts.
It won't load chunks when the timers are running, only when they start.
This won't take allot of CPU, since chunks are load very fast, and the timers last 10 hours (or the time a torch/lantern still has left before burning out).
Does it start the countdown only when the chunk is loaded? I'm worried this would take a lot of CPU.
What happens if a player places a switch next to burned out torch and flips it. Does it then become a red-stone torch?
@gabizou
I believe it will run fine, it will only cost you some CPU for like 5 minutes after your server has been started.
I'll increase the torch/lantern timer to increase the performance even more, since a fast timer isn't needed much anymore.
Timers info:
@zwarmapapa
How does the performance do with about 3k torches around a 1000r map? Curious because I've been wanting lanterns (promised way back in Halloween Update and I remember when we were all disappointed in that) but so far I haven't gotten a plugin that attempted to do such a thing (nor did I think of using one for performance aspects). But in general, does this hold well after a server online for a day with thousands of torches?
I just uploaded v2.3.0, which improves performance of this plugin allot!
It is now allot more lightweight without losing any functionality, because most of the work gets done at server startup now.
This won't slow your server startup down, because it's been put into a thread, it will only increases your CPU usage on server startup.
@deleted_6886149
Ah thanks, I know what the error is, and I'll fix it asap.
Edit: The error was caused because the data file contained incomplete information (probably because the server was closed when the plugin was busy), this has been fixed in the latest version.
Getting this error:
Edit: This is before to. So you see I am using the newest version.