diff --git a/README.txt b/README.txt index 92de41e..623ef26 100644 --- a/README.txt +++ b/README.txt @@ -29,7 +29,7 @@ This mod contains the following additions: Changelog: beta- Npc mob added, kills monsters, attacks player when punched, right click with food to heal or gold lump for drop -1.05- Added ExeterDad's bunny's which can be picked up and tamed with 4 carrots from farming redo or farming_plus, also shears added to get wool from sheep +1.05- Added ExeterDad's bunny's which can be picked up and tamed with 4 carrots from farming redo or farming_plus, also shears added to get wool from sheep and lastly Jordach/BSD's kitten 1.04- Added mating for sheep, cows and hogs... feed animals to make horny and hope for a baby which is half size, will grow up quick though :) 1.03- Added mob drop/replace feature so that chickens can drop eggs, cow/sheep can eat grass/wheat etc. 1.02- Sheared sheep are remembered and spawn shaven, Warthogs will attack when threatened, Api additions diff --git a/bunny.lua b/bunny.lua index 988845f..27b448a 100644 --- a/bunny.lua +++ b/bunny.lua @@ -70,4 +70,4 @@ mobs:register_mob("mobs:bunny", { }) mobs:register_spawn("mobs:bunny", {"default:dirt_with_grass", "ethereal:prairie_dirt"}, 20, 8, 9000, 1, 31000) -mobs:register_egg("mobs:bunny", "bunny", "mobs_bunny_inv.png", 0) +mobs:register_egg("mobs:bunny", "Bunny", "mobs_bunny_inv.png", 0) diff --git a/init.lua b/init.lua index 886dd28..a60a5c1 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,7 @@ dofile(minetest.get_modpath("mobs").."/api.lua") --- Animals inc. Krupnovpavel's warthog/bee, JKmurray's chicken, ExeterDad's bunny +-- Animals inc. Krupnovpavel's warthog/bee, JKmurray's chicken, ExeterDad's bunny, Jordach/BFD's kitten dofile(minetest.get_modpath("mobs").."/chicken.lua") dofile(minetest.get_modpath("mobs").."/cow.lua") @@ -11,6 +11,7 @@ dofile(minetest.get_modpath("mobs").."/sheep.lua") dofile(minetest.get_modpath("mobs").."/warthog.lua") dofile(minetest.get_modpath("mobs").."/bee.lua") dofile(minetest.get_modpath("mobs").."/bunny.lua") +dofile(minetest.get_modpath("mobs").."/kitten.lua") -- Monsters diff --git a/kitten.lua b/kitten.lua new file mode 100755 index 0000000..5b263e5 --- /dev/null +++ b/kitten.lua @@ -0,0 +1,72 @@ + +-- Kitten by Jordach / BFD + +mobs:register_mob("mobs:kitten", { + -- animal, monster, npc + type = "animal", + -- is it aggressive + passive = true, + -- health & armor + hp_min = 5, hp_max = 10, armor = 200, + -- textures and model + collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.1, 0.3}, + visual = "mesh", + visual_size = {x=0.5, y=0.5}, + mesh = "mobs_kitten.b3d", + textures = { + {"mobs_kitten_striped.png"}, + {"mobs_kitten_splotchy.png"}, + {"mobs_kitten_ginger.png"}, + {"mobs_kitten_sandy.png"}, + }, + blood_texture = "mobs_blood.png", + -- sounds + makes_footstep_sound = false, + sounds = { + random = "mobs_kitten", + }, + -- speed and jump + walk_velocity = 0.6, + jump = false, + -- drops string + drops = { + {name = "farming:string", + chance = 1, min = 1, max = 1}, + }, + -- damaged by + water_damage = 1, + lava_damage = 5, + -- model animation + animation = { + speed_normal = 42, + stand_start = 97, stand_end = 192, + walk_start = 0, walk_end = 96, + }, + -- follows rat + follow = "mobs:rat", + view_range = 8, + -- feed with raw fish to tame or right click to pick up + on_rightclick = function(self, clicker) + local item = clicker:get_wielded_item() + if item:get_name() == "fishing:fish_raw" or item:get_name() == "ethereal:fish_raw" then + if not minetest.setting_getbool("creative_mode") then + item:take_item() + clicker:set_wielded_item(item) + end + self.food = (self.food or 0) + 1 + if self.food >= 4 then + self.food = 0 + self.tamed = true + minetest.sound_play("mobs_kitten", {object = self.object,gain = 1.0,max_hear_distance = 32,loop = false,}) + end + return + end + if clicker:is_player() and clicker:get_inventory() then + clicker:get_inventory():add_item("main", "mobs:kitten") + self.object:remove() + end + end +}) + +mobs:register_spawn("mobs:kitten", {"default:dirt_with_grass"}, 20, 0, 12000, 1, 31000) +mobs:register_egg("mobs:kitten", "Kitten", "mobs_kitten_inv.png", 0) diff --git a/models/mobs_kitten.b3d b/models/mobs_kitten.b3d new file mode 100755 index 0000000..baaa3a7 Binary files /dev/null and b/models/mobs_kitten.b3d differ diff --git a/sounds/mobs_kitten.ogg b/sounds/mobs_kitten.ogg new file mode 100755 index 0000000..021d3dc Binary files /dev/null and b/sounds/mobs_kitten.ogg differ diff --git a/textures/mobs_kitten_ginger.png b/textures/mobs_kitten_ginger.png new file mode 100755 index 0000000..1707c2e Binary files /dev/null and b/textures/mobs_kitten_ginger.png differ diff --git a/textures/mobs_kitten_inv.png b/textures/mobs_kitten_inv.png new file mode 100644 index 0000000..6afa61f Binary files /dev/null and b/textures/mobs_kitten_inv.png differ diff --git a/textures/mobs_kitten_sandy.png b/textures/mobs_kitten_sandy.png new file mode 100755 index 0000000..3b854f8 Binary files /dev/null and b/textures/mobs_kitten_sandy.png differ diff --git a/textures/mobs_kitten_splotchy.png b/textures/mobs_kitten_splotchy.png new file mode 100755 index 0000000..1fad994 Binary files /dev/null and b/textures/mobs_kitten_splotchy.png differ diff --git a/textures/mobs_kitten_striped.png b/textures/mobs_kitten_striped.png new file mode 100755 index 0000000..4d1a0cc Binary files /dev/null and b/textures/mobs_kitten_striped.png differ