This commit is contained in:
D00Med 2017-08-29 09:40:45 +10:00
parent a254a8f922
commit 60ac9782ea
4 changed files with 21 additions and 15 deletions

View File

@ -39,8 +39,9 @@ minetest.register_craftitem("farming:wheat", {
minetest.register_node("farming:straw", {
description = "Straw",
tiles = {"farming_straw_top.png", "farming_straw.png"},
tiles = {"farming_straw_top.png", "farming_straw_top.png", "farming_straw.png"},
paramtype2 = "facedir",
on_place = minetest.rotate_node,
is_ground_content = false,
groups = {snappy = 3, flammable = 4},
sounds = default.node_sound_leaves_defaults(),

View File

@ -51,6 +51,7 @@ minetest.register_node("fruit:cactus_fruit", {
paramtype = "light",
groups = {fleshy=1, oddly_breakable_by_hand=1,},
inventory_image = "fruit_cactus_inv.png",
wield_image = "fruit_cactus_inv.png",
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",

View File

@ -102,7 +102,7 @@ mobs:spawn({
name = "mobs_npc:travelling_merchant",
nodes = {"default:dirt_with_grass"},
min_light = 7,
chance = 20000,
chance = 80000,
min_height = 0,
})

View File

@ -74,31 +74,35 @@ local function get_positions(pos)
{{x=pos.x-10, y=pos.y, z=pos.z+32}},
{{x=pos.x-10, y=pos.y, z=pos.z+53}},
{{x=pos.x-10, y=pos.y, z=pos.z+74}},
{{x=pos.x-32, y=pos.y, z=pos.z+11}},
{{x=pos.x-32, y=pos.y, z=pos.z+32}},
{{x=pos.x-32, y=pos.y, z=pos.z+53}},
{{x=pos.x-32, y=pos.y, z=pos.z+74}},
}
return positions
end
local function find_ground(pos)
local pos2 = pos
local pos = pos
local node = minetest.get_node(pos).name
if minetest.get_item_group(node, "cracky") > 0 or minetest.get_item_group(node, "crumbly") > 0 then
return pos
end
for i=-10,20 do
pos2.y = pos2.y-i
local node = minetest.get_node(pos).name
for i=-20,30 do
local pos2 = pos
pos2.y = pos.y+i
local node = minetest.get_node(pos2).name
local node2 = minetest.get_node({x=pos2.x, y=pos2.y+1, z=pos2.z}).name
if minetest.get_item_group(node, "cracky") > 0 or minetest.get_item_group(node, "crumbly") > 0 then
pos.y = pos2.y
return pos
if minetest.get_item_group(node2, "cracky") <= 0 and minetest.get_item_group(node2, "crumbly") <= 0 then
pos.y = pos2.y
minetest.chat_send_all(minetest.pos_to_string(pos, 0))
return pos
end
end
end
end
local village_rarity = 10
local village_rarity = 1
minetest.register_on_generated(function(minp, maxp)
if maxp.y > 3000 or maxp.y < -50 then
if maxp.y > 8000 or maxp.y < -20 then
return
end
if math.random(1, village_rarity) == 1 then
@ -121,4 +125,4 @@ minetest.register_on_generated(function(minp, maxp)
end
end
end
end)
end)