Use element key for grass block

This commit is contained in:
mrkubax10 2023-04-13 09:35:10 +03:00
parent 38283540bb
commit 7925b5d65a
2 changed files with 3 additions and 1 deletions

View File

@ -520,6 +520,7 @@ if industrialtest.mclAvailable then
industrialtest.elementKeys.ice="mcl_core:ice" industrialtest.elementKeys.ice="mcl_core:ice"
industrialtest.elementKeys.sandstone="mcl_core:sandstone" industrialtest.elementKeys.sandstone="mcl_core:sandstone"
industrialtest.elementKeys.dirt="mcl_core:dirt" industrialtest.elementKeys.dirt="mcl_core:dirt"
industrialtest.elementKeys.grassBlock="mcl_core:dirt_with_grass"
industrialtest.elementKeys.obsidian="mcl_core:obsidian" industrialtest.elementKeys.obsidian="mcl_core:obsidian"
industrialtest.elementKeys.whiteWool="mcl_wool:white" industrialtest.elementKeys.whiteWool="mcl_wool:white"
industrialtest.elementKeys.coalBlock="mcl_core:coalblock" industrialtest.elementKeys.coalBlock="mcl_core:coalblock"
@ -728,6 +729,7 @@ elseif industrialtest.mtgAvailable then
industrialtest.elementKeys.ice="default:ice" industrialtest.elementKeys.ice="default:ice"
industrialtest.elementKeys.sandstone="default:sandstone" industrialtest.elementKeys.sandstone="default:sandstone"
industrialtest.elementKeys.dirt="default:dirt" industrialtest.elementKeys.dirt="default:dirt"
industrialtest.elementKeys.grassBlock="default:dirt_with_grass"
industrialtest.elementKeys.obsidian="default:obsidian" industrialtest.elementKeys.obsidian="default:obsidian"
industrialtest.elementKeys.whiteWool="wool:white" industrialtest.elementKeys.whiteWool="wool:white"
industrialtest.elementKeys.coalBlock="default:coalblock" industrialtest.elementKeys.coalBlock="default:coalblock"

View File

@ -19,7 +19,7 @@ minetest.register_on_generated(function(minp,maxp,seed)
return return
end end
local center=vector.new((maxp.x-minp.x)/2+ minp.x,(maxp.y-minp.y)/2+minp.y,(maxp.z-minp.z)/2+minp.z) local center=vector.new((maxp.x-minp.x)/2+ minp.x,(maxp.y-minp.y)/2+minp.y,(maxp.z-minp.z)/2+minp.z)
local pos=minetest.find_node_near(center,maxp.x-minp.x,{"default:dirt_with_grass"}) local pos=minetest.find_node_near(center,maxp.x-minp.x,{industrialtest.elementKeys.grassBlock})
if pos then if pos then
industrialtest.makeRubberTree(pos) industrialtest.makeRubberTree(pos)
end end