1 -- Liquids: Water and lava
3 local WATER_ALPHA
= 179
7 minetest
.register_node("mcl_core:water_flowing", {
8 description
= "Flowing Water",
9 _doc_items_create_entry
= false,
10 wield_image
= "default_water_flowing_animated.png^[verticalframe:64:0",
11 drawtype
= "flowingliquid",
12 tiles
= {"default_water_flowing_animated.png^[verticalframe:64:0"},
15 image
="default_water_flowing_animated.png",
16 backface_culling
=false,
17 animation
={type="vertical_frames", aspect_w
=16, aspect_h
=16, length
=4.0}
20 image
="default_water_flowing_animated.png",
21 backface_culling
=true,
22 animation
={type="vertical_frames", aspect_w
=16, aspect_h
=16, length
=4.0}
25 sounds
= mcl_sounds
.node_sound_water_defaults(),
28 paramtype2
= "flowingliquid",
35 liquidtype
= "flowing",
36 liquid_alternative_flowing
= "mcl_core:water_flowing",
37 liquid_alternative_source
= "mcl_core:water_source",
38 liquid_viscosity
= WATER_VISC
,
40 post_effect_color
= {a
=240, r
=0x03, g
=0x3C, b
=0x5C},
41 groups
= { water
=3, liquid
=3, puts_out_fire
=1, not_in_creative_inventory
=1, freezes
=1, melt_around
=1, dig_by_piston
=1},
42 _mcl_blast_resistance
= 500,
43 -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
47 minetest
.register_node("mcl_core:water_source", {
48 description
= "Water Source",
49 _doc_items_entry_name
= "Water",
51 [[Water is abundant in oceans and also appears in a few springs in the ground. You can swim easily in water, but you need to catch your breath from time to time.
52 Water interacts with lava in various ways:
53 • When water is directly above or horizontally next to a lava source, the lava turns into obsidian.
54 • When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone.
55 • When water is directly below lava, the water turns into stone.]],
56 _doc_items_hidden
= false,
59 {name
="default_water_source_animated.png", animation
={type="vertical_frames", aspect_w
=16, aspect_h
=16, length
=5.0}}
62 -- New-style water source material (mostly unused)
64 name
="default_water_source_animated.png",
65 animation
={type="vertical_frames", aspect_w
=16, aspect_h
=16, length
=5.0},
66 backface_culling
= false,
69 sounds
= mcl_sounds
.node_sound_water_defaults(),
78 liquidtype
= "source",
79 liquid_alternative_flowing
= "mcl_core:water_flowing",
80 liquid_alternative_source
= "mcl_core:water_source",
81 liquid_viscosity
= WATER_VISC
,
83 post_effect_color
= {a
=240, r
=0x03, g
=0x3C, b
=0x5C},
85 groups
= { water
=3, liquid
=3, puts_out_fire
=1, freezes
=1, not_in_creative_inventory
=1, dig_by_piston
=1},
86 _mcl_blast_resistance
= 500,
87 -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
91 minetest
.register_node("mcl_core:lava_flowing", {
92 description
= "Flowing Lava",
93 _doc_items_create_entry
= false,
94 wield_image
= "default_lava_flowing_animated.png^[verticalframe:64:0",
95 drawtype
= "flowingliquid",
96 tiles
= {"default_lava_flowing_animated.png^[verticalframe:64:0"},
99 image
="default_lava_flowing_animated.png",
100 backface_culling
=false,
101 animation
={type="vertical_frames", aspect_w
=16, aspect_h
=16, length
=6.6}
104 image
="default_lava_flowing_animated.png",
105 backface_culling
=true,
106 animation
={type="vertical_frames", aspect_w
=16, aspect_h
=16, length
=6.6}
109 paramtype2
= "flowingliquid",
110 -- Real light level: 15 (but Minetest caps at 14)
112 sounds
= mcl_sounds
.node_sound_lava_defaults(),
118 --[[ Drowning in Minecraft deals 2 damage per second.
119 In Minetest, drowning damage is dealt every 2 seconds so this
120 translates to 4 drowning damage ]]
122 liquidtype
= "flowing",
123 liquid_alternative_flowing
= "mcl_core:lava_flowing",
124 liquid_alternative_source
= "mcl_core:lava_source",
125 liquid_viscosity
= LAVA_VISC
,
126 liquid_renewable
= false,
128 damage_per_second
= 4*2,
129 post_effect_color
= {a
=255, r
=208, g
=73, b
=10},
130 groups
= { lava
=3, liquid
=2, destroys_items
=1, not_in_creative_inventory
=1, dig_by_piston
=1},
131 _mcl_blast_resistance
= 500,
132 -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode
136 minetest
.register_node("mcl_core:lava_source", {
137 description
= "Lava Source",
138 _doc_items_entry_name
= "Lava",
139 _doc_items_longdesc
=
140 [[Lava is hot and rather dangerous. Don't touch it, it will hurt you a lot and it is hard to get out.
141 A lava source sets fire to a couple of air blocks above when they're next to a flammable block.
142 Lava interacts with water various ways:
143 • When a lava source is directly below or horizontally next to water, the lava turns into obsidian.
144 • When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone.
145 • When lava is directly above water, the water turns into stone.]],
148 {name
="default_lava_source_animated.png", animation
={type="vertical_frames", aspect_w
=16, aspect_h
=16, length
=3.0}}
151 -- New-style lava source material (mostly unused)
153 name
="default_lava_source_animated.png",
154 animation
={type="vertical_frames", aspect_w
=16, aspect_h
=16, length
=3.0},
155 backface_culling
= false,
158 -- Real light level: 15 (but Minetest caps at 14)
160 sounds
= mcl_sounds
.node_sound_lava_defaults(),
167 liquidtype
= "source",
168 liquid_alternative_flowing
= "mcl_core:lava_flowing",
169 liquid_alternative_source
= "mcl_core:lava_source",
170 liquid_viscosity
= LAVA_VISC
,
171 liquid_renewable
= false,
173 damage_per_second
= 4*2,
174 post_effect_color
= {a
=255, r
=208, g
=73, b
=10},
176 groups
= { lava
=3, liquid
=2, destroys_items
=1, not_in_creative_inventory
=1, dig_by_piston
=1},
177 _mcl_blast_resistance
= 500,
178 -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode