Filled Growth Step

Discussion in 'Plugin Requests' started by Alkia, Feb 7, 2020.

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

    Alkia

    Plugin category: Cosmetic/function, i guess?
    Minecraft version: 1.14.4

    Suggested name: DruidStep

    What I want: I'd like a plugin that makes it so whenever a player is standing on farmland (Whether it be seeds/beetroot/potatoes/carrots for example )the farmland will grow with a customisable delay. Bonus would be adding a seperate command to toggle the ability to plant wheat seeds when walking over farmland. And bonus bonus would be having seperate commands for each type of plant too

    Ideas for commands:
    /toggleDruidStep to toggle the actual step
    /DruidStepDelay (seconds) to change the delay.
    /togglewheatwalk to be able to plant wheat as you walk (Replace wheat with potato for example for potato walk)

    Ideas for permissions: Druidstep.toggle and Druidstep.delay Druidstep.wheatwalk

    When I'd like it by: whenever possible, I don't know how hard this is do code, so feel free to take your time with it! :D
     
    Last edited: Feb 7, 2020
  2. Offline

    wand555

    Hey, I can give this is shot.

    EDIT: The way I'm understanding this, each player should be able to set his own delay for growing crops, right? (its not only for admins)
     
    Last edited: Feb 8, 2020
  3. Offline

    Alkia

    Thanks for offering to give this a shot!
    Yep, it should be per player, if that's okay. But if you can't do that, i'm fine with it being globally set :)
     
  4. Offline

    wand555

    Okay, I think I'm done.
    I changed some stuff from your request, but it should still fit.
    This plugin affects wheat, carrots, potatoes and beetroots.

    Commands:
    • /drsettings - (DruidStep.settings) Opens a gui where you can enable/disable the auto replant of crops while walking over them. Also it displays the current growth level of the player. Each crop has its own permission when it comes to enabling/disabling:
    • Wheat (DruidStep.autoPlant.wheat)
    • Carrots (DruidStep.autoPlant.carrot)
    • Potatoes (DruidStep.autoPlant.potato)
    • Beetroots (DruidStep.autoPlant.beetroot)
    • /drspeed [level] - (DruidStep.speed) Sets the growth speed at which crops grow. As of right now the algorithm behind the customized growth is pretty simple, if you insist, I can do it much more detailed. The minecraft wiki states this formular (#growth rate) to determine whether a crop should grow or not. I'm using a slightly modified version. I'm going for the greater good an always pick the best growing conditions and therefore only divide by 2. Furthermore the result will be mulitplied by the level set by the user. This results in a level range from 0 to 13, as an odd >1 is unnessecary, because it will always be true. Setting the level to 0 results in no growth at all. Setting it to 1 results in using the regular, vanilla growth formula. And setting it to 13 means the max. growth speed, which is one "stage" per second. This is the max. because the plugin actually only checks every second (every 20 ticks) whether a player is on a crop or not. If you want I can pump that number down but it could result in more lag overall.
    A player still needs the permission "DruidStep.autoGrow" when he stands on crops so they actually grow accordingly.
    As far as I testet it, the plugin doesn't conflict with the randomTickSpeed, so you should be fine changing that number if you need (except for when a player has his growth speed set to 0, then it won't grow under any circumstances when he stands on it).
    Let me know if you come across any bugs.
    Download
     
  5. Offline

    Alkia

    Thanks for the plugin! Works perfectly!
     
    Last edited: Feb 8, 2020
  6. Offline

    wand555

    @Alkia
    (New version, details were [unfortunately] discussed in dm's)
    The plugin now works with:
    • wheat (DruidStep.autoPlant.wheat)
    • carrots (DruidStep.autoPlant.carrot)
    • potatoes (DruidStep.autoPlant.potato)
    • beetroots (DruidStep.autoPlant.beetroot)
    • netherwarts (DruidStep.autoPlant.netherwart)
    • pumpkins (DruidStep.autoPlant.pumpkin)
    • melons (DruidStep.autoPlant.melon)
    • sugar cane (DruidStep.autoPlant.sugarcane)
    If you want to assign all permission for replanting, you can also use "DruidStep.autoPlant.*".
    I added config support, so now you can set the odds of crops, netherwarts and sugar cane. Furthermore you can set the odds whether even to try to let something grow.
    /drsettings (DruidStep.settings) now is the only command. Everything else works through a GUI.
    Permission for auto growing when standing on it is "DruidStep.autoGrow".
    Permission for changing level is "DruidStep.autoGrow.level".
    Overall this plugin should run more smoothly and is more realistic (e.g. crops need lightlevel of 7 to grow).
    Hope you like it!
    Download
     
  7. Offline

    Alkia

    Just tested it out (sorry for the delay) And it works perfectly!
    Thank you so much for the plugin, and thank you again for putting in the effort to make the GUI + making it run more smoothly + able to grow even more types of crops like sugarcane and melons, and making it more realistic!
     
    wand555 likes this.
Thread Status:
Not open for further replies.

Share This Page