Compare commits

30 Commits

Author SHA1 Message Date
94351e84e0 Merge remote-tracking branch 'upstream/master' 2025-03-20 11:48:18 +01:00
3deab2d01c view range 7 2025-01-11 11:36:03 +00:00
58d84da9eb horse can defend itself 2025-01-11 11:35:27 +00:00
ac8cb2ec70 tweak on_sound example 2024-10-01 09:10:37 +01:00
2ff662c2e1 Merge remote-tracking branch 'upstream/master' 2024-09-15 09:21:46 +02:00
868e5a88f4 tidy code 2024-08-10 14:57:23 +01:00
12e6d718cb edit on_sound example to use new loudness scale 2024-08-04 08:27:28 +01:00
9f272940f6 add on_sound example 2024-08-03 11:35:57 +01:00
b70e7d81b5 fix fall damage value 2024-07-01 07:45:14 +01:00
e36feea1a4 Merge remote-tracking branch 'upstream/master' 2023-11-22 23:46:14 +01:00
cf4bf3df99 increase saddled horse stepheight to 1.2 2023-10-09 07:21:14 +01:00
a97f7e04bb tidy code 2023-08-13 10:45:19 +01:00
83198a8531 remove intllib 2023-08-08 16:43:18 +01:00
1c10898fb2 Merge remote-tracking branch 'upstream/master' 2023-06-07 21:48:27 +02:00
2d2211c51d amend loaded msg 2022-12-19 17:08:55 +00:00
2e4cc8a90b fix driver eye level 2022-09-29 14:47:53 +01:00
55f921d7c9 code tidy 2022-09-27 11:34:33 +01:00
af59d1e2b7 Merge remote-tracking branch 'upstream/master' 2022-03-05 11:24:11 +01:00
4022ae9a02 horses are good swimmers, remove water damage 2022-02-15 09:21:08 +00:00
f7ac229ccf fix typo (thx SwissaplS) 2022-02-08 18:20:38 +00:00
6d4701ca5f Merge remote-tracking branch 'upstream/master' 2022-01-22 20:01:06 +01:00
8996ad27d8 update translation checks 2022-01-20 08:57:36 +00:00
f550d5b4a1 Merge remote-tracking branch 'upstream/master' 2021-11-26 21:42:13 +01:00
9e0021a0f8 fix intllib return 2021-11-14 14:23:03 +00:00
d0ccec70cb Merge remote-tracking branch 'upstream/master' 2021-11-01 10:30:36 +01:00
7650e9ba5c tidy code, add custom spawn.lua check 2021-10-18 08:32:12 +01:00
0cbaa0b223 Merge remote-tracking branch 'upstream/master' 2021-06-20 17:11:26 +02:00
aa399a6ef9 shrink driver when riding horse to fit model 2021-06-11 14:20:55 +01:00
23ab8bddbd set lasso capture chance 100% 2021-06-10 15:54:30 +01:00
decb1c384c redo saddles and add overlay 2021-06-10 15:47:34 +01:00
13 changed files with 209 additions and 378 deletions

View File

@ -1,3 +0,0 @@
mobs
lucky_block?
intllib?

242
init.lua
View File

@ -1,16 +1,11 @@
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S = minetest.get_translator and minetest.get_translator("mob_horse") or
dofile(MP .. "/intllib.lua")
-- translation and get mod path
-- 0.4.17 or 5.0 check
local y_off = 20
if minetest.features.object_independent_selectionbox then
y_off = 10
end
local S = minetest.get_translator("mob_horse")
local MP = minetest.get_modpath(minetest.get_current_modname()) .. "/"
-- horse shoes (speed, jump, brake/reverse speed, overlay texture)
-- horse shoes (speed, jump, break, overlay texture)
local shoes = {
["mobs:horseshoe_steel"] = {7, 4, 2, "mobs_horseshoe_steelo.png"},
["mobs:horseshoe_bronze"] = {7, 4, 4, "mobs_horseshoe_bronzeo.png"},
@ -20,6 +15,7 @@ local shoes = {
}
-- rideable horse
mobs:register_mob("mob_horse:horse", {
type = "animal",
visual = "mesh",
@ -27,19 +23,13 @@ mobs:register_mob("mob_horse:horse", {
mesh = "mobs_horse.x",
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
animation = {
speed_normal = 15,
speed_run = 30,
stand_start = 25,
stand_end = 50, -- 75
stand2_start = 25,
stand2_end = 25,
stand3_start = 55,
stand3_end = 75,
stand3_loop = false,
walk_start = 75,
walk_end = 100,
run_start = 75,
run_end = 100,
speed_normal = 15, speed_run = 30,
stand_start = 25, stand_end = 50, -- 75
stand2_start = 25, stand2_end = 25,
stand3_start = 55, stand3_end = 75, stand3_loop = false,
walk_start = 75, walk_end = 100,
run_start = 75, run_end = 100,
punch_start = 55, punch_end = 75, punch_speed = 35,
},
textures = {
{"mobs_horse.png"}, -- textures by Mjollna
@ -47,23 +37,27 @@ mobs:register_mob("mob_horse:horse", {
{"mobs_horseara.png"}
},
fear_height = 3,
runaway = true,
--runaway = true,
fly = false,
walk_chance = 60,
view_range = 5,
view_range = 7,
follow = {
"farming:wheat", "default:apple", "farming:oat",
"farming:barley", "farming:corn"},
passive = true,
hp_min = 12,
hp_max = 16,
armor = 200,
"farming:barley", "farming:corn"
},
passive = false, attack_type = "dogfight", reach = 2.5, damage = 3,
attack_monsters = true,
hp_min = 15,
hp_max = 23,
armor = 100,
lava_damage = 5,
fall_damage = 5,
water_damage = 1,
fire_damage = 4,
fall_damage = 1,
water_damage = 0,
makes_footstep_sound = true,
drops = {
{name = "mobs:leather", chance = 1, min = 0, max = 2}
{name = "mobs:leather", chance = 1, min = 0, max = 2},
{name = "mobs:meat_raw", chance = 1, min = 1, max = 2}
},
do_custom = function(self, dtime)
@ -75,8 +69,9 @@ mobs:register_mob("mob_horse:horse", {
self.max_speed_reverse = 2
self.accel = 6
self.terrain_type = 3
self.driver_attach_at = {x = 0, y = y_off, z = -2}
self.driver_eye_offset = {x = 0, y = 3, z = 0}
self.driver_attach_at = {x = 0, y = 10, z = -2}
self.driver_eye_offset = {x = 0, y = 10 + 3, z = 0}
self.driver_scale = {x = 0.8, y = 0.8} -- shrink driver to fit model
end
-- if driver present allow control of horse
@ -92,22 +87,20 @@ mobs:register_mob("mob_horse:horse", {
on_die = function(self, pos)
-- drop saddle when horse is killed while riding
-- also detach from horse properly
-- detach player from horse properly
if self.driver then
minetest.add_item(pos, "mobs:saddle")
mobs.detach(self.driver, {x = 1, y = 0, z = 1})
end
self.saddle = nil
-- drop saddle if found
if self.saddle then
minetest.add_item(pos, "mobs:saddle")
end
-- drop any horseshoes added
if self.shoed then
minetest.add_item(pos, self.shoed)
end
end,
do_punch = function(self, hitter)
@ -121,19 +114,13 @@ mobs:register_mob("mob_horse:horse", {
on_rightclick = function(self, clicker)
-- make sure player is clicking
if not clicker or not clicker:is_player() then
return
end
if not clicker or not clicker:is_player() then return end
-- feed, tame or heal horse
if mobs:feed_tame(self, clicker, 10, true, true) then
return
end
if mobs:feed_tame(self, clicker, 10, true, true) then return end
-- applying protection rune
if mobs:protect(self, clicker) then
return
end
if mobs:protect(self, clicker) then return end
local player_name = clicker:get_player_name()
@ -149,29 +136,26 @@ mobs:register_mob("mob_horse:horse", {
mobs.detach(clicker, {x = 1, y = 0, z = 1})
-- add saddle back to inventory
if inv:room_for_item("main", "mobs:saddle") then
inv:add_item("main", "mobs:saddle")
else
minetest.add_item(clicker:get_pos(), "mobs:saddle")
end
return
end
self.saddle = nil
-- attach player to horse
elseif (not self.driver and not self.child
and clicker:get_wielded_item():get_name() == "mobs:saddle")
or self.saddle then
self.object:set_properties({stepheight = 1.1})
mobs.attach(self, clicker)
-- take saddle from inventory
if not self.saddle then
inv:remove_item("main", "mobs:saddle")
end
-- attach saddle to horse
if not self.driver and not self.child
and clicker:get_wielded_item():get_name() == "mobs:saddle"
and not self.saddle then
self.saddle = true
self.order = "stand"
self.object:set_properties({stepheight = 1.2})
-- take saddle from inventory
inv:remove_item("main", "mobs:saddle")
self.texture_mods = self.texture_mods .. "^mobs_saddle_overlay.png"
self.object:set_texture_mod(self.texture_mods)
return
end
-- apply horseshoes
@ -195,7 +179,14 @@ mobs:register_mob("mob_horse:horse", {
-- apply horseshoe overlay to current horse texture
if overlay then
self.texture_mods = "^" .. overlay
if self.saddle then
self.texture_mods = self.texture_mods
.. "^mobs_saddle_overlay.png"
end
self.object:set_texture_mod(self.texture_mods)
end
@ -215,25 +206,49 @@ mobs:register_mob("mob_horse:horse", {
end
-- used to capture horse with magic lasso
mobs:capture_mob(self, clicker, 0, 0, 80, false, nil)
if mobs:capture_mob(self, clicker, nil, nil, 100, false, nil) then return end
-- ride horse if saddled
if self.saddle and self.owner == player_name then
mobs.attach(self, clicker)
end
end,
--[[
on_sound = function(self, def)
if def.loudness > 0.8 then -- if loud enough startle horse into jumping
self.object:set_velocity({x = 0, y = 5, z = 0})
end
end
]]
})
mobs:spawn({
name = "mob_horse:horse",
nodes = {"default:dirt_with_grass", "ethereal:dry_dirt"},
min_light = 14,
interval = 60,
chance = 16000,
min_height = 10,
max_height = 31000,
day_toggle = true,
})
-- check for custom spawn.lua
local input = io.open(MP .. "spawn.lua", "r")
if input then
input:close()
input = nil
dofile(MP .. "spawn.lua")
else
mobs:spawn({
name = "mob_horse:horse",
nodes = {"default:dirt_with_grass", "ethereal:dry_dirt"},
min_light = 14,
interval = 60,
chance = 16000,
min_height = 10,
max_height = 31000,
day_toggle = true
})
end
-- spawn egg
mobs:register_egg("mob_horse:horse", S("Horse"), "wool_brown.png", 1)
-- steel horseshoes
minetest.register_craftitem(":mobs:horseshoe_steel", {
description = S("Steel HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_steel.png",
@ -244,14 +259,15 @@ minetest.register_craft({
recipe = {
{"", "default:steelblock", ""},
{"default:steel_ingot", "", "default:steel_ingot"},
{"default:steel_ingot", "", "default:steel_ingot"},
{"default:steel_ingot", "", "default:steel_ingot"}
}
})
-- bronze horseshoes
minetest.register_craftitem(":mobs:horseshoe_bronze", {
description = S("Bronze HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_bronze.png",
inventory_image = "mobs_horseshoe_bronze.png"
})
minetest.register_craft({
@ -259,14 +275,15 @@ minetest.register_craft({
recipe = {
{"", "default:bronzeblock", ""},
{"default:bronze_ingot", "", "default:bronze_ingot"},
{"default:bronze_ingot", "", "default:bronze_ingot"},
{"default:bronze_ingot", "", "default:bronze_ingot"}
}
})
-- mese horseshoes
minetest.register_craftitem(":mobs:horseshoe_mese", {
description = S("Mese HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_mese.png",
inventory_image = "mobs_horseshoe_mese.png"
})
minetest.register_craft({
@ -274,14 +291,15 @@ minetest.register_craft({
recipe = {
{"", "default:mese", ""},
{"default:mese_crystal_fragment", "", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "", "default:mese_crystal_fragment"}
}
})
-- diamond horseshoes
minetest.register_craftitem(":mobs:horseshoe_diamond", {
description = S("Diamond HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_diamond.png",
inventory_image = "mobs_horseshoe_diamond.png"
})
minetest.register_craft({
@ -289,40 +307,40 @@ minetest.register_craft({
recipe = {
{"", "default:diamondblock", ""},
{"default:diamond", "", "default:diamond"},
{"default:diamond", "", "default:diamond"},
{"default:diamond", "", "default:diamond"}
}
})
-- crystal horseshoes
if minetest.get_modpath("ethereal") then
minetest.register_craftitem(":mobs:horseshoe_crystal", {
description = S("Crystal HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_crystal.png",
})
minetest.register_craft({
output = "mobs:horseshoe_crystal",
recipe = {
{"", "ethereal:crystal_block", ""},
{"ethereal:crystal_ingot", "", "ethereal:crystal_ingot"},
{"ethereal:crystal_ingot", "", "ethereal:crystal_ingot"},
}
})
minetest.register_craftitem(":mobs:horseshoe_crystal", {
description = S("Crystal HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_crystal.png"
})
minetest.register_craft({
output = "mobs:horseshoe_crystal",
recipe = {
{"", "ethereal:crystal_block", ""},
{"ethereal:crystal_ingot", "", "ethereal:crystal_ingot"},
{"ethereal:crystal_ingot", "", "ethereal:crystal_ingot"}
}
})
end
-- lucky blocks
if minetest.get_modpath("lucky_block") then
lucky_block:add_blocks({
{"dro", {"mobs:horseshoe_steel"}},
{"dro", {"mobs:horseshoe_bronze"}},
{"dro", {"mobs:horseshoe_mese"}},
{"dro", {"mobs:horseshoe_diamond"}},
{"dro", {"mobs:horseshoe_crystal"}}
})
lucky_block:add_blocks({
{"dro", {"mobs:horseshoe_steel"}},
{"dro", {"mobs:horseshoe_bronze"}},
{"dro", {"mobs:horseshoe_mese"}},
{"dro", {"mobs:horseshoe_diamond"}},
{"dro", {"mobs:horseshoe_crystal"}}
})
end
minetest.log("action", "[mob_horse] loaded.")
print("[MOD] Mobs Redo Horse loaded")

View File

@ -1,3 +0,0 @@
-- Support for the old multi-load method
dofile(minetest.get_modpath("intllib").."/init.lua")

View File

@ -1,59 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 00:07+0800\n"
"PO-Revision-Date: 2020-05-11 13:43+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
"Last-Translator: Hamlet <hamlatgitlab@riseup.net>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: it_IT\n"
#: init.lua
msgid "Horse"
msgstr "Cavallo"
#: init.lua
msgid "Horse shoes fitted -"
msgstr "Ferri di cavallo indossati -"
#: init.lua
msgid " speed: "
msgstr " velocità: "
#: init.lua
msgid " , jump height: "
msgstr " , altezza di salto: "
#: init.lua
msgid " , stop speed: "
msgstr " , velocità di arresto: "
#: init.lua
msgid "Horse shoes only work on horses!"
msgstr "I ferri di cavallo funzionano solo sui cavalli!"
#: init.lua
msgid "Steel HorseShoes (use on horse to apply)"
msgstr "Ferri di cavallo d'acciaio (usarli su un cavallo per applicarli)"
#: init.lua
msgid "Bronze HorseShoes (use on horse to apply)"
msgstr "Ferri di cavallo di bronzo (usarli su un cavallo per applicarli)"
#: init.lua
msgid "Mese HorseShoes (use on horse to apply)"
msgstr "Ferri di cavallo di mese (usarli su un cavallo per applicarli)"
#: init.lua
msgid "Diamond HorseShoes (use on horse to apply)"
msgstr "Ferri di cavallo di diamante (usarli su un cavallo per applicarli)"

View File

@ -1,59 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 00:07+0800\n"
"PO-Revision-Date: 2018-02-06 00:14+0800\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
"Last-Translator: MuhdNurHidayat (MNH48) <mnh48mail@gmail.com>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language: ms\n"
#: init.lua
msgid "Horse"
msgstr "Kuda"
#: init.lua
msgid "Horse shoes fitted -"
msgstr "Ladam telah dipasang pada kuda -"
#: init.lua
msgid " speed: "
msgstr " kelajuan: "
#: init.lua
msgid " , jump height: "
msgstr " , ketinggian lompat: "
#: init.lua
msgid " , stop speed: "
msgstr " , kelajuan berhenti: "
#: init.lua
msgid "Horse shoes only work on horses!"
msgstr "Ladam hanya boleh dipakaikan pada kuda!"
#: init.lua
msgid "Steel HorseShoes (use on horse to apply)"
msgstr "Ladam Kuda Keluli (guna pada kuda untuk pakaikan ia)"
#: init.lua
msgid "Bronze HorseShoes (use on horse to apply)"
msgstr "Ladam Kuda Gangsa (guna pada kuda untuk pakaikan ia)"
#: init.lua
msgid "Mese HorseShoes (use on horse to apply)"
msgstr "Ladam Kuda Mese (guna pada kuda untuk pakaikan ia)"
#: init.lua
msgid "Diamond HorseShoes (use on horse to apply)"
msgstr "Ladam Kuda Intan (guna pada kuda untuk pakaikan ia)"

View File

@ -1,58 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 00:07+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua
msgid "Horse"
msgstr ""
#: init.lua
msgid "Horse shoes fitted -"
msgstr ""
#: init.lua
msgid " speed: "
msgstr ""
#: init.lua
msgid " , jump height: "
msgstr ""
#: init.lua
msgid " , stop speed: "
msgstr ""
#: init.lua
msgid "Horse shoes only work on horses!"
msgstr ""
#: init.lua
msgid "Steel HorseShoes (use on horse to apply)"
msgstr ""
#: init.lua
msgid "Bronze HorseShoes (use on horse to apply)"
msgstr ""
#: init.lua
msgid "Mese HorseShoes (use on horse to apply)"
msgstr ""
#: init.lua
msgid "Diamond HorseShoes (use on horse to apply)"
msgstr ""

View File

@ -1,58 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 00:07+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua
msgid "Horse"
msgstr "马"
#: init.lua
msgid "Horse shoes fitted -"
msgstr "马蹄铁 -"
#: init.lua
msgid " speed: "
msgstr "速度:"
#: init.lua
msgid " , jump height: "
msgstr ",跳跃高度"
#: init.lua
msgid " , stop speed: "
msgstr ",停止速度:"
#: init.lua
msgid "Horse shoes only work on horses!"
msgstr "马蹄铁只对马有效!"
#: init.lua
msgid "Steel HorseShoes (use on horse to apply)"
msgstr "钢马蹄铁(用在马匹上)"
#: init.lua
msgid "Bronze HorseShoes (use on horse to apply)"
msgstr "青铜马蹄铁(用在马匹上)"
#: init.lua
msgid "Mese HorseShoes (use on horse to apply)"
msgstr "黄石马蹄铁(用在马匹上)"
#: init.lua
msgid "Diamond HorseShoes (use on horse to apply)"
msgstr "钻石马蹄铁(用在马匹上)"

View File

@ -1,12 +0,0 @@
#Mod: mob_horse
Horse = 马
Horse shoes fitted - = 马蹄铁 -
speed: = 速度:
, jump height: = ,跳跃高度:
, stop speed: = ,停止速度:
Horse shoes only work on horses! = 马蹄铁只对马有效!
Steel HorseShoes (use on horse to apply) = 钢马蹄铁(用在马匹上)
Bronze HorseShoes (use on horse to apply) = 青铜马蹄铁(用在马匹上)
Mese HorseShoes (use on horse to apply) = 黄石马蹄铁(用在马匹上)
Diamond HorseShoes (use on horse to apply) = 钻石马蹄铁(用在马匹上)

View File

@ -1,12 +0,0 @@
#Mod: mob_horse
Horse = 馬
Horse shoes fitted - = 馬蹄鐵 -
speed: = 速度:
, jump height: = ,跳躍高度:
, stop speed: = ,停止速度:
Horse shoes only work on horses! = 馬蹄鐵只對馬有效!
Steel HorseShoes (use on horse to apply) = 鋼馬蹄鐵(用在馬匹上)
Bronze HorseShoes (use on horse to apply) = 青銅馬蹄鐵(用在馬匹上)
Mese HorseShoes (use on horse to apply) = 黃石馬蹄鐵(用在馬匹上)
Diamond HorseShoes (use on horse to apply) = 鑽石馬蹄鐵(用在馬匹上)

View File

@ -1,4 +1,5 @@
name = mob_horse
depends = mobs
optional_depends = lucky_block, intllib
description = Adds a rideable horse into game with horse shoe upgrades.
depends = mobs
optional_depends = lucky_block
min_minetest_version = 5.0

View File

@ -7,6 +7,10 @@ There are three different horse textures (white, brown, black) which will spawn
### Taming
Horses can be tamed with 10x wheat, apple, barley, oats of corn which then allows the player to pick up the horse using a lasso and ride by right-clicking with a saddle.
---
### Saddle
Right clicking a horse with a saddle equips it and the horse will be ordered to stand still until you wish to ride.
---
### Horseshoes
Horseshoes can be crafted using steel, bronze, mese, diamond and crystal (4x ingots - 2 down either side with 1x block top middle) and placed on a horse by right clicking with the item. These can make horses run faster or jump higher while riding depending on tier.

72
spawn_example.lua Normal file
View File

@ -0,0 +1,72 @@
--[[ Spawn Template, defaults to values shown if line not provided
mobs:spawn({
name = "",
- Name of mob, must be provided e.g. "mymod:my_mob"
nodes = {"group:soil, "group:stone"},
- Nodes to spawn on top of.
neighbors = {"air"},
- Nodes to spawn beside.
min_light = 0,
- Minimum light level.
max_light = 15,
- Maximum light level, 15 is sunlight only.
interval = 30,
- Spawn interval in seconds.
chance = 5000,
- Spawn chance, 1 in every 5000 nodes.
active_object_count = 1,
- Active mobs of this type in area.
min_height = -31000,
- Minimum height level.
max_height = 31000,
- Maximum height level.
day_toggle = nil,
- Daytime toggle, true to spawn during day, false for night, nil for both
on_spawn = nil,
- On spawn function to run when mob spawns in world
on_map_load = nil,
- On map load, when true mob only spawns in newly generated map areas
})
]]--
-- Horse
mobs:spawn({
name = "mob_horse:horse",
nodes = {"default:dirt_with_grass", "ethereal:dry_dirt"},
min_light = 14,
interval = 60,
chance = 16000,
min_height = 10,
max_height = 31000,
day_toggle = true
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB