1
0
Fork 0

Throw experience points after food is cooked

This commit is contained in:
PrairieWind 2023-06-27 17:00:42 -06:00 committed by ancientmarinerdev
parent 04b59b2190
commit 21f0c7750b
1 changed files with 4 additions and 0 deletions

View File

@ -138,6 +138,10 @@ function mcl_campfires.cook_item(pos, elapsed)
meta:set_string("food_z_"..tostring(i), nil)
end
minetest.add_item(pos, cooked.item) -- Drop Cooked Item
-- Throw some Experience Points because why not?
-- Food is cooked, xp is deserved for using this unique cooking method. Take that Minecraft ;)
local dir = vector.divide(minetest.facedir_to_dir(minetest.get_node(pos).param2),-1.95)
mcl_experience.throw_xp(vector.add(pos, dir), 1)
inv:set_stack("main", i, "") -- Clear Inventory
continue = continue + 1 -- Indicate that the slot is clear.
end