SpreadingLilypads

Discussion in 'Archived: Plugin Requests' started by WarmakerT, Sep 11, 2012.

  1. Offline

    WarmakerT

    Makes lily-pads spread if it's raining, just like flowers.
    --Small and simple description ( :3 ) --
     
  2. Offline

    Vandrake

    Flowers spread with rain?o.o never noticed xD ahah
     
  3. Offline

    Woobie

    Small and simple description.. and still you had to edit it 2 times..
     
    chasechocolate likes this.
  4. Offline

    WarmakerT

    Typed lilypad wrong, and ( :3 ) turned into a smiley. So yeah '-'
     
  5. Offline

    np98765

    I hate when it does that. -_-
     
  6. Offline

    RingOfStorms

    Format Format Format! ^_^ haha
     
    np98765 and Max_The_Link_Fan like this.
  7. Offline

    WarmakerT

    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
     
  8. Offline

    hawkfalcon

    You seriously think I have time? ;p lol jk, but I really don't.
     
  9. Offline

    np98765

    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
    :'(
     
  10. Offline

    RingOfStorms

    Math takes lots of time O_P ?
     
  11. Offline

    np98765

    Figuring out the math would take lots of time. ^_^
    (I've never worked with much math in Java)
     
  12. Offline

    bobacadodl

    Umm this really doesn't require much math at all...
     
  13. Offline

    WarmakerT

    Hmm.... Bump
     
  14. Offline

    Hoolean Retired Staff

    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!
     
  15. Offline

    bobacadodl

    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.
     
  16. Offline

    Woobie

    I already can think of some uses for this... BUD Switches activated by rain =D
     
  17. Offline

    WarmakerT

  18. Offline

    Hoolean Retired Staff

    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?
     
  19. Offline

    RingOfStorms

    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 :p
     
    chasechocolate and Woobie like this.
  20. Offline

    Hoolean Retired Staff

    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>
     
  21. Offline

    WarmakerT

  22. Offline

    dillyg10

    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.
     
  23. Offline

    WarmakerT

    Can you do it? :D
     
  24. Offline

    WarmakerT

  25. Offline

    izak12345678910

    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?
     
  26. Offline

    np98765

    Because I don't know how. :confused: :p
     
  27. Offline

    Woobie

    Go ahead, show us the way.
     
  28. Offline

    sharp237

    I'll tell you how... simply download this guys brain into your head [​IMG] and you're ready to fullfil WarmakerT's request.
     
    Woobie likes this.
  29. Offline

    Woobie

    codename_B ?
     
  30. Offline

    sharp237

    Well I guess codename_b could be Bill Gates, but then again... so could you! :eek:
     
    np98765 likes this.

Share This Page