minetest.register_abm({
nodenames = {"xdecor:cauldron_boiling_water"},
- interval = 3, chance = 1,
+ interval = 5, chance = 1,
action = function(pos, node)
local objs = minetest.get_objects_inside_radius(pos, 0.5)
if not objs then return end
for _, obj in pairs(objs) do
if obj and obj:get_luaentity() then
- local itemstring = obj:get_luaentity().itemstring:match(":([%w_]+)")
+ local itemstring = obj:get_luaentity().itemstring:match("[^:]+$")
if not next(ingredients) then
for _, rep in pairs(ingredients) do
if itemstring == rep then return end
end
function enchanting.put(_, listname, _, stack)
- local item = stack:get_name():match(":([%w_]+)")
+ local item = stack:get_name():match("[^:]+$")
if listname == "mese" and item == "mese_crystal" then
return stack:get_count()
elseif listname == "tool" and allowed(item) then
function worktable.get_recipe(item)
if item:find("^group:") then
if item:find("wool$") or item:find("dye$") then
- item = item:match(":([%w_]+)")..":white"
- elseif minetest.registered_items["default:"..item:match(":([%w_,]+)")] then
+ item = item:match("[^,:]+$")..":white"
+ elseif minetest.registered_items["default:"..item:match("[^,:]+$")] then
item = item:gsub("group:", "default:")
else
for node, definition in pairs(minetest.registered_items) do
- for group in pairs(definition.groups) do
- if item:match(".*"..group.."$") then
+ if definition.groups[item:match("[^,:]+$")] then
item = node
end
end
- end
end
end
return item
local stackname = stack:get_name()
local mod, node = stackname:match("([%w_]+):([%w_]+)")
- if (listname == "input" and worktable.contains(nodes[mod], node)) or
+ if (listname == "tool" and stack:get_wear() > 0 and stackname ~= "xdecor:hammer") or
+ (listname == "input" and worktable.contains(nodes[mod], node)) or
(listname == "hammer" and stackname == "xdecor:hammer") or
- (listname == "tool" and stack:get_wear() > 0) or
listname == "storage" then
return stack:get_count()
end