mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Merge pull request 'Geode fixes' (#2389) from geode_size into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2389 Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
commit
b08a79b070
@ -117,7 +117,6 @@ for _, def in pairs(bud_def) do
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
light_source = def.light_source,
|
light_source = def.light_source,
|
||||||
groups = {
|
groups = {
|
||||||
dig_by_water = 1,
|
|
||||||
destroy_by_lava_flow = 1,
|
destroy_by_lava_flow = 1,
|
||||||
dig_by_piston = 1,
|
dig_by_piston = 1,
|
||||||
pickaxey = 1,
|
pickaxey = 1,
|
||||||
@ -162,7 +161,6 @@ minetest.register_node("mcl_amethyst:amethyst_cluster",{
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
light_source = 7,
|
light_source = 7,
|
||||||
groups = {
|
groups = {
|
||||||
dig_by_water = 1,
|
|
||||||
destroy_by_lava_flow = 1,
|
destroy_by_lava_flow = 1,
|
||||||
dig_by_piston = 1,
|
dig_by_piston = 1,
|
||||||
pickaxey = 1,
|
pickaxey = 1,
|
||||||
|
@ -20,13 +20,13 @@ local function makegeode(pos,def,pr)
|
|||||||
minetest.emerge_area(p1, p2, function(blockpos, action, calls_remaining, param)
|
minetest.emerge_area(p1, p2, function(blockpos, action, calls_remaining, param)
|
||||||
if calls_remaining ~= 0 then return end
|
if calls_remaining ~= 0 then return end
|
||||||
local calcite = {}
|
local calcite = {}
|
||||||
local nn = minetest.find_nodes_in_area(p1,p2,{"group:material_stone"})
|
local nn = minetest.find_nodes_in_area(p1,p2,{"group:material_stone","group:dirt","mcl_core:gravel"})
|
||||||
table.sort(nn,function(a, b)
|
table.sort(nn,function(a, b)
|
||||||
return vector.distance(pos, a) < vector.distance(pos, b)
|
return vector.distance(pos, a) < vector.distance(pos, b)
|
||||||
end)
|
end)
|
||||||
if not nn[1] then return end
|
if not nn[1] then return end
|
||||||
|
|
||||||
for i=1,math.random(#nn) do
|
for i=1,pr:next(1,math.max(2,#nn - math.ceil(#nn/5) )) do
|
||||||
set_node_no_bedrock(nn[i],{name="mcl_amethyst:amethyst_block"})
|
set_node_no_bedrock(nn[i],{name="mcl_amethyst:amethyst_block"})
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ local function makegeode(pos,def,pr)
|
|||||||
set_node_no_bedrock(v,{name="mcl_amethyst:budding_amethyst_block"})
|
set_node_no_bedrock(v,{name="mcl_amethyst:budding_amethyst_block"})
|
||||||
end
|
end
|
||||||
all_amethyst = false
|
all_amethyst = false
|
||||||
elseif an.name ~= "mcl_amethyst:amethyst_block" and an.name ~= "air" then
|
elseif an.name ~= "mcl_amethyst:amethyst_block" and an.name ~= "air" and an.name ~= "mcl_amethyst:budding_amethyst_block" then
|
||||||
all_amethyst = false
|
all_amethyst = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user