Auto Miner

Discussion in 'Plugin Requests' started by The_C0MB0, Nov 13, 2017.

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

    The_C0MB0

    » Plugin category: Fun, misc, tools


    » What I want:
    Pretty much, users place an autominer (Dispenser named "&c&lMINER"). Whatever block is in front of the dispenser, is broken. (Every second). It shouldn't break/remove: water, lava, or bedrock. If there is a chest behind it, the items go straight to the chest. If not, it drops like normal.

    Breaking the miner should drop a miner. Not a normal dispenser.
    Same for explosions.


    » Ideas for commands:
    /miner give <player> <amount>
    /amc reload


    » Ideas for permissions:
    miner.give

    » When I'd like it by: As soon as possible :)

    (There is a plugin like this already, but the autominer is powered by redstone)
     
  2. Offline

    MightyOne

    can you show the plugin that already exists?
     
  3. Offline

    The_C0MB0

  4. Offline

    The_C0MB0

  5. Offline

    The_C0MB0

  6. Offline

    The_C0MB0

  7. Offline

    CraftCreeper6

    @The_C0MB0
    I'll do this (Need to cure my boredom)
    What version?
    What shall the /amc reload command do?
     
    Last edited: Nov 19, 2017
  8. Offline

    The_C0MB0

    Spigot 1.8

    Ignore AMC reload. My bad.
     
  9. Offline

    MightyOne

    Mhhh i was about to tell you that i started it xD well anyway i would have likely not finished it .-.
     
  10. Offline

    The_C0MB0

    :p
     
  11. Offline

    MightyOne

  12. Offline

    CraftCreeper6

    @The_C0MB0
    If the chest is full would you like it to stop or for it to drop the items?
     
  13. Offline

    The_C0MB0

    Drop the items
     
  14. Offline

    CraftCreeper6

    @The_C0MB0
    Okay I think I'm finished. I'll put it here at about 5 pm UTC+0

    @The_C0MB0
    I'm finished, thanks for this mini project it was rather fun. Message me or reply here if you have any bugs. Enjoy!

    (Double post because I wanted to use the Upload a File button which isn't provided with the Edit button.)
     

    Attached Files:

    Last edited by a moderator: Nov 21, 2017
  15. Offline

    timtower Administrator Administrator Moderator

  16. Offline

    CraftCreeper6

    @timtower
    Didn't see that. You'd think with 2+ years id've figured it all out. Guess not :p
     
    timtower likes this.
  17. Offline

    MightyOne

  18. Offline

    CraftCreeper6

  19. Offline

    MightyOne

    @CraftCreeper6 Placing the miner facing up/down ends up in mining itself
     
  20. Offline

    CraftCreeper6

    @MightyOne
    Ah right, yeah I forgot to add those faces, I'll do it now.
     
  21. Offline

    MightyOne

    @CraftCreeper6 Errrr... you know that you can cast a dispensers getState() to org.bukkit.material.Dispenser and that one has the dunction getFace()
     
  22. Offline

    CraftCreeper6

    @MightyOne
    I was running into troubles with it somewhere along the line so I changed it to this, it all works so I think I'll keep it as is.

    Here you go
     

    Attached Files:

  23. Offline

    MightyOne

    @CraftCreeper6 Commands:
    you did not check if 1. the player exists/ is online. 2. if the amount is a number -> many internal errors :/

    I mean... respect that you did it in a that short time but that is a necessary base
     
  24. Offline

    CraftCreeper6

    @MightyOne
    God I hate commands.
    Too many checks...

    EDIT: For the OP or anyone using it. The config is generated when you first start the plugin. It's all pretty simple but there are two options:
    DELAY - how long between each block being mined. In ticks, so seconds*20
    And UNHARVESTABLE_BLOCKS - All the blocks that cannot be destroyed by the miner.

    The basic setup is a miner. Then a chest behind it and a block infront.
     

    Attached Files:

    Last edited: Nov 22, 2017
  25. Offline

    MightyOne

    Well... since I worked on the same plugin parallel to yours, @CraftCreeper6, I'd like to post my version as well.
    I would say there are slight improvements to yours, like i included other inventory holding blocks to store the mined blocks and in the end I add Items in a more effective way to inventories.
    I did not copy anything, it is all my own creation (ok beside the concept of storing locations, that was really good).
    A look into the jar will prove that.
     

    Attached Files:

  26. Offline

    CraftCreeper6

    @MightyOne
    It's no competition. Though I agree your code is much more concise (Hate myself for using that much static. Pains me to even read it again.) I cannot actually get it to work. I get this stacktrace:

    Code:
    [19:20:18 WARN]: [AutoMiner] Task #2 for AutoMiner v1.0 generated an exception
    java.lang.NoSuchFieldError: BLOCK_DISPENSER_DISPENSE
            at me.mightyOne.autoMiner.control.MinerHandler.run(MinerHandler.java:65) ~[?:?]
            at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
            at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
            at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:709) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
            at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
            at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:634) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:537) [spigot-1.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-c3c767f-33d5de3]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_151]
    He asked for it in Spigot 1.8 so you should probably change the version.
     
  27. Offline

    MightyOne

    @CraftCreeper6 ok did not read that, updated now. thank you

    Aaaaaand in the end @The_C0MB0 never comes online again xD
     
  28. Offline

    CraftCreeper6

    @MightyOne
    No worries, not a competition :p

    I'm sure he will... Eventually.
     
  29. Offline

    The_C0MB0

    Am online!
     
    MightyOne likes this.
  30. Offline

    MightyOne

    with placeing message
     

    Attached Files:

Thread Status:
Not open for further replies.

Share This Page