Realistic Torches v2.3.3


  • Filename
  • Uploaded by
  • Uploaded
    Jan 26, 2013
  • Size
    43.98 KB
  • Downloads
  • MD5

Supported Bukkit Versions

  • CB 1.4.7-R0.1
  • CB 1.4.5-R1.0


Posting fix by Xaanos (thanks Xaanos) to support latest CB recommended version (1.4.5 R1.0) and Beta version (1.4.7 R0.1) I ran a basic sanity test (load and search chunks) on both builds and saw no crashes.

Because someone had problems with torches not going out by rain, I looked trough the code again, and this is what I fixed:

  • rain now works when this plugin is still searching trough all chunks (on server startup)

This plugin could be improved even more:

  • increased the torch/lantern timer to 10 hours

This plugin was very CPU costly, so I made the following changes to fix that:

  • increased the timer checks from 15-30 sec to 1-2 hours, this way your server won't load all chunks every 30 seconds
    • to fix the weather issue created by this, weather change calls a function which checks all torches/lanterns (in a thread so it won't lag the server)
  • the plugin won't do anything onChunkLoad anymore

Because some people closed their server while this plugin was running, their torch/lantern data got corrupted. To fix this, I made the following changes:

  • if a block's data is incomplete, it will say the block is invalid (and remove it from the torch/lantern data file

I didn't know Threads were usable in bukkit, so I made the following changes:

  • I've put the startup code in a Thread
  • I've enabled onPlayerLogin again, and I've put that code in a Thread


  • made it work with 1.1-R6
  • fixed the rain shelter check, it will use the same check as minecraft (if it shows rain on that block, it will put torches/lanterns out), this means some strange blocks (like trapdoors and signs) also stop rain
  • removed the check-for-torches/lanterns on server startup, your server will now startup as fast as without this plugin

With maybe more files incoming, some data, some config, it would be better if all data files (the "DON'T EDIT ME" files) will be put into another folder, so:

  • data files will now be created in "plugins/RealisticTorches/SaveData/" (you have to more (or remove) the old ones manually)

When you had allot of torches/lanterns when the server starts up, all the torches/lanterns timer will be the same, so it would give a small lagspike every 15 seconds. To fix this, I've made the following change:

  • all torches/lanterns will get a random check interval (between 15 and 30 sec)
    • this will cause the checks to be spread out over the server ticks

I found out how minecraft checks if there is rain on a block or not. I used this method to do the same with torches/lanterns. Changes:

  • torches/lanterns will now only go out when there is rain on that block
  • decreased a torch/lantern's rain-check interval from 20 sec to 15 sec

Ehm... the plugin checked all loaded chunks on weather change, this caused 10-20 sec lag spikes when the weather changed, so:

  • disabled the check-all-blocks-on-weather-change action
  • torches/lanterns check every 20 seconds (and when placed) if they are in a rainy block or not

While thinking of a way to fix the 'rain trough glass' bug, I found a solution (and I found a bug which I now fixed):

  • fixed a bug where sheltered torches/lanterns would burn out by rain, and non-sheltered torches/lanterns wouldn't
  • the plugin now checks if there are glass blocks above the torch/lantern (for rain)
    • when there is a glass block above the torch/lantern the rain won't hit the torch/lantern
    • if the glass block is higher than 5 blocks above the torch/lantern it won't have an effect

I wasn't satisfied by the fact that you could turn a torch into a redstone torch, so I made the following change:

  • burned out torches (disabled-redstone-torches which are saved in a file) will drop a stick instead of a redstone torch
    • by putting torch.dropStick to false, it won't drop a stick, it will drop nothing then

Made allot of changes, I went trough every line of code to clean it up, here are the main changes:

  • torches can now be turned into disabled redstone torches when burned out (configurable)
  • redstone torches can now be turned into torches by pounching them with flint and steel (configurable)
    • you can change howmuch durability this will cost from your flint and steel
  • rain will now only burnout torches/jack-o-lanterns when that block's light-from-sky level is above 12
    • this caused a bug: glass won't protect your torches/jack-o-lanterns from rain (leaves do)
  • the config files will now save every 10 seconds (instead of every change), they will also be automatically saved when the server stops
  • on server startup, the server checks if all saved torches/jack-o-lanterns still exist
    • this will increase the server startime by about 15-20 seconds
  • the server now loads/saves the placement time of the torch/jack-o-lantern correct
  • added a data file for redstone torches (was needed, because changing a block near a deactivated redstone torch made it activated)

I found it annoying to change flying Pumpkins back to Jack-O-Lanterns again, so I made the following changes:

  • you can now change pumpkins to jack-o-lanterns by punching them with a torch
  • you can enable/disable this
  • you can choose howmany torches it will cost to do this

This is the first version I changed/updated from RealisticsTorches. These are the changes/fixes I made:

  • changed the name from 'RealisticsTorches' to 'RealisticTorches', since the 's' after 'Realistic' was probably a mistake (also counts for the folder name)
  • removed the option to choose which world it would be active in, this plugin is now active in every world, always
  • removed the 'ItemToDrop' and 'drop', added 'dropStick', explanation:
    • Torches will now always get removed when burned out, and drop a stick if 'torch.dropStick' is true
    • Jack-O-Lanterns will now always turn into a pumpkin when burned out, and drop a stick if 'jack-o-lantern.dropStick' is true