2015-03-19 00:10:30 +01:00
|
|
|
|
|
|
|
-- Bunny by ExeterDad
|
|
|
|
|
|
|
|
mobs:register_mob("mobs:bunny", {
|
|
|
|
-- animal, monster, npc
|
|
|
|
type = "animal",
|
|
|
|
-- is it aggressive
|
|
|
|
passive = true,
|
2015-09-30 03:43:51 +02:00
|
|
|
reach = 1,
|
2015-03-19 00:10:30 +01:00
|
|
|
-- health & armor
|
2016-02-01 12:45:12 +01:00
|
|
|
hp_min = 3,
|
|
|
|
hp_max = 6,
|
|
|
|
armor = 200,
|
2015-03-19 00:10:30 +01:00
|
|
|
-- textures and model
|
|
|
|
collisionbox = {-0.268, -0.5, -0.268, 0.268, 0.167, 0.268},
|
|
|
|
visual = "mesh",
|
|
|
|
mesh = "mobs_bunny.b3d",
|
2015-05-22 10:37:17 +02:00
|
|
|
drawtype = "front",
|
Update mobs mod
- api.lua (many improves, chicken egg more frequent, NPC attack nearly
mobs, textures code, etc…)
- Bee (spawn on group:flower now, textures code updated)
- Bunny (textures code updated)
- Chicken (two times more eggs, textures code updated)
- Cow (textures code updated)
- Creeper (finish reorganize the code, textures code updated, new eggs
inventory texture)
- Dirt Monster (textures code updated)
- Dungeon Master (textures code updated)
- init.lua (small credits tweaks)
- Kitten (textures code updated, now drop sometimes farming:string)
- Lava Flan (textures code updated, now 3 can spawn per chunck)
- Mese Monster (textures code updated)
- NPC (textures code updated, revert give raw meat versus health code
for tests)
- Oerkki (textures code updated, now 1 light damage)
- Rat (textures code updated)
- Sand Monster (textures code updated)
- Sheep (textures code updated, now give 2 to 3 wool when sheared)
- Spider (textures code updated, change credits, comments our
modifications)
- Stone Monster (textures code updated)
- Tree Monster (textures code updated)
- Warthog (textures code updated)
- Wolf (finish reorganize the code, textures code updated, add spawner
egg and an inventory texture)
- Tweaks some sounds
2015-03-31 19:32:46 +02:00
|
|
|
textures = {
|
|
|
|
{"mobs_bunny_grey.png"},
|
|
|
|
{"mobs_bunny_brown.png"},
|
|
|
|
{"mobs_bunny_white.png"},
|
2015-03-19 00:10:30 +01:00
|
|
|
},
|
|
|
|
-- sounds
|
|
|
|
sounds = {},
|
|
|
|
makes_footstep_sound = false,
|
|
|
|
-- speed and jump
|
2016-02-01 12:45:12 +01:00
|
|
|
walk_velocity = 1,
|
|
|
|
run_velocity = 2,
|
|
|
|
runaway = true,
|
2015-03-19 00:10:30 +01:00
|
|
|
jump = true,
|
2015-05-22 10:37:17 +02:00
|
|
|
-- drops meat when dead
|
2015-03-19 00:10:30 +01:00
|
|
|
drops = {
|
|
|
|
{name = "mobs:meat_raw",
|
2015-08-18 17:09:53 +02:00
|
|
|
chance = 1, min = 1, max = 2},
|
2015-03-19 00:10:30 +01:00
|
|
|
},
|
|
|
|
-- damaged by
|
|
|
|
water_damage = 1,
|
2015-04-11 21:45:03 +02:00
|
|
|
lava_damage = 4,
|
2015-03-19 00:10:30 +01:00
|
|
|
light_damage = 0,
|
2015-12-18 21:13:20 +01:00
|
|
|
fear_height = 2,
|
2015-03-19 00:10:30 +01:00
|
|
|
-- model animation
|
|
|
|
animation = {
|
|
|
|
speed_normal = 15,
|
2015-12-18 21:13:20 +01:00
|
|
|
stand_start = 1,
|
|
|
|
stand_end = 15,
|
|
|
|
walk_start = 16,
|
|
|
|
walk_end = 24,
|
|
|
|
punch_start = 16,
|
|
|
|
punch_end = 24,
|
2015-03-19 00:10:30 +01:00
|
|
|
},
|
|
|
|
-- follows carrot from farming redo
|
2015-08-18 17:09:53 +02:00
|
|
|
follow = {"farming:carrot", "farming_plus:carrot_item"},
|
2015-12-08 03:29:42 +01:00
|
|
|
view_range = 8,
|
2015-03-20 22:57:10 +01:00
|
|
|
-- eat carrots
|
2015-12-08 03:29:42 +01:00
|
|
|
replace_rate = 10,
|
2015-03-20 22:57:10 +01:00
|
|
|
replace_what = {"farming:carrot_7", "farming:carrot_8", "farming_plus:carrot"},
|
|
|
|
replace_with = "air",
|
2015-03-19 00:10:30 +01:00
|
|
|
-- right click to pick up rabbit
|
|
|
|
on_rightclick = function(self, clicker)
|
2016-02-01 12:45:12 +01:00
|
|
|
|
|
|
|
-- feed or tame
|
|
|
|
if mobs:feed_tame(self, clicker, 4, true, true) then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Monty Python tribute
|
|
|
|
local item = clicker:get_wielded_item()
|
|
|
|
|
|
|
|
if item:get_name() == "mobs:lava_orb" then
|
|
|
|
|
|
|
|
if not minetest.setting_getbool("creative_mode") then
|
|
|
|
item:take_item()
|
|
|
|
clicker:set_wielded_item(item)
|
2015-03-19 00:10:30 +01:00
|
|
|
end
|
2016-02-01 12:45:12 +01:00
|
|
|
|
|
|
|
self.object:set_properties({
|
|
|
|
textures = {"mobs_bunny_evil.png"},
|
|
|
|
})
|
|
|
|
|
|
|
|
self.type = "monster"
|
|
|
|
self.object:set_hp(20)
|
|
|
|
|
|
|
|
return
|
2015-05-22 10:37:17 +02:00
|
|
|
end
|
2015-04-11 21:45:03 +02:00
|
|
|
|
2015-07-15 23:31:54 +02:00
|
|
|
mobs:capture_mob(self, clicker, 30, 50, 80, false, nil)
|
2015-05-22 10:37:17 +02:00
|
|
|
end,
|
2016-02-01 12:45:12 +01:00
|
|
|
|
2015-05-22 10:37:17 +02:00
|
|
|
attack_type = "dogfight",
|
|
|
|
damage = 5,
|
2015-03-19 00:10:30 +01:00
|
|
|
})
|
2015-12-08 03:29:42 +01:00
|
|
|
mobs:spawn_specific("mobs:bunny", {"default:dirt_with_grass"}, {"air"}, 8, 20, 30, 10000, 2, -31000, 31000, true)
|
2015-08-18 20:38:50 +02:00
|
|
|
mobs:register_egg("mobs:bunny", "Bunny", "mobs_bunny_inv.png", 1)
|