Add Magnetite and Nether bedrock upper limit
This commit is contained in:
parent
08b159fc14
commit
516abf28ea
9
mine.lua
9
mine.lua
@ -267,6 +267,7 @@ local ORES = Set{
|
|||||||
"create:zinc_ore",
|
"create:zinc_ore",
|
||||||
"create:deepslate_zinc_ore",
|
"create:deepslate_zinc_ore",
|
||||||
"create_new_age:thorium_ore",
|
"create_new_age:thorium_ore",
|
||||||
|
"create_new_age:magnetite_block",
|
||||||
|
|
||||||
"powah:deepslate_uraninite_ore_poor",
|
"powah:deepslate_uraninite_ore_poor",
|
||||||
"powah:deepslate_uraninite_ore",
|
"powah:deepslate_uraninite_ore",
|
||||||
@ -423,15 +424,17 @@ end
|
|||||||
function Miner:safeNeighbors(p)
|
function Miner:safeNeighbors(p)
|
||||||
local ns = {
|
local ns = {
|
||||||
p + vector.new( 1, 0, 0),
|
p + vector.new( 1, 0, 0),
|
||||||
p + vector.new( 0, 1, 0),
|
|
||||||
p + vector.new( 0, 0, 1),
|
p + vector.new( 0, 0, 1),
|
||||||
p + vector.new(-1, 0, 0),
|
p + vector.new(-1, 0, 0),
|
||||||
p + vector.new( 0, 0, -1),
|
p + vector.new( 0, 0, -1),
|
||||||
}
|
}
|
||||||
-- only allow downwards if above bedrock
|
-- only allow downwards if above / below bedrock
|
||||||
if (self.absolutePos - self.pos + p).y - 1 > -60 then
|
if (self.absolutePos - self.pos + p).y - 1 > -60 then
|
||||||
table.insert(ns, p + vector.new(0, -1, 0))
|
table.insert(ns, p + vector.new(0, -1, 0))
|
||||||
end
|
end
|
||||||
|
if self.dimension ~= "the_nether" or (self.absolutePos - self.pos + p).y + 1 < 123 then
|
||||||
|
table.insert(ns, p + vector.new(0, 1, 0))
|
||||||
|
end
|
||||||
|
|
||||||
return ns
|
return ns
|
||||||
end
|
end
|
||||||
@ -494,7 +497,7 @@ function Miner:findOres(radius)
|
|||||||
local found = {}
|
local found = {}
|
||||||
for _, b in ipairs(info) do
|
for _, b in ipairs(info) do
|
||||||
-- only ores and avoid bedrock
|
-- only ores and avoid bedrock
|
||||||
if ORES[b.name] and self.absolutePos.y + b.y > -60 then
|
if ORES[b.name] and self.absolutePos.y + b.y > -60 and (self.dimension ~= "the_nether" or self.absolutePos.y + b.y < 123) then
|
||||||
table.insert(found, b)
|
table.insert(found, b)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user