12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- mobs:register_mob('farm_mobs:pig', {
- type = 'animal',
- passive = true,
- attack_type = 'dogfight',
- group_attack = true,
- reach = 2,
- damage = 4,
- hp_min = 5,
- hp_max = 20,
- armor = 100,
- collisionbox = {-0.375, 0, -0.375, 0.375, .75, 0.375},
- visual = 'mesh',
- visual_size = {x=10,y=10},
- mesh = 'farm_mobs_pig.b3d',
- textures = {
- {'farm_mobs_pig_pink.png'},
- },
- makes_footstep_sound = true,
- sounds = {
- random = 'farm_mobs_pig',
- },
- walk_velocity = 1,
- run_velocity = 2,
- jump = true,
- drops = {
- {name = 'mobs:pork_raw', chance = 1, min = 1, max = 5},
- {name = 'bonemeal:bone', chance = 2, min = 1, max = 4},
- },
- water_damage = 1,
- lava_damage = 5,
- light_damage = 0,
- animation = {
- speed_normal = 30,
- speed_run = 30,
- stand_start = 0,
- stand_end = 89,
- walk_start = 90,
- walk_end = 129,
- run_start = 130,
- run_end = 169,
- },
- follow = {'farming:corn', 'default:apple'},
- view_range = 7,
- fear_height = 2,
- on_rightclick = function(self, clicker)
- if mobs:feed_tame(self, clicker, 8, true, true) then
- return
- end
- mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
- end,
- })
- mobs:spawn({
- name = 'farm_mobs:pig',
- nodes = {'default:dirt_with_grass', 'default:dirt'},
- min_height = -5,
- max_height = 100,
- interval = 64,
- chance = 10000,
- active_object_count = 5,
- })
- mobs:register_egg("farm_mobs:pig", "Pig", "default_grass.png", 1)
|