Name: SpreadingLilypads(in the title) Category: NoOneCares Perms: None(as a lily-pad isn't a player) Description: Up there People who might be interested in coding it: RingOfStorms , np98765 , hawkfalcon, JOPHESTUS
I <3 your description. :3 But yeah, I actually am really busy... And I think this would require a lot of math, and math takes time... np98765 != your plugin dev
WTH why not? I will try to do this! One thing; anyone know an easy way of saving hashmaps? But yeah, I will do this!
Code: /** SLAPI = Saving/Loading API * API for Saving and Loading Objects. * You can use this API in your projects, but please credit the original author of it. * @author Tomsik68<[email protected]> */ public class SLAPI { public static <T extends Object> void save(T obj,String path) throws Exception { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(path)); oos.writeObject(obj); oos.flush(); oos.close(); } public static <T extends Object> T load(String path) throws Exception { ObjectInputStream ois = new ObjectInputStream(new FileInputStream(path)); T result = (T)ois.readObject(); ois.close(); return result; } } Example implementation of this API: I'm skipping some part of code in this source public class Example extends JavaPlugin { private ArrayList<Object> list = new ArrayList<Object>(); public void onEnable() { try{ list = SLAPI.load("example.bin"); }catch(Exception e){ //handle the exception e.printStackTrace(); } } public void onDisable() { try{ SLAPI.save(list,"example.bin"); }catch(Exception e){ e.printStackTrace(); } } } NOTE: I did NOT make this, I got this from the bukkit wiki.
Found this more difficult than I anticipated... I have got the maths bit in my head but finding the other bits a little tricky... Sorry to say this but anyone want to do instead?
if raining.. bla bla random number loop, if number = some number then lilly pad randomly grow in +1/2 in x or z direction (use rnd numbers etc). Simply check for a water source block and then change the block about to a lilly pad. That was the most pseudo code ever
Yeah got that bit, it was getting the lilypads that was the problem. I have how to do it in my head <nonsense>and stuff but you know like innit yeah.</nonsense>
this shouldn't be too hard... if it's raining, loop through the players ont the server in a 4 chunk radius, check if there are anylylipads near if so, then decide whether or not that lilypad should create one near it (if the block under it is water and there is not already a lilypad there) done.
Come on people! Warmaker helps us when we need help? He helps when we request stuff so why don't we help him when he needs help?
I'll tell you how... simply download this guys brain into your head and you're ready to fullfil WarmakerT's request.