From 9be934ec2583f96d0455eb3e4db51e60774e7a8f Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 13 Apr 2021 12:41:09 +0100 Subject: [PATCH] make it possible to use advanced protector on normally protected mob --- api.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api.lua b/api.lua index 6b89916..0f3f776 100644 --- a/api.lua +++ b/api.lua @@ -4618,7 +4618,8 @@ function mobs:protect(self, clicker) return true end - if self.protected then + if (self.protected and tool_name == "mobs:protector") + or (self.protected == 2 and tool_name == "mobs:protector2") then minetest.chat_send_player(name, S("Already protected!")) return true end