Plugin Request Auto Sheers Through Dispenser

Discussion in 'Plugin Help/Development/Requests' started by little_dude187, Jul 4, 2015.

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

    little_dude187

    hey, i would like someone to make a plugin that automatically sheers sheep through a dispenser when activated.

    You can put as many sheers as you want in the dispenser

    Hoppers work with dispensers

    Customizable Radius that the dispenser can pick up (default 1 block)

    /dispensersheer give [amount] [radius]

    ex.

    /dispensersheer give 1 5 5 block radius from the way the dispenser points

    thanks!

    perm:

    dispensersheer.use
     
  2. Offline

    little_dude187

  3. Offline

    Zeinaty

    So basically when you put shears into a dispenser, you want it to basically "use" the shears? Eg: If a leaf block was in front of it and the dispenser was activated, the leaf block breaks?
     
  4. Offline

    little_dude187

    yes, same goes with sheep and shearing
     
  5. Offline

    little_dude187

  6. Offline

    little_dude187

    bump please make thisss
     
  7. Offline

    little_dude187

  8. I'll make this :D Sounds like a fun project to do.
    Only 1 question: Do you want to have the radius like this:
    [​IMG]
    or like this:
    [​IMG]
    (If the radius/range is 2) ?
     
  9. Offline

    little_dude187

    can you make that a configurable option. kind of like this in the config:

    straight_out: true/false
    blocks: 2 (2 block radius like in diagram)

    all_around: true/false
    blocks: 2 (2 block radius all around the dispenser)

    appreciate it if u can do that
     
  10. I can make the sraight-radius and default-radius in the config. The radius will be what you enter in the command and I make a custom crafting recipe like this: [​IMG]
     
  11. Offline

    little_dude187

    nice!
     
  12. I'm pretty much done :D

    Features:
    • Crafting recipe: dispenser in the middle, the rest full of shears.
    • The DispenserShears are saved to a .yml file: uuid of DispenserShear, range, location & player who placed it. When breaking your DispenserShear, it gets removed from the .yml file.
    • Every DispenserShear searches all 1.5 (configurable) seconds for leaves or sheeps in the range of blocks (currently only in one direction (where the dispenser is facing), no circle/radius).
    • When a sheep is inside that range and has wool on it and isn't a baby, it gets sheared and the wool gets put into a hopper (if there is any) under the dispenser. After every shear, 1 shear inside the dispenser loses 1 durability.
    • The hopper doesn't suck in the shears from the dispenser.
    • When a leaf block is inside that range, it gets sheared too and the drops gets put into the hopper (if there is any) too. You can configure what the leaf block should drop (leaf-block, apple, sapling).
    • I looked in the minecraft wiki and tried to keep the chance of dropping very similar to how it is when you normally use a shear on a sheep / leaf block. Here are the item drop rates/chances:
    ............... No enchantment ................ Fortune I ................ Fortune II ............... Fortune III
    Sheep: ............. 1-4 ............................. drops * 2 .................. drops * 3 ................... drops * 4
    Apples: ............0.5% ...................... ........ 1% .......................... 1.5% ............................. 2%
    Saplings: ........... 5% ................................10% ......................... 15% ............................. 20%
    • (Durability support comming soon)
    • As I said already before, the player who created/placed the DispenserShear is saved. When a other player that hasn't got the permission DispenserShears.*, he can't open the inventory of the dispenser or break the block.
    • When breaking a DispenserShear in creative mode, only the contents of the dispenser get dropped. When breaking it with an other game mode, the contents of the dispenser and the DispenserShear itself get dropped.
    • I added some sound effects for: when a sheep/leafblock gets sheared and if a shear breaks.

    Commands:
    /DispenserShear [range] [amount] - Gives you a DispenserShear with the given range or amount (not necessary) Aliases: /DS
    /DispenserShears - Shows you the DispenserShears you created.

    How to use it:
    1. Give yourself the DispenserShear with the command or craft it.
    2. Place it on the floor.
    3. Put some shears inside it.
    4. Power it with redstone (Power it indirectly or the hopper won't let items go through).
    5. Wait for some sheeps to come nearby or build an automatic sheep/tree farm
    Config:
    Code:
    default-range: 1
    update-speed: 30
    shear:
      leaves: true
      sheeps: true
    leaf-drops:
      apples: true
      saplings: true
      leaves: false
    default-range is the range the DispenserShear automaticly gets, when crafting an item or running the command without the range.
    update-speed is the speed in ticks (20 ticks = 1 second) how often the DispenserShears should search for sheeps/leaves.
    shear.leaves is if the DispenserShear should shear leaves.
    shear.sheeps is if the DispenserShear should shear sheeps.
    leaf-drops.apples is if leaves should drop apples
    leaf-drops.saplings is if leaves should drop saplings
    leaf-drops.leaves is if leaves should drop leaves (the block itself)

    That was it :D
    Tell me if you find any bugs/errors

    Download: https://www.dropbox.com/s/qq5ckpbjgpn1b08/DispenserShears.jar?dl=0
     
  13. Offline

    little_dude187

    wow thanks so much. You got into so much detail, first person to do that. Thanks a ton, if you want to work on any more of my plugin requests, pm me i got a few that i need done. Thanks a ton, appreciate it a lot :D

    found a bug wheres the wool when sheared?

    edit: nevermind i have an idea with hoppers. can u set a config option to drop when sheared anything please. Ty :D

    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Jul 14, 2015
  14. I'll just make it like this: When there is a hopper (where the item fits in), it puts the items in the hopper. Otherwise it will drop the items below the dispenser.

    Already updated, download link is the same.

    In the next update (if I'll make a next update) this will be added (if its possible to do):
    • Ability to destroy/open the DispenserShear of other players if you have the permission: done
    • Stats: Sheeps sheared, leaves sheared: done
    • Highlighting of the area with particle effects: in progress
    • Upgrades: range, speed, luck done
    • A gui to upgrade the DispenserShear done
    • Circular / linear / square range: done
    • Hopper fix (when the dispenser is directly powered the hopper doesn't let any items go through)
     
    Last edited: Jul 15, 2015
  15. Offline

    little_dude187

    bug: on restart, the sheers in dispensers go into the dropper and are removed from dispenser

    aka dispenser shear resets
     
  16. What? I can reload or even stop and start the server again and the shears stay in the dispenser :confused:
     
  17. Offline

    little_dude187

    yea dude, on restart of server. Ya know stop then start it resets =(

    what version of what are you using to develop the plugin

    Edit: ok now the plugin isnt even working at all. its broken dude

    edit 2: i have to reset the plugins folder. :|

    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Jul 15, 2015
  18. Offline

    little_dude187

    are you still working on this? if you are are you almost done with everything, and the bug i sent. and just a question, what version are you using spigot or bukkit and what version that can cause issues
     
  19. I am using craftbukkit 1.7.5 R2

    EDIT: It's working fine on the 1.8.7 server I just created. Maybe it's fixed in the update and I hadn't noticed it.. Update is done soon
     
    Last edited: Jul 17, 2015
  20. Offline

    little_dude187

    go figure, can u use spigot 1.8.7 + someone move this thread

    ty so much :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 12, 2016
  21. Offline

    little_dude187

    hows it coming? :D
     
  22. Offline

    little_dude187

    bump, i was wondering if i can get a remake oh which fishey made it, it breaks on server reload
     
  23. When I upgraded my laptop to Windows 10, OneDrive didn't save my backup of all my files, projects etc. (only the folders but not the files) -.- So I only have the latest version which I uploaded on Dropbox ... The update with a lot more features was almost done :'(
     
  24. Offline

    little_dude187

    ty, its been monthes thanks for still working on it
     
  25. When did I say that I will still work on it?
     
  26. Offline

    little_dude187

    xD i meant if you still have it
     
  27. Only the jar before the almost finished update (the one you have) ._.
     
  28. Offline

    little_dude187

    still broken stopped using it
     
  29. What do you mean with broken? Are there any errors in the console?
     
  30. Offline

    little_dude187

    i really just forgot about it so idk it just doesnt work when server restarts kinda like tekkit inspired, it works, but on restart it breaks
     
Thread Status:
Not open for further replies.

Share This Page