Keeping players from creating infinite water sources

Hi there,

I am running a spongeforge server on API 7 and I kinda figured some of you might have done similar things as the ones I plan on doing in the next weeks.

My idea is rather simplistic:
keep players from being able to place water from buckets in a way that it would usually form an infinite water source to force them into building aqueducts for watering farms or transport to a settlement for use as though as nails trinking water supply.

So I am not very talented in kotlin or editing in general, just the setup with all the configs and so on for the server has taken me bit over a year by now and I wasn’t able to find a plugin with my limited knowledge that would make me achieve that goal.

Any chance anyone knows how to achieve this by using solely sponge and/or nucleus?
Or really any other means available?
Even idea and hints that could point me into the right direction for research would be appriciated.

The only way i can think of doing this is by code sadly. So you could request a programmer to do such a thing (i dont touched api 7 anymore - if it was 8 then i would be more then happy)

The logic of the way you suggested would be as follows

  • on water block placement
  • check attached faces for if they are water blocks
  • if true then check if they are connected to another waterblock on the side faces
  • if true then cancel the placement

However there is a simpler way.

  • on world block change
  • if change turns into watersource due to a watersource connected on blockface (this sounds complex, but thanks to sponge cause system, its not)
  • if true then cancel

This way wont prevent players creating a infinite watersource shape, but it will prevent the block the player just picked up from turning back into a water source. This has the benefit of players being able to create there own pools. But the drawback of preventing natural spawning infinite water sources from being used as a infinite water source

Dang thank you alot for this. I know someone that knows kotlin but who is very occupied at the moment.
Maybe I just have to get into that stuff by myself. By your response my request doesn’t sound like being of enourmous scope so it might just work as a starter project?
I can script n stuff but sofar I haven’t had any hands in programming.

Uuuh. Nevermind. Should have guessed that. Even the setup is way over my head. Brain did short circuit on gradle introduction.

Yeah its not that big of a scope.

Personally i would do it in regular Java rather then Kotlin as in my teachings, i find that Java is easier to understand as a first language. Especially when it comes to platform programs designed for java such as sponge, as you don’t need a Kotlin runtime baked into your plugin.

We have easy to understand documentation for Java plugins and im more then happy to get you started

Here is a link to the docs

Whats getting you confused on setup?

I just do not have the mental capacity to learn all this at the moment for a one time thingy. My day is already completely overloaded with studies and learning, Id have forgotten most of this by sunday.

Fair enough. Programming is a good skill to have if your a server owner. But i get not everyone has the time to learn