Commit 86ecbcd3 authored by Milan's avatar Milan

use mobs:saddle

parent a72192db
......@@ -186,14 +186,10 @@ mobs:register_egg("horses:horseh1", "Tamed Brown Horse", "mobs_horse_inv.png", 0
mobs:register_egg("horses:horsepegh1", "Tamed White Horse", "mobs_horse_peg_inv.png", 0)
mobs:register_egg("horses:horsearah1", "Tamed Arabic Horse", "mobs_horse_ara_inv.png", 0)
-- saddle
minetest.register_craftitem("horses:saddle", {
description = "Saddle",
inventory_image = "mobs_saddle.png",
})
minetest.register_alias("horses:saddle", "mobs:saddle")
minetest.register_craft({
output = "horses:saddle",
output = "mobs:saddle",
recipe = {
{'mobs:leather', 'mobs:leather', 'mobs:leather'},
{'mobs:leather', 'default:steel_ingot', 'mobs:leather'},
......@@ -234,8 +230,8 @@ mobs:register_mob("horses:horse", {
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
if tool:get_name() == "horses:saddle" then
clicker:get_inventory():remove_item("main", "horses:saddle")
if tool:get_name() == "mobs:saddle" then
clicker:get_inventory():remove_item("main", "mobs:saddle")
local pos = self.object:getpos()
self.object:remove()
minetest.add_entity(pos, "horses:horseh1")
......@@ -277,8 +273,8 @@ mobs:register_mob("horses:horse2", {
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
if tool:get_name() == "horses:saddle" then
clicker:get_inventory():remove_item("main", "horses:saddle")
if tool:get_name() == "mobs:saddle" then
clicker:get_inventory():remove_item("main", "mobs:saddle")
local pos = self.object:getpos()
self.object:remove()
minetest.add_entity(pos, "horses:horsepegh1")
......@@ -320,8 +316,8 @@ mobs:register_mob("horses:horse3", {
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
if tool:get_name() == "horses:saddle" then
clicker:get_inventory():remove_item("main", "horses:saddle")
if tool:get_name() == "mobs:saddle" then
clicker:get_inventory():remove_item("main", "mobs:saddle")
local pos = self.object:getpos()
self.object:remove()
minetest.add_entity(pos, "horses:horsearah1")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment