Merge pull request #59 from oversword/bls-186

Check harvester protection for each node it attempts to harvest
This commit is contained in:
Joachim Stolberg 2020-12-15 09:38:07 +01:00 committed by GitHub
commit 898ed2e766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -237,7 +237,7 @@ local function harvest_field(this, meta)
if node and node.name ~= "air" then
local order = tubelib_addons1.FarmingNodes[node.name] or tubelib_addons1.Flowers[node.name]
if order then
if not remove_or_replace_node(this, pos, inv, node, order) then
if not minetest.is_protected(pos, this.owner) and not remove_or_replace_node(this, pos, inv, node, order) then
return false
end
else