[Mod]Sponge[sponge]

Post Reply
User avatar
FiftySix
Member
Posts: 16
Joined: Sun Jan 14, 2018 10:58
GitHub: BenjieFiftysix
In-game: fiftysix or 56
Location: Scotland
Contact:

[Mod]Sponge[sponge]

by FiftySix » Post

Sponges that remove water in an area around them.

They can be used to remove large amounts of water in survival, where worldedit would not be an option

Soggy sponges are found deep in the sea, where it is dark (below -11), and are quite rare (lights are recommended).
These can be cooked into dry sponges, and then placed near a liquid to remove an area of it.
They will hold the water away until they are removed.
They turn in to soggy sponges when used, so to use them again, they have to be cooked.

How it works:
- Sponges create a 9x9x9 cube of air-like nodes that water can't flow through (checks for protection).
- If sponges have cleared more than 3 nodes of liquid, they become soggy sponges.
- Removing a sponge or soggy sponge will turn air-like nodes in the 9x9x9 cube back into air, as long as they are not in the area of another sponge.
(Air-like nodes can be removed in protection by removing a sponge outside the protection. they are not meant to be permanent)


Dependencies: default

Licence (code and textures): MIT License

Download
Github

Video review by Minetest Videos

Image
Attachments
sponge in action
sponge in action
sponge screenshot.png (722.13 KiB) Viewed 1946 times
Last edited by FiftySix on Wed Dec 23, 2020 14:15, edited 3 times in total.

User avatar
Edgy1
Member
Posts: 163
Joined: Thu Nov 24, 2016 16:29
GitHub: JamesTobin
In-game: Trump

Re: [Mod]Sponge[sponge]

by Edgy1 » Post

you should add a screenshot.

--Edgy1

User avatar
Hume2
Member
Posts: 710
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [Mod]Sponge[sponge]

by Hume2 » Post

Nice and simple mod! +1

I found a tiny bug: When I'm in creative and place sponge, the sponge vanishes from my hand. Use something like this:

Code: Select all

if not (creative and creative.is_enabled_for and creative.is_enabled_for(player_name)) then
	itemstack:take_item()
end
EDIT: Also when right-click a chest with a sponge in hand, the sponge is placed. Use code like this:

Code: Select all

local under = pointed_thing.under
local node = minetest.get_node(under)
local udef = minetest.registered_nodes[node.name]
if udef and udef.on_rightclick and not (placer and placer:is_player() and placer:get_player_control().sneak) then
	return udef.on_rightclick(under, node, placer, itemstack, pointed_thing) or itemstack
end
If you lack the reality, go on a trip or find a job.

User avatar
FiftySix
Member
Posts: 16
Joined: Sun Jan 14, 2018 10:58
GitHub: BenjieFiftysix
In-game: fiftysix or 56
Location: Scotland
Contact:

Re: [Mod]Sponge[sponge]

by FiftySix » Post

Ok, thanks.

All problems with placing should now be fixed.

User avatar
DancingWombat
Member
Posts: 14
Joined: Tue Nov 14, 2017 12:53

Re: [Mod]Sponge[sponge]

by DancingWombat » Post

Cool, this will save time clearing out underwater rooms.

User avatar
FiftySix
Member
Posts: 16
Joined: Sun Jan 14, 2018 10:58
GitHub: BenjieFiftysix
In-game: fiftysix or 56
Location: Scotland
Contact:

Re: [Mod]Sponge[sponge]

by FiftySix » Post

Update:
I finally fixed a bug, after more than 2 years.
I believe this mod is "finished".
Also slightly modified textures.

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod]Sponge[sponge]

by Ignaramico » Post

nice, gonna see if i can make a little sponge tower and create a water vacuum :3

Merak
Member
Posts: 116
Joined: Sat Nov 05, 2016 20:34

Re: [Mod]Sponge[sponge]

by Merak » Post

Would be nice to be able to combine sponges to make larger sponges, which suck up more water.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod]Sponge[sponge]

by runs » Post

Cool!

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod]Sponge[sponge]

by Ignaramico » Post

Just so to let ppl know, i tried it and is not a 9x9 area, is a cube xD. pretty neat in case you want to make something underwater.

User avatar
LRV
Helper
Posts: 378
Joined: Mon Dec 19, 2016 17:29
GitHub: Mooncarguy
In-game: Mooncarman Mooncarguy

Re: [Mod]Sponge[sponge]

by LRV » Post

Moved this mod because it follows the guidelines.
This is a cool signature. :)

User avatar
FiftySix
Member
Posts: 16
Joined: Sun Jan 14, 2018 10:58
GitHub: BenjieFiftysix
In-game: fiftysix or 56
Location: Scotland
Contact:

Re: [Mod]Sponge[sponge]

by FiftySix » Post

Ignaramico wrote:
Tue Dec 22, 2020 22:13
Just so to let ppl know, i tried it and is not a 9x9 area, is a cube xD. pretty neat in case you want to make something underwater.
Oh thanks! of course. I have updated the description.

revevil
Member
Posts: 49
Joined: Tue May 14, 2019 03:11

Re: [Mod]Sponge[sponge]

by revevil » Post

This mod is fun! It made this possible. (base is still a WIP though)
Attachments
underwaterbase.png
underwaterbase.png (507.15 KiB) Viewed 1608 times

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests