fix itemstrings and catching mechanic for mcl2

This commit is contained in:
cora 2022-08-11 03:57:21 +02:00
parent dc44a858da
commit dfa12a411a
1 changed files with 8 additions and 8 deletions

View File

@ -106,7 +106,7 @@ minetest.register_node("mcl_fireflies:hidden_firefly", {
minetest.register_tool("mcl_fireflies:bug_net", {
description = S("Bug Net"),
inventory_image = "fireflies_bugnet.png",
on_use = function(itemstack, player, pointed_thing)
on_place = function(itemstack, player, pointed_thing)
local player_name = player and player:get_player_name() or ""
if not pointed_thing or pointed_thing.type ~= "node" or
minetest.is_protected(pointed_thing.under, player_name) then
@ -123,7 +123,7 @@ minetest.register_tool("mcl_fireflies:bug_net", {
end
end
if not minetest.is_creative_enabled(player_name) then
itemstack:add_wear_by_uses(256)
itemstack:add_wear(256)
return itemstack
end
end
@ -132,9 +132,9 @@ minetest.register_tool("mcl_fireflies:bug_net", {
minetest.register_craft( {
output = "mcl_fireflies:bug_net",
recipe = {
{"farming:string", "farming:string"},
{"farming:string", "farming:string"},
{"group:stick", ""}
{"mcl_mobitems:string", "mcl_mobitems:string"},
{"mcl_mobitems:string", "mcl_mobitems:string"},
{"mcl_core:stick", ""}
}
})
@ -182,7 +182,7 @@ minetest.register_node("mcl_fireflies:firefly_bottle", {
end
if firefly_pos then
minetest.set_node(pos, {name = "vessels:glass_bottle"})
minetest.set_node(pos, {name = "mcl_potions:glass_bottle"})
minetest.set_node(firefly_pos, {name = "mcl_fireflies:firefly"})
minetest.get_node_timer(firefly_pos):start(1)
end
@ -193,7 +193,7 @@ minetest.register_craft( {
output = "mcl_fireflies:firefly_bottle",
recipe = {
{"mcl_fireflies:firefly"},
{"vessels:glass_bottle"}
{"mcl_potions:glass_bottle"}
}
})