[mod code] Water Feature [code]

Post Reply
User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

[mod code] Water Feature [code]

by TumeniNodes » Post

If anyone is interested, just a quick n' dirty, fun, water feature for decoration

You can either add it into an existing mod's code if you like or, set it up as it's own mod
This is just the code. You will need to change the [castle_features:] bit to whatever you want to call it, of course.
I only have the light_source = because it suited my need att

code: GNU Lesser General Public License, version 2.1

default_water textures: RealBadAngel's animated water (CC BY-SA 3.0): default_water_flowing_animated.png

Code: Select all

	minetest.register_node("water_feature:water_feature", {
		description = "Water Feature",
		drawtype = "nodebox",
		tiles = {
			{
				name = "default_water_flowing_animated.png",
				animation = {
					type = "vertical_frames",
					aspect_w = 16,
					aspect_h = 16,
					length = 0.8,
				},
			},
		},
			special_tiles = {
			-- New-style water source material (mostly unused)
				{
					name = "default_water_flowing_animated.png",
					animation = {
					type = "vertical_frames",
					aspect_w = 16,
					aspect_h = 16,
					length = 0.8,
				},
				backface_culling = false,
			},
		},
			alpha = 180,
		inventory_image = "default_water.png",
		wield_image = "default_water.png",
		paramtype = "light",
		light_source = 5,
		paramtype2 = "facedir",
		legacy_facedir_simple = true,
		is_ground_content = false,
		node_box = {
		type = "fixed",
		fixed = {
			{-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5},
			},
		},
		selection_box = {
		type = "fixed",
		fixed = {
			{-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5},
			},
		},      
		groups = {cracky=3, stone=2},
		sounds = default.node_sound_stone_defaults(),
	})
a couple of lame examples
Image
Attachments
water feature.jpg
water feature.jpg (159.41 KiB) Viewed 436 times
Last edited by TumeniNodes on Thu Jul 19, 2018 08:21, edited 2 times in total.
A Wonderful World

User avatar
csirolli
Member
Posts: 133
Joined: Mon Jan 15, 2018 21:46
GitHub: HeyITGuyFixIt
IRC: CSirolli
In-game: CSirolli
Location: Florida, USA
Contact:

Re: [mod code] Water Feature [code]

by csirolli » Post

That is really cool.

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [mod code] Water Feature [code]

by TumeniNodes » Post

Thanks, I'm glad you like it.
Makes it worth putting the code up, if even one person likes it and can use it.
A Wonderful World

Sokomine
Member
Posts: 4290
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [mod code] Water Feature [code]

by Sokomine » Post

Looks nice. Would be good to have it integrated into some mod and to find it installed on servers.
A list of my mods can be found here.

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [mod code] Water Feature [code]

by TumeniNodes » Post

anyone is welcome to do as they wish with it.
it makes a good conversation piece :D
A Wonderful World

User avatar
csirolli
Member
Posts: 133
Joined: Mon Jan 15, 2018 21:46
GitHub: HeyITGuyFixIt
IRC: CSirolli
In-game: CSirolli
Location: Florida, USA
Contact:

Re: [mod code] Water Feature [code]

by csirolli » Post

Are there any other neat water/liquid mods/mod code pieces? If so, maybe we can add it all together to make a fancy water mod

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [mod code] Water Feature [code]

by TumeniNodes » Post

I was working on a water fountain and gargoyle-like rain spouts but got distracted from them. Just need to get the particles right.
Not sure when I will get back to them though

Other than those, I can't think of any other water feature ideas.
perhaps, maybe another similar to this that uses water particles instead that trickle down

This one could be a bit better with some sound
A Wonderful World

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests