D00Med commit 18/08/17
>added apple to the fruit mod (WIP) >added waterlily model from nodebox trees
This commit is contained in:
parent
3142721702
commit
5de698aa2b
@ -1524,7 +1524,7 @@ minetest.register_node("default:water_flowing", {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -1534,7 +1534,7 @@ minetest.register_node("default:water_flowing", {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -1617,7 +1617,7 @@ minetest.register_node("default:river_water_flowing", {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -1627,7 +1627,7 @@ minetest.register_node("default:river_water_flowing", {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -14,6 +14,22 @@ minetest.register_node("fruit:leaves_with_mango", {
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("fruit:leaves_with_apple", {
|
||||
description = "Leaves with Apple",
|
||||
drawtype = "allfaces",
|
||||
tiles = {
|
||||
"default_leaves.png^fruit_apple_leaves.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
groups = {snappy=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1},
|
||||
drop = "default:leaves",
|
||||
on_destruct = function(pos)
|
||||
minetest.add_item(pos, "default:apple")
|
||||
end,
|
||||
sounds = default.node_sound_leaves_defaults()
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("fruit:cactus_fruit", {
|
||||
description = "Cactus Fruit",
|
||||
drawtype = "plantlike",
|
||||
@ -229,6 +245,26 @@ function fruit.register_ores()
|
||||
persist = 0.0
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "fruit:leaves_with_apple",
|
||||
wherein = "default:leaves",
|
||||
clust_scarcity = 15 * 15 * 15,
|
||||
clust_num_ores = 6,
|
||||
clust_size = 4,
|
||||
y_min = 0,
|
||||
y_max = 31000,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 1,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = 766,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
|
BIN
mods/fruit/textures/fruit_apple_leaves.png
Normal file
BIN
mods/fruit/textures/fruit_apple_leaves.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 305 B |
@ -1,2 +1,3 @@
|
||||
default
|
||||
flowers
|
||||
fruit?
|
BIN
mods/mapgen/models/waterlily.b3d
Normal file
BIN
mods/mapgen/models/waterlily.b3d
Normal file
Binary file not shown.
@ -93,6 +93,93 @@ minetest.register_node("mapgen:dungeon_spawner", {
|
||||
|
||||
--plants (PLNT01)
|
||||
|
||||
minetest.register_node("mapgen:waterlily", {
|
||||
description = "Waterlily (no flower)",
|
||||
drawtype = "mesh",
|
||||
mesh = "waterlily.b3d",
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
visual_scale = 0.5,
|
||||
tiles = {"mapgen_waterlily_noflower.png",},
|
||||
inventory_image = "flowers_waterlily.png",
|
||||
wield_image = "flowers_waterlily.png",
|
||||
liquids_pointable = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
sunlight_propagates = true,
|
||||
floodable = true,
|
||||
groups = {snappy = 3, flower = 1, flammable = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
node_placement_prediction = "",
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, -15 / 32, 7 / 16}
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
local node = minetest.get_node(pointed_thing.under).name
|
||||
local def = minetest.registered_nodes[node]
|
||||
local player_name = placer:get_player_name()
|
||||
|
||||
if def and def.liquidtype == "source" and
|
||||
minetest.get_item_group(node, "water") > 0 then
|
||||
if not minetest.is_protected(pos, player_name) then
|
||||
if math.random(1,2) == 1 then
|
||||
minetest.set_node(pos, {name = "mapgen:waterlily",
|
||||
param2 = math.random(0, 3)})
|
||||
else
|
||||
minetest.set_node(pos, {name = "flowers:waterlily",
|
||||
param2 = math.random(0, 3)})
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(player_name, "Node is protected")
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
end
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.override_item("flowers:waterlily", {
|
||||
drawtype = "mesh",
|
||||
tiles = {"mapgen_waterlily.png"},
|
||||
mesh = "waterlily.b3d",
|
||||
paramtype = "light",
|
||||
visual_scale = 0.5,
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
local node = minetest.get_node(pointed_thing.under).name
|
||||
local def = minetest.registered_nodes[node]
|
||||
local player_name = placer:get_player_name()
|
||||
|
||||
if def and def.liquidtype == "source" and
|
||||
minetest.get_item_group(node, "water") > 0 then
|
||||
if not minetest.is_protected(pos, player_name) then
|
||||
if math.random(1,2) == 1 then
|
||||
minetest.set_node(pos, {name = "mapgen:waterlily",
|
||||
param2 = math.random(0, 3)})
|
||||
else
|
||||
minetest.set_node(pos, {name = "flowers:waterlily",
|
||||
param2 = math.random(0, 3)})
|
||||
end
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(player_name, "Node is protected")
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
end
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("mapgen:red_ground_flower", {
|
||||
description = "Red Ground flower",
|
||||
drawtype = "nodebox",
|
||||
|
BIN
mods/mapgen/textures/mapgen_waterlily.png
Normal file
BIN
mods/mapgen/textures/mapgen_waterlily.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
mods/mapgen/textures/mapgen_waterlily_noflower.png
Normal file
BIN
mods/mapgen/textures/mapgen_waterlily_noflower.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Loading…
x
Reference in New Issue
Block a user