forked from MineClone5/MineClone5
Fix fishing pole fishing unknown items
This commit is contained in:
parent
67f0eae19c
commit
d6f8da2ab4
|
@ -67,7 +67,7 @@ minetest.register_tool("mcl_fishing:fishing_rod", {
|
||||||
-- TODO: Enchanted and damaged
|
-- TODO: Enchanted and damaged
|
||||||
itemname = "mcl_fishing:fishing_rod"
|
itemname = "mcl_fishing:fishing_rod"
|
||||||
elseif r == 4 then
|
elseif r == 4 then
|
||||||
itemname = "mobs:naming_tag"
|
itemname = "mobs:nametag"
|
||||||
elseif r == 5 then
|
elseif r == 5 then
|
||||||
itemname = "mcl_mobitems:saddle"
|
itemname = "mcl_mobitems:saddle"
|
||||||
elseif r == 6 then
|
elseif r == 6 then
|
||||||
|
@ -75,8 +75,8 @@ minetest.register_tool("mcl_fishing:fishing_rod", {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local inv = user:get_inventory()
|
local inv = user:get_inventory()
|
||||||
if inv:room_for_item("main", {name=itemname, count=1, wear=0, metadata=""}) then
|
if inv:room_for_item("main", {name=itemname, count=itemcount, wear=0, metadata=""}) then
|
||||||
inv:add_item("main", {name=itemname, count=1, wear=0, metadata=""})
|
inv:add_item("main", {name=itemname, count=itemcount, wear=0, metadata=""})
|
||||||
end
|
end
|
||||||
if not minetest.setting_get("creative_mode") then
|
if not minetest.setting_get("creative_mode") then
|
||||||
itemstack:add_wear(66000/65) -- 65 uses
|
itemstack:add_wear(66000/65) -- 65 uses
|
||||||
|
|
Loading…
Reference in New Issue