]> git.lizzy.rs Git - xdecor.git/commitdiff
Fix formspec enchants not triggering when placing 3d_armor elements
authorkilbith <jeanpatrick.guerrero@gmail.com>
Fri, 22 Jan 2016 11:06:17 +0000 (12:06 +0100)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Fri, 22 Jan 2016 11:06:17 +0000 (12:06 +0100)
enchanting.lua

index 7c2a3b41e4e64a832d1ab16a8927d34c0478d6db..c982cc6666c0d0fc372fc4d5966de59084ba3010 100644 (file)
@@ -33,7 +33,7 @@ function enchanting.on_put(pos, listname, _, stack)
                for k, v in pairs({"axe, pick, shovel",
                                "chestplate, leggings, helmet",
                                "sword", "boots"}) do
-                       if v:match(stack:get_name():match("([^:]+)%_")) then
+                       if v:match(stack:get_name():match(":(.-)%_")) then
                                enchanting.formspec(pos, k)
                        end
                end