Minecraft Spotlight - SolarFurnace

Welcome to the Friday Minecraft Spotlight! In this edition we will feature SolarFurnace, a handly little plugin by socram8888.

The daylight sensor was introduced with the Redstone Update back in March and can be used to generate a redstone signal during the day. As you can imagine, they can already be used for countless purposes, but this plugin makes them even more useful.

Once you have this plugin installed on your server, players can use daylight sensors as an alternative powersource for furnaces. No longer will they have to fuel them using coal and othe rmaterials; except at night of course. On the condition that there is no block, other than glass, located above the sensor, players can now use solar energy to cook and smelt their items!

Simply follow these steps and your players will be enjoying this plugin in no time!

  1. Download the latest version of SolarFurnace from here or here.
  2. Place the "SolarFurnace.jar" file in the "plugins" folder, located in your server's main directory.
  3. Start or reload your server.
  4. Enjoy your newly installed plugin!

We also had the chance to ask socram8888 some questions. Read on to learn more about the development process behind SolarFurnace!

How did you get into Minecraft?
I heard of Minecraft back when the first alphas came out. They had only mining and building, and that wasn't enough for me, so I just passed.
Some years later I read on some forum complaints about how annoying the cats were in 1.2.4, the first version that had cats that sat on chests on purpose. Just for curiosity, I searched on Google for Minecraft, just to see how the things evolved, and saw that awesome tool that is Redstone. I bought the game to try it first-hand, and as playing Minecraft alone is (IMHO) too boring, I looked for an online Minecraft server. I then joined Mine21, a now-defunct Spanish server that was born in that very forum.
What server do you play on, and would you like to tell us more about it?
I haven't played Minecraft in a while. I've been a bit busy playing other games that had been in my TODO list for ages. Sam & Max, for instance.

What made you decide to become a plugin developer?
Well, Mine21 had a very awesome plugin called RedstoneChips. Playing with Redstone alone is fun, but sometimes circuits ends up being way too big to fit inside a wall, for example, or are way too messy. The good thing of RedstoneChips is that it is faster, cheaper and smaller. I built a television, a Russian roulette (you could either earn a useful item like a stack of coal, or die in a lava pit), and a music tracker.
In new year's eve, the admin of the server, knowing how much I like building such things, asked me to build a countdown to midnight. Working with dates with the chips that RedstoneChips had by default was quite hard, so to speed things a bit, I made my first plugin: a RedstoneChips chip that outputs the Unix time rather than days, seconds...
And that's how I became a plugin developer.
What was your motivation for this specific project?
Well, I ended up being the admin of Mine21, and I really wanted the server to have cool features of those Forge servers, but without forcing the users to install a client-side mod. So that's basically why I coded this plugin.
How did the community respond to the plugins first public release?
Well, actually this is the most useful plugin I think I've ever coded, and it was vastly used in Mine21, with over three hundred solar furnaces. Outside the server, it is apparently quite used too, about fifty servers are using it right now.
Approximately how much time did it take to finish the first working version of SolarFurnace?
Being such a simple project, it took me A LOT of time. About two weeks.
Have you come across any problems during development and, if any, how did you handle them?
Yep, I had to (and still have to, actually) cope with a very annoying bug in Bukkit's furnace class. SolarFurnace makes things burn by increasing their burnTime (a counter for the remaining fuel), so when the furnace gets ticked by Minecraft it keeps burning whatever is in the upper slot. However, setting its burnTime does not update the furnace block. So I had furnaces that were burning, but looked like idle furnaces.
To change a Furnace block like Minecraft does, you have to set it inside the tickEntities loop, which isn't possible without extensive hacking (like modifying Minecraft classes). If you set its icon in any other place, they will either lose their orientation, or they will throw the items inside them.
I ended up messing with internal classes by means of Reflection. Those who want to see the result can see it here. It might look simple, but figuring out how to do it was a nightmare. That's why it took me so much time to get the first version running.
What was your favourite development tool for this project?
Notepad++ (at first I used Windows' Notepad) and Maven. Nothing more. For debugging, the good old System.out.println did a good job.
What stage of SolarFurnace's development process did you enjoy most?
Coding the workaround for the annoying bug in Bukkit's Furnace class was quite a nightmare, but that was the most fun part actually. I guess I like challanges :D

And what is your favourite aspect of the plugin itself?
Probably the ease of use. No complex recipes or commands. It doesn't even have a configuration file!
Aside from your own projects, what are some of your favourite plugins from other authors and why?
WorldEdit is a must-have, and PdxTrackRouter (a quite unknown yet good plugin) allows you to build complex subways and train lines, but if I have to choose the one I like the most, I would probably say RedstoneChips!
Do you have any advice for other upcoming plugin developers?
I have two advices that I guess could be quite useful:

One: open source is better than closed source! Releasing a plugin as closed source won't prevent anyone from stealing your code, as there are very good Java decompilers out there. On the other hand, open source lets other programmers add new features AND fix bugs. If someone else fixes a bug in your plugin, that's less work for you!

And two: when in doubt, have a peek at somebody else's code. Sometimes it might be easier to find out how to do something by looking at Minecraft's or CraftBukkit's source code than reading the documentation. And you'll get used to read other's code, too!

Having reached the end of the interview, we would like to thank socram8888 for taking the time to answer our questions and of course for developing the plugin in the first place!

SolarFurnace is a small yet useful addition that makes light sensors even more versatile than they already were. With this plugin, players can use them to power their furnaces during the day. The lack of configuration files also makes it a piece of cake to install.

Thanks to MadPixel for the Minecrafter font.


  • To post a comment, please or register a new account.
Posts Quoted:
Clear All Quotes