SpongeReloaded
SpongeReloaded
Take the sponge from Alpha/Indev to present!
This plugin makes the sponge work as in the 'good old days'.
With this plugin, you can build amazing underwater structures without ever having problems with water - no matter what problems you have:
- The plugin prevents water to break through holes in your building
- You can easily remove water that is already inside your house.
- After building, simply remove the sponges and you will see the water flowing automagically!
- Please remember that this plugin will NOT alter the world generation. Instead, you can craft sponges.
I know, this function is also integrated in WorldGuard, but if you use that and remove a sponge from the world, the water will be stuck in place until a block beneath changes. So, with this plugin, I try to purge this lack of functionality and present you a fully-functional sponge that lets water flow!
Configuration / Crafting
See Configuration for details.
Future
My (and your) plans with this plugin:
- make the range configurable -> since v1.1
- make pistons work without spamming and killing the server -> since v1.2
- suck lava / fire (configurable) -> since v1.3
- add multiworld support -> since v1.3
- create a crafting recipe -> since v1.4
- refill water / lava when a sponge is removed (configurable)
- make sponges don't soak through walls
Source Code
The source code is available on GitHub: https://github.com/steppenwiesel/SpongeReloaded/
@astronautlevel
They are a sequel of the plugin. You can download it here (creator link) <Edit by Mod: adf.ly link removed>
@astronautlevel
Just tested it. Works awesome in 1.6.2
Nice work
Does this work in 1.6.2?
OMG, my apologies for being too stupid to read. I see the crafting recipe now. Awesome that you can custom make one!
This is exactly what i've been looking for since i want to uninstall Worldguard because GriefPrevention does a way better job.
I was just about to remove Worldguard until I noticed that was actually making the sponge function, so I had to search for this.
Definitely trying this out !
Just one question. Does this also make the sponge craftable again?
It looks like this plugin overrides -flow on the Residence plugin. Would it be possible to make this plugin not override Residence flow protection? The Residence API is well documented.
Edit: I modified the code a bit so that it doesn't interfere with Residence. Works like a charm now on my server.
@MattSheridan
Hi. This error message says your version of Java is incompatible with the plugin's files. You have Java 6 installed, but you need Java 7 to run it.
The other plugins are compiled with Java 6, so they run on both versions.
Hi. SpongeReloaded v1.4 won't load up for me (error text here: http://pastebin.com/1XhA4WjX). Do you think I've got some kind of Java compatibility problem, or what? All my other plugins seem to be okay.
@ryanwagner
I will always try to make as many things configurable as possible.
Crafting WILL be configurable. The config option is already there, but it doesn't take effect now.
@pkt77
Implementing the recipe in that way would only allow to either allow or disallow the crafting. I wanted to go one step further, that the server admins can configure HOW to craft a sponge.
I guess that recipe is something like a 'standard' to craft a sponge, because everyone uses this one? :D
MoreRecipes has a recipe for sponges:
if (getConfig().getBoolean("sponge", true)) {
ShapedRecipe recipe22 = new ShapedRecipe(new ItemStack(Material.SPONGE 1)); recipe22.shape(new String[] { "BAB", "ABA", "BAB" }); recipe22.setIngredient('A', Material.SAND recipe22.setIngredient('B', Material.STRING getServer().addRecipe(recipe22);
}
when you do add a recipe PLEASE make sure we can disable it in the config.
@Devil_Boy
Okay, I will look at it. Well, I already did to figure out how to register a crafting recipe :D
@lVincentl
I don't think you will need a video to guess how this plugin works ... ;)
Any Video?
You could always use the same water restoration method as I put in SpongeRestore.
Upon the removal of a sponge, the blocks in the affected area are temporarily stored in a database. When water naturally flows into one of the stored blocks, it is converted from flowing water to a full block of water. The process continues and the area is filled up properly.
It may not be the most fool-proof method, but I've seen that it's gotten the job done in my plugin. SpongeRestore is open-source, so you can look at how it deals with certain things if you wish. :)
@Blocker226
aah, yes! :D
But there's still the problem, what if someone uses a sponge to get the water out of his/her house. Once he/she removes the sponges, the water will be back. I think I could make a config option that says it to admins/ops when someone places a sponge along with the coordinates, or make it so that someone can only place a limited number of sponges (with permissions). If those sponges are placed illegally, an admin could come, kick or ban the player and simply do 'fixwater 10' with WE.
Maybe I could only enable sponges in previously defined WorldGuard regions, so that every player gets a region to play within.
@steppenwiesel
Well, maybe if I wasn't clear enough, the sponge will detect water first, then make a region around the area the water USED to be. When it's destroyed it does something like a replace 0 water command, so the same region gets filled with water without replacing blocks. :)
@Blocker226
The problem about that is, what happens if you place a sponge anywhere in the desert, for example, or on a high tower. If I simply replace the sponge's area with water, it would even be worse than just triggering the water's physics, because anybody could place cubes of water in world.
So, what I thought was something like looking around where water is and then refill it at that height.
btw, it would be MUCH easier going through every block and setting it to water than hooking into WorldEdit! :D
Currently, I'm killing my computer every 2 minutes with those nasty pistons :(
@steppenwiesel
I would imagine the water restoration as a form of saving where the water was and then replacing it. It's like when the sponge is placed, it calculates where the water used to be, and marks 2 points to make a region. Then when it's destroyed the plugin uses a replace 0 water to replace the water in the region without destroying any blocks that were placed there. after that a deselect would deselect the area.
I am definitely excited about this :)
@Blocker226
Well, in that configuration file, what would you like to change? I'm working on a configurable radius (it already works good), and later which worlds are enabled / disabled (and maybe individual radiuses per world). In the other plugin, I saw the ability to remove lava and fire, but I don't think a sponge could suck that ..? I can put it in the plugin, though.
Replacing the water would either mean to save where water was before placing the sponge or to make complex calculations like in WorldEdit's fixwater command (well, I can look on it and try to understand how it works). I don't like maintaining giant files where before-/after-data is stored, and I think the way I took (check if there is a sponge nearby before allowing water to flow) is the best one.
I'm currently working on getting the block physics fixed. I actually didn't try what's up with pistons, but I think once I'm finished with this, it should work - also WorldEdit should work with placing / removing sponges.
About the recipe, yes, it is possible (as you see in SpongeRestore), but at the moment, I have no plan how to hook in the crafting bench. But this definitely comes on my todo-list! :)