mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-22 23:33:53 +01:00
Schematic: DIsallow unknown/ignore nodes
This commit is contained in:
parent
53fdfddd30
commit
cb5e291285
@ -23,6 +23,9 @@ function schematic.create(self, pos_min, pos_max)
|
|||||||
local data, light_data, param2_data = voxelmanip:get_data(), self.baked_light and voxelmanip:get_light_data() or {}, voxelmanip:get_param2_data()
|
local data, light_data, param2_data = voxelmanip:get_data(), self.baked_light and voxelmanip:get_light_data() or {}, voxelmanip:get_param2_data()
|
||||||
local nodes = {}
|
local nodes = {}
|
||||||
for index in voxelarea:iterp(pos_min, pos_max) do
|
for index in voxelarea:iterp(pos_min, pos_max) do
|
||||||
|
if data[index] == minetest.CONTENT_UNKNOWN or data[index] == minetest.CONTENT_IGNORE then
|
||||||
|
error("unknown or ignore node at " .. minetest.pos_to_string(voxelarea:position(index)))
|
||||||
|
end
|
||||||
table.insert(nodes, {
|
table.insert(nodes, {
|
||||||
name = minetest.get_name_from_content_id(data[index]),
|
name = minetest.get_name_from_content_id(data[index]),
|
||||||
light = light_data[index],
|
light = light_data[index],
|
||||||
|
Loading…
Reference in New Issue
Block a user