Filled Animal Time Spawner Plugin!

Discussion in 'Plugin Requests' started by HarlandRPG, Apr 29, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    HarlandRPG

    Plugin category: RPG

    Minecraft version: 1.7.10

    Suggested name: HarlandTimeSpawn

    What I want: Our Server needs a plugin to create spawner for all various animals. It should spawn for example 5 pigs after 30 min. So that means, every 30 min. there will be spawning 5 pigs at one specific place.
    Also, if possible, animals should only spawn if there are no animals of this kind beeing spawned of the current spawner.
    It will be used so players with the job "butcher" can kill the spawned animals and need to wait some time until they can kill animals again.

    Just for understanding:

    Let's imagine we have 3 pig spawners at different locations.

    PigSpawn A: hast spawned 5 pigs - no pig was killed
    PigSpawn B: hast spawned 5 pigs - 1 pig was killed, 4 pigs left.
    Pigspawn C: has spawned 5 pigs - 5 pigs killed, 0 pigs left.

    What should happen now:
    PigSpawn A: waits another 30min, and does not spawn any pig, because there are still 5 left.
    PigSpawn B: waits another 30min, and does spawn 1 pig, because there are only 4 left.
    PigSpawn C: waits another 30min, and does spawn 5 pigs, because there is no pig left.

    Conclusion:
    There should always be 5 Pigs, and no more left after 30 min.

    Ideas for commands: Commands should only be operated by OP! /createSpawn [name][animal][amound][time]

    Ideas for permissions:

    When I'd like it by: 1-4 Weeks
     
    Last edited by a moderator: Apr 30, 2017
  2. Offline

    ipodtouch0218

    If still required, I could do this plugin for you.
     
  3. Offline

    HarlandRPG

    Hello, yes it is still required :)
     
  4. Offline

    ipodtouch0218

    Should be finished!
    Download here.
    I didn't get time to extensively test, so there may be something wrong somewhere.


    If I missed anything, just post here and I'll fix it ASAP.
    Make sure to set the thread to filled!
     
  5. Offline

    HarlandRPG

    Hi, its only giving me an output telling which command can be used ("/createspawner <mobtype> <amoutn> <time>

    Is it for 1.7.10?
     
  6. Offline

    ipodtouch0218

    @HarlandRPG
    Oh 1.7, I don't think so. I won't be able to use particles (when mobs are spawning) if I'm using 1.11. I'll send a new link to the download when it's compatible.
     
  7. Offline

    HarlandRPG

    Just keep it simple :) Just needs to do what it says on top, and work with 1.7.10.
    Thanks for your work!!!!
     
  8. Offline

    ipodtouch0218

    Here's a version that should be compatible with 1.7. Download Here
     
    HarlandRPG likes this.
  9. Offline

    HarlandRPG

    Bildschirmfoto 2017-05-14 um 15.13.34.png
     
  10. Offline

    ipodtouch0218

  11. Offline

    HarlandRPG

    Wow!! Thank you so much!!

    Hi, I just tried it.. At first it spawns the desired 5 mobs. but after some time there are way to much mobs! :(
    It should check if there are 5 mobs left. if so, there should not spawn any more mobs. If there are for example only 3 left, it should spawn 2 mobs after 30 min.

    Thanks!!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2017
  12. Offline

    ipodtouch0218

    @HarlandRPG
    Strange. It works for me, but I'll see if I can reproduce the error.
     
  13. Offline

    HarlandRPG

    When I go away, there spawn even more animals.
    Did I do something wrong?
    /createspawner pig 5 30
     
  14. Offline

    ipodtouch0218

    Nope, I don't think so. This may be a problem with loading and unloading chunks.
     
  15. Offline

    RithikVaderX3

    @ipodtouch0218
    It maybe fixed if you do this:
    Create a variable which holds the amount of times spawners created. Make a 2d integer array for each spawner which holds the current number of animals there are and the max number of animals that the spawner can have at a time. I don't know if this next part is possible because I haven't worked too much with entities, but whenever an animal spawned by that spawner is killed, decrement the current amount of animals. Check if the current amount of animals is equal to the max number of animals. If it is lesser than the max number of animals, spawn another animas, otherwise don't spawn the animal.
    If you cannot keep track of animals spawned by the spawner, try to adapt this solution to something similar. Hope I could help
     
    Last edited: May 16, 2017
  16. Offline

    ipodtouch0218

    Last edited: May 17, 2017
  17. Offline

    HarlandRPG

    Looking Good :)
     
Thread Status:
Not open for further replies.

Share This Page