Skip to content

Commit

Permalink
horse: Remove saddle from inventory when saddling horse
Browse files Browse the repository at this point in the history
  • Loading branch information
somechris committed Nov 16, 2024
1 parent 259e741 commit 34706eb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mobs/horse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,14 @@ creatura.register_mob("animalia:horse", {
return
end

local wielded_name = clicker:get_wielded_item():get_name()
local wielded_item = clicker:get_wielded_item()
local wielded_name = wielded_item:get_name()

if wielded_name == "animalia:saddle" then
if not minetest.is_creative_enabled(name) then
wielded_item:take_item()
clicker:set_wielded_item(wielded_item)
end
self:set_saddle(true)
return
end
Expand Down

0 comments on commit 34706eb

Please sign in to comment.