Commit 3347a618 authored by tchncs's avatar tchncs

fix modname in init.lua

parent b279a8f6
......@@ -161,7 +161,7 @@ local hrs = {
textures = {"mobs_horseh1.png"},
jmp = 2,
}
minetest.register_entity("kpgmobs:horseh1", merge(hrs, horse))
minetest.register_entity("horses:horseh1", merge(hrs, horse))
-- White Horse
......@@ -170,7 +170,7 @@ local peg = {
textures = {"mobs_horsepegh1.png"},
jmp = 2,
}
minetest.register_entity("kpgmobs:horsepegh1", merge(peg, horse))
minetest.register_entity("horses:horsepegh1", merge(peg, horse))
-- Black Horse
......@@ -179,21 +179,21 @@ local ara = {
textures = {"mobs_horsearah1.png"},
jmp = 3,
}
minetest.register_entity("kpgmobs:horsearah1", merge(ara, horse))
minetest.register_entity("horses:horsearah1", merge(ara, horse))
-- tamed horse spawn eggs
mobs:register_egg("kpgmobs:horseh1", "Tamed Brown Horse", "mobs_horse_inv.png", 0)
mobs:register_egg("kpgmobs:horsepegh1", "Tamed White Horse", "mobs_horse_peg_inv.png", 0)
mobs:register_egg("kpgmobs:horsearah1", "Tamed Arabic Horse", "mobs_horse_ara_inv.png", 0)
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("kpgmobs:saddle", {
minetest.register_craftitem("horses:saddle", {
description = "Saddle",
inventory_image = "mobs_saddle.png",
})
minetest.register_craft({
output = "kpgmobs:saddle",
output = "horses:saddle",
recipe = {
{'mobs:leather', 'mobs:leather', 'mobs:leather'},
{'mobs:leather', 'default:steel_ingot', 'mobs:leather'},
......@@ -201,7 +201,7 @@ minetest.register_craft({
}
})
mobs:register_mob("kpgmobs:horse", {
mobs:register_mob("horses:horse", {
type = "animal",
hp_min = 5,
hp_max = 10,
......@@ -234,17 +234,17 @@ mobs:register_mob("kpgmobs:horse", {
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
if tool:get_name() == "kpgmobs:saddle" then
clicker:get_inventory():remove_item("main", "kpgmobs:saddle")
if tool:get_name() == "horses:saddle" then
clicker:get_inventory():remove_item("main", "horses:saddle")
local pos = self.object:getpos()
self.object:remove()
minetest.add_entity(pos, "kpgmobs:horseh1")
minetest.add_entity(pos, "horses:horseh1")
end
end,
})
mobs:register_spawn("kpgmobs:horse", {"default:dirt_with_grass"}, 20, 8, 200, 1, 31000)
mobs:register_spawn("horses:horse", {"default:dirt_with_grass"}, 20, 8, 200, 1, 31000)
mobs:register_mob("kpgmobs:horse2", {
mobs:register_mob("horses:horse2", {
type = "animal",
hp_min = 5,
hp_max = 10,
......@@ -277,17 +277,17 @@ mobs:register_mob("kpgmobs:horse2", {
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
if tool:get_name() == "kpgmobs:saddle" then
clicker:get_inventory():remove_item("main", "kpgmobs:saddle")
if tool:get_name() == "horses:saddle" then
clicker:get_inventory():remove_item("main", "horses:saddle")
local pos = self.object:getpos()
self.object:remove()
minetest.add_entity(pos, "kpgmobs:horsepegh1")
minetest.add_entity(pos, "horses:horsepegh1")
end
end,
})
mobs:register_spawn("kpgmobs:horse2", {"default:dirt_with_grass"}, 20, 8, 150, 1, 31000)
mobs:register_spawn("horses:horse2", {"default:dirt_with_grass"}, 20, 8, 150, 1, 31000)
mobs:register_mob("kpgmobs:horse3", {
mobs:register_mob("horses:horse3", {
type = "animal",
hp_min = 5,
hp_max = 10,
......@@ -320,21 +320,21 @@ mobs:register_mob("kpgmobs:horse3", {
on_rightclick = function(self, clicker)
local tool = clicker:get_wielded_item()
if tool:get_name() == "kpgmobs:saddle" then
clicker:get_inventory():remove_item("main", "kpgmobs:saddle")
if tool:get_name() == "horses:saddle" then
clicker:get_inventory():remove_item("main", "horses:saddle")
local pos = self.object:getpos()
self.object:remove()
minetest.add_entity(pos, "kpgmobs:horsearah1")
minetest.add_entity(pos, "horses:horsearah1")
end
end,
})
mobs:register_spawn("kpgmobs:horse3", {"default:desert_sand"}, 20, 8, 120, 1, 31000)
mobs:register_spawn("horses:horse3", {"default:desert_sand"}, 20, 8, 120, 1, 31000)
-- wild horse spawn eggs
mobs:register_egg("kpgmobs:horse", "Brown Horse", "mobs_horse_inv.png", 0)
mobs:register_egg("kpgmobs:horse2", "White Horse", "mobs_horse_peg_inv.png", 0)
mobs:register_egg("kpgmobs:horse3", "Arabic Horse", "mobs_horse_ara_inv.png", 0)
mobs:register_egg("horses:horse", "Brown Horse", "mobs_horse_inv.png", 0)
mobs:register_egg("horses:horse2", "White Horse", "mobs_horse_peg_inv.png", 0)
mobs:register_egg("horses:horse3", "Arabic Horse", "mobs_horse_ara_inv.png", 0)
if minetest.setting_get("log_mods") then
minetest.log("action", "kpgmobs loaded")
minetest.log("action", "horses loaded")
end
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