Filled Disable sponge absorption

Discussion in 'Plugin Requests' started by matija131, Nov 21, 2019.

  1. Offline

    matija131

    Hey guys, I need a simple plugin with no config or perms that will disable sponge sucking up water and turning into a wet sponge.
    When you place a sponge in the water it should just stay dry (not turn into a wet sponge) and not suck up the water
    I found a few plugins that could do that but none of them seem to work!

    I need it for 1.8

    Any questions?
    Thanks in advance :)
     
  2. Offline

    Banjer_HD

    Last edited: Nov 21, 2019
  3. Offline

    matija131

    Doesnt work
    Code:
    [20:23:46 INFO]: [AntiSpongeAbsorbtion] Enabling AntiSpongeAbsorbtion v1.0
    [20:23:46 ERROR]: [AntiSpongeAbsorbtion] Plugin AntiSpongeAbsorbtion v1.0 has failed to register events for class me.banjer_hd.plugins.antispongeabsorbtion.events.OnSpongeAbsorbtion because org/bukkit/event/block/SpongeAbsorbEvent does not exist.
    
    Did you make it for 1.8?
     
  4. Offline

    Banjer_HD

  5. Offline

    KarimAKL

    @Banjer_HD I haven't tested this but, maybe it's worth a try to cancel the BlockPlaceEvent and then set the block using the plugin?
     
  6. Offline

    Banjer_HD

    Thanks for your reply! Will try this now using setType(Material.SPONGE, false) <-- false doen't update blocks next to it
     
    KarimAKL likes this.
  7. Offline

    matija131

    Any progress? :)
     
  8. Offline

    Banjer_HD

    Last edited: Nov 26, 2019
  9. Offline

    CraftCreeper6

    @Banjer_HD
    You could check for block place event to make sure it's a sponge that has been placed, make note of every water block in the radius of the sponge, and once it has been placed, just simply replace the water blocks. (And obviously reset the sponge too.)
     
  10. Offline

    Banjer_HD

    When you reset the sponge it absorbs the water again
     
  11. Offline

    CraftCreeper6

    @Banjer_HD
    Is this what the OP wanted?

    The only issue is that any block update will cause the sponge to reabsorb. I'll upload my code to GitHub. It's very messy and there are definitely improvements to make, but it's a base line.
     
    Last edited: Nov 26, 2019
  12. Offline

    Banjer_HD

    Last edited: Nov 27, 2019
  13. Offline

    CraftCreeper6

    Banjer_HD likes this.
  14. Offline

    matija131

  15. Offline

    CraftCreeper6

    @Banjer_HD
    Instead of Material.WATER, use Material.STATIONARY_WATER
     
  16. Offline

    matija131

    If you guys dont find the solution I actually had another plugin idea that could solve my problem!
    I need the sponge to stay dry all the time because its going to be a custom item, so if you cant achieve that ill make a plugin request with my new idea.
    But thanks alot for you hard work! :D
    Let me know what you think about this :)

    EDIT: Okay guys I made a new request which will probably solve my problem in an even better way, since you did actually make the plugin I will mark thread as Filled, thanks again!
    Heres the link if youre interested: https://bukkit.org/threads/no-blocks-near-water.482673/
    :)
     
    Last edited: Nov 27, 2019
  17. Offline

    Banjer_HD

    I don't know why Material.WATER doesn't work...
     
  18. Offline

    CraftCreeper6

    @Banjer_HD
    If you only check for stationary_water, the water will likely flow the same route as previous, so it wouldn't matter.

    But I'm pretty sure it has something to do with additional data, flowing water can maintain different heights, so you might have to provide it with said height before it will work.
     

Share This Page