Update mobs mod
- Bunnies eat savage carrots - Now, you need mobs:shears(ciseaux) if you want take the sheep’s wool, - Kittens now follow rat and be tamed if they eat 4 fish_raw (obtained when fishing) - Kittens now can be picked with right click, and stored in inventory (like chickens) —> SYNC WITHOUT API.LUA <—
@ -44,6 +44,10 @@ mobs:register_mob("mobs:bunny", {
|
|||||||
-- follows carrot from farming redo
|
-- follows carrot from farming redo
|
||||||
follow = "farming:carrot",
|
follow = "farming:carrot",
|
||||||
view_range = 8,
|
view_range = 8,
|
||||||
|
-- eat carrots
|
||||||
|
replace_rate = 80,
|
||||||
|
replace_what = {"farming:carrot_7", "farming:carrot_8", "farming_plus:carrot"},
|
||||||
|
replace_with = "air",
|
||||||
-- right click to pick up rabbit
|
-- right click to pick up rabbit
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
@ -68,4 +72,4 @@ mobs:register_mob("mobs:bunny", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
mobs:register_spawn("mobs:bunny", {"default:dirt_with_grass"}, 20, 8, 12000, 1, 31000)
|
mobs:register_spawn("mobs:bunny", {"default:dirt_with_grass"}, 20, 8, 12000, 1, 31000)
|
||||||
mobs:register_egg("mobs:bunny", "bunny", "mobs_bunny_inv.png", 0)
|
mobs:register_egg("mobs:bunny", "Bunny", "mobs_bunny_inv.png", 0)
|
||||||
|
@ -72,10 +72,11 @@ mobs:register_mob("mobs:chicken", {
|
|||||||
end
|
end
|
||||||
self.food = (self.food or 0) + 1
|
self.food = (self.food or 0) + 1
|
||||||
if self.food >= 4 then
|
if self.food >= 4 then
|
||||||
-- I dont know what do you want she make
|
|
||||||
self.food = 0
|
self.food = 0
|
||||||
|
if self.child == false then self.horny = true end
|
||||||
|
self.gotten = false -- reset
|
||||||
self.tamed = true
|
self.tamed = true
|
||||||
minetest.sound_play("mobs_chicken", {object = self.object,gain = 1.0,max_hear_distance = 32,loop = false,})
|
minetest.sound_play("mobs_chicken", {object = self.object,gain = 1.0,max_hear_distance = 16,loop = false,})
|
||||||
end
|
end
|
||||||
return tool
|
return tool
|
||||||
else
|
else
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
dofile(minetest.get_modpath("mobs").."/api.lua")
|
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").."/chicken.lua")
|
||||||
dofile(minetest.get_modpath("mobs").."/cow.lua")
|
dofile(minetest.get_modpath("mobs").."/cow.lua")
|
||||||
@ -11,8 +11,6 @@ dofile(minetest.get_modpath("mobs").."/sheep.lua")
|
|||||||
dofile(minetest.get_modpath("mobs").."/warthog.lua")
|
dofile(minetest.get_modpath("mobs").."/warthog.lua")
|
||||||
dofile(minetest.get_modpath("mobs").."/bee.lua")
|
dofile(minetest.get_modpath("mobs").."/bee.lua")
|
||||||
dofile(minetest.get_modpath("mobs").."/bunny.lua")
|
dofile(minetest.get_modpath("mobs").."/bunny.lua")
|
||||||
|
|
||||||
-- Animals/Kittens from Jordach BFD subgame
|
|
||||||
dofile(minetest.get_modpath("mobs").."/kitten.lua")
|
dofile(minetest.get_modpath("mobs").."/kitten.lua")
|
||||||
|
|
||||||
-- Monsters
|
-- Monsters
|
||||||
@ -38,7 +36,6 @@ dofile(minetest.get_modpath("mobs").."/spider.lua")
|
|||||||
dofile(minetest.get_modpath("mobs").."/npc.lua")
|
dofile(minetest.get_modpath("mobs").."/npc.lua")
|
||||||
|
|
||||||
-- Creeper (fast impl by davedevils)
|
-- Creeper (fast impl by davedevils)
|
||||||
|
|
||||||
dofile(minetest.get_modpath("mobs").."/creeper.lua")
|
dofile(minetest.get_modpath("mobs").."/creeper.lua")
|
||||||
|
|
||||||
-- Meat & Cooked Meat
|
-- Meat & Cooked Meat
|
||||||
|
@ -1,65 +1,14 @@
|
|||||||
local kitten_nodes = {
|
|
||||||
"wool:black",
|
|
||||||
"wool:blue",
|
|
||||||
"wool:brown",
|
|
||||||
"wool:cyan",
|
|
||||||
"wool:dark_green",
|
|
||||||
"wool:dark_grey",
|
|
||||||
"wool:green",
|
|
||||||
"wool:grey",
|
|
||||||
"wool:magenta",
|
|
||||||
"wool:orange",
|
|
||||||
"wool:pink",
|
|
||||||
"wool:red",
|
|
||||||
"wool:violet",
|
|
||||||
"wool:white",
|
|
||||||
"wool:yellow",
|
|
||||||
"carpet:black",
|
|
||||||
"carpet:blue",
|
|
||||||
"carpet:brown",
|
|
||||||
"carpet:cyan",
|
|
||||||
"carpet:dark_green",
|
|
||||||
"carpet:dark_grey",
|
|
||||||
"carpet:green",
|
|
||||||
"carpet:grey",
|
|
||||||
"carpet:magenta",
|
|
||||||
"carpet:orange",
|
|
||||||
"carpet:pink",
|
|
||||||
"carpet:red",
|
|
||||||
"carpet:violet",
|
|
||||||
"carpet:white",
|
|
||||||
"carpet:yellow",
|
|
||||||
"deco:furnace_active",
|
|
||||||
"beds:bed_bottom",
|
|
||||||
"beds:bed_top",
|
|
||||||
"beds:bed_top_red",
|
|
||||||
"beds:bed_top_orange",
|
|
||||||
"beds:bed_top_yellow",
|
|
||||||
"beds:bed_top_green",
|
|
||||||
"beds:bed_top_blue",
|
|
||||||
"beds:bed_top_violet",
|
|
||||||
"beds:bed_top_black",
|
|
||||||
"beds:bed_top_grey",
|
|
||||||
"beds:bed_top_white",
|
|
||||||
"beds:bed_bottom_red",
|
|
||||||
"beds:bed_bottom_orange",
|
|
||||||
"beds:bed_bottom_yellow",
|
|
||||||
"beds:bed_bottom_green",
|
|
||||||
"beds:bed_bottom_blue",
|
|
||||||
"beds:bed_bottom_violet",
|
|
||||||
"beds:bed_bottom_black",
|
|
||||||
"beds:bed_bottom_grey",
|
|
||||||
"beds:bed_bottom_white",
|
|
||||||
}
|
|
||||||
|
|
||||||
|
-- Kitten by Jordach / BFD
|
||||||
|
|
||||||
mobs:register_spawn("mobs:kitten", {"default:dirt_with_grass"}, 20, 0, 12000, 1, 31000)
|
|
||||||
|
|
||||||
mobs:register_mob("mobs:kitten", {
|
mobs:register_mob("mobs:kitten", {
|
||||||
|
-- animal, monster, npc
|
||||||
type = "animal",
|
type = "animal",
|
||||||
hp_min = 5,
|
-- is it aggressive
|
||||||
hp_max = 10,
|
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},
|
collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.1, 0.3},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
visual_size = {x=0.5, y=0.5},
|
visual_size = {x=0.5, y=0.5},
|
||||||
@ -71,40 +20,38 @@ mobs:register_mob("mobs:kitten", {
|
|||||||
texture_3 = {"mobs_kitten_ginger.png"},
|
texture_3 = {"mobs_kitten_ginger.png"},
|
||||||
texture_4 = {"mobs_kitten_sandy.png"},
|
texture_4 = {"mobs_kitten_sandy.png"},
|
||||||
},
|
},
|
||||||
|
blood_texture = "mobs_blood.png",
|
||||||
|
-- sounds
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
view_range = 16,
|
sounds = {
|
||||||
|
random = "mobs_kitten",
|
||||||
|
},
|
||||||
|
-- speed and jump
|
||||||
walk_velocity = 0.6,
|
walk_velocity = 0.6,
|
||||||
|
jump = false,
|
||||||
|
-- drops sometimes coins
|
||||||
drops = {
|
drops = {
|
||||||
{name = "maptools:copper_coin",
|
{name = "maptools:copper_coin",
|
||||||
chance = 10,
|
chance = 10,
|
||||||
min = 1,
|
min = 1,
|
||||||
max = 1,},
|
max = 1,},
|
||||||
},
|
},
|
||||||
|
-- damaged by
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
lava_damage = 5,
|
lava_damage = 5,
|
||||||
on_rightclick = nil,
|
-- model animation
|
||||||
armor = 200,
|
|
||||||
sounds = {
|
|
||||||
random = "mobs_kitten",
|
|
||||||
},
|
|
||||||
animation = {
|
animation = {
|
||||||
stand_start = 97,
|
|
||||||
stand_end = 192,
|
|
||||||
walk_start = 0,
|
|
||||||
walk_end = 96,
|
|
||||||
speed_normal = 42,
|
speed_normal = 42,
|
||||||
|
stand_start = 97, stand_end = 192,
|
||||||
|
walk_start = 0, walk_end = 96,
|
||||||
},
|
},
|
||||||
|
-- follows rat
|
||||||
follow = "mobs:rat",
|
follow = "mobs:rat",
|
||||||
view_range = 8,
|
view_range = 8,
|
||||||
-- jump = true,
|
-- feed with raw fish to tame or right click to pick up
|
||||||
-- step = 0.5,
|
|
||||||
passive = true,
|
|
||||||
blood_texture = "mobs_blood.png",
|
|
||||||
|
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
if item:get_name() == "fishing:fish_raw" then
|
if item:get_name() == "fishing:fish_raw" or item:get_name() == "ethereal:fish_raw" then
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
item:take_item()
|
item:take_item()
|
||||||
clicker:set_wielded_item(item)
|
clicker:set_wielded_item(item)
|
||||||
@ -117,5 +64,12 @@ mobs:register_mob("mobs:kitten", {
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if clicker:is_player() and clicker:get_inventory() then
|
||||||
|
clicker:get_inventory():add_item("main", "mobs:kitten")
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
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)
|
||||||
|
@ -75,16 +75,18 @@ mobs:register_mob("mobs:sheep", {
|
|||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if clicker:get_inventory() and not self.gotten and self.child == false then
|
-- need shears to get wool from sheep
|
||||||
|
if clicker:get_inventory() and item:get_name() == "mobs:shears" and not self.gotten and self.child == false then
|
||||||
self.gotten = true -- shaved
|
self.gotten = true -- shaved
|
||||||
if minetest.registered_items["wool:white"] then
|
if minetest.registered_items["wool:white"] then
|
||||||
clicker:get_inventory():add_item("main", ItemStack("wool:white "..math.random(1,3)))
|
clicker:get_inventory():add_item("main", ItemStack("wool:white "..math.random(1,3)))
|
||||||
|
item:add_wear(65535/100)
|
||||||
|
clicker:set_wielded_item(item)
|
||||||
end
|
end
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
textures = {"mobs_sheep_shaved.png"},
|
textures = {"mobs_sheep_shaved.png"},
|
||||||
mesh = "mobs_sheep_shaved.x",
|
mesh = "mobs_sheep_shaved.x",
|
||||||
})
|
})
|
||||||
else print ("shaved already!")
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -92,3 +94,25 @@ mobs:register_mob("mobs:sheep", {
|
|||||||
mobs:register_spawn("mobs:sheep", {"default:dirt_with_grass"}, 20, 8, 9000, 1, 31000)
|
mobs:register_spawn("mobs:sheep", {"default:dirt_with_grass"}, 20, 8, 9000, 1, 31000)
|
||||||
-- register spawn egg
|
-- register spawn egg
|
||||||
mobs:register_egg("mobs:sheep", "Sheep", "wool_white.png", 1)
|
mobs:register_egg("mobs:sheep", "Sheep", "wool_white.png", 1)
|
||||||
|
|
||||||
|
-- shears tool (right click sheep to shear)
|
||||||
|
minetest.register_tool("mobs:shears", {
|
||||||
|
description = "Steel Shears (right-click sheep to shear)",
|
||||||
|
inventory_image = "mobs_shears.png",
|
||||||
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1,
|
||||||
|
max_drop_level=1,
|
||||||
|
groupcaps={
|
||||||
|
snappy={times={[1]=2.5, [2]=1.20, [3]=0.35}, uses=30, maxlevel=2},
|
||||||
|
},
|
||||||
|
damage_groups = {fleshy=0},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'mobs:shears',
|
||||||
|
recipe = {
|
||||||
|
{'', 'default:steel_ingot', ''},
|
||||||
|
{'', 'group:stick', 'default:steel_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
@ -38,7 +38,7 @@ mobs:register_mob("mobs:spider", {
|
|||||||
-- drops string with a chance of sandstone or crystal spike if Ethereal installed
|
-- drops string with a chance of sandstone or crystal spike if Ethereal installed
|
||||||
drops = {
|
drops = {
|
||||||
{name = "farming:string",
|
{name = "farming:string",
|
||||||
chance = 2, min = 2, max = 3,},
|
chance = 2, min = 1, max = 3,},
|
||||||
{name = "mobs:meat_raw",
|
{name = "mobs:meat_raw",
|
||||||
chance = 4, min = 1, max = 2,},
|
chance = 4, min = 1, max = 2,},
|
||||||
{name = "maptools:copper_coin",
|
{name = "maptools:copper_coin",
|
||||||
@ -89,7 +89,7 @@ minetest.register_node("mobs:spider_cobweb", {
|
|||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Spider Cobweb craft
|
-- Spider Cobweb craft (MFF : indentation modifié)
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "mobs:spider_cobweb",
|
output = "mobs:spider_cobweb",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 999 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 771 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 809 B |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 440 B |
BIN
mods/mobs/textures/mobs_kitten_inv.png
Executable file
After Width: | Height: | Size: 377 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 404 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 456 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 416 B |
@ -4,10 +4,10 @@
|
|||||||
mobs:register_mob("mobs:tree_monster", {
|
mobs:register_mob("mobs:tree_monster", {
|
||||||
-- animal, monster, npc, barbarian
|
-- animal, monster, npc, barbarian
|
||||||
type = "monster",
|
type = "monster",
|
||||||
-- aggressive, deals 6 damage to player when hit
|
-- aggressive, deals 8 damage to player when hit
|
||||||
passive = false,
|
passive = false,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
damage = 6,
|
damage = 8,
|
||||||
-- health & armor
|
-- health & armor
|
||||||
hp_min = 40, hp_max = 50, armor = 80,
|
hp_min = 40, hp_max = 50, armor = 80,
|
||||||
-- textures and model
|
-- textures and model
|
||||||
@ -41,9 +41,7 @@ mobs:register_mob("mobs:tree_monster", {
|
|||||||
{name = "default:apple",
|
{name = "default:apple",
|
||||||
chance = 2, min = 1, max = 3,},
|
chance = 2, min = 1, max = 3,},
|
||||||
{name = "maptools:silver_coin",
|
{name = "maptools:silver_coin",
|
||||||
chance = 2,
|
chance = 2, min = 1, max = 1,},
|
||||||
min = 1,
|
|
||||||
max = 1,},
|
|
||||||
},
|
},
|
||||||
-- damaged by
|
-- damaged by
|
||||||
water_damage = 1,
|
water_damage = 1,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
mobs:register_mob("mobs:pumba", {
|
mobs:register_mob("mobs:pumba", {
|
||||||
-- animal, monster, npc, barbarian
|
-- animal, monster, npc, barbarian
|
||||||
type = "animal",
|
type = "animal",
|
||||||
-- aggressive, deals 2 damage to player when threatened
|
-- aggressive, deals 4 damage to player when threatened
|
||||||
passive = false,
|
passive = false,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
damage = 4,
|
damage = 4,
|
||||||
|