cow and wip stuff I forgot

This commit is contained in:
D00Med 2017-11-04 10:19:58 +10:00
parent 6894b37836
commit e6986963f2
7 changed files with 97 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

View File

@ -265,9 +265,94 @@ mobs:register_mob("mobs_m:elephant", {
mobs:register_egg("mobs_m:elephant", "Elephant", "default_stone.png", 1)
mobs:register_spawn("mobs_m:elephant", {"default:dirt_with_dry_grass",}, 20, 10, 7000, 20, 11000)
mobs:register_mob("mobs_m:cow", {
type = "animal",
passive = false,
reach = 1.5,
damage = 2,
hp_min = 50,
hp_max = 60,
armor = 110,
collisionbox = {-0.5, 0, -0.5, 0.5, 1.5, 0.5},
visual = "mesh",
mesh = "cow.b3d",
textures = {
{"mobs_cow.png"},
},
blood_texture = "mobs_blood.png",
makes_footstep_sound = true,
walk_velocity = 1,
run_velocity = 1.5,
jump = 1,
stepheight = 1.2,
water_damage = 0,
lava_damage = 2,
light_damage = 0,
fall_damage = 1,
fear_height = 2,
replace_rate = 10,
replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"},
replace_with = "air",
follow = {"farming:wheat"},
view_range = 14,
drops = {
{name = "mobs:meat_raw", chance = 2, min = 2, max = 4},
{name = "mobs:leather", chance = 5, min = 1, max = 2},
},
animation = {
speed_normal = 16,
speed_run = 22,
walk_start = 39,
walk_end = 58,
stand_start = 1,
stand_end = 29,
run_start = 39,
run_end = 58,
},
on_rightclick = function(self, clicker)
if mobs:feed_tame(self, clicker, 8, true, true) then
return
end
if clicker:get_wielded_item():get_name() == "buckets:bucket_empty" then
clicker:set_wielded_item("mobs:bucket_milk")
end
if self.driver and clicker == self.driver then
object_detach(self, clicker, {x=1, y=0, z=1})
elseif not self.driver and clicker:get_wielded_item():get_name() == "mobs:saddle" then
object_attach(self, clicker, {x=0, y=25, z=0}, true, {x=2, y=6, z=0})
end
mobs:capture_mob(self, clicker, 0, 5, 50, false, nil)
end,
do_custom = function(self, dtime)
if self.driver then
self.state = "stand"
object_drive(self, dtime, {
speed = 6,
decell = 0.6,
moving_anim = {x=50, y=70},
stand_anim = {x=1, y=1},
ignore_water = true
})
return false
end
return true
end,
})
mobs:register_egg("mobs_m:cow", "Cow", "default_obsidian.png", 1)
mobs:register_spawn("mobs_m:cow", {"default:dirt_with_grass",}, 20, 10, 20000, 20, 11000)
mobs:register_mob("mobs_m:horse", {
type = "animal",
passive = false,
reach = 1.5,
damage = 2,
hp_min = 50,
hp_max = 60,
armor = 120,
@ -1365,6 +1450,13 @@ minetest.register_craft({
output = "mobs:chicken_egg_fried",
})
--milk
minetest.register_craftitem(":mobs:bucket_milk", {
description = "Bucket of Milk",
inventory_image = "mobs_bucket_milk.png",
on_use = minetest.item_eat(3),
})
-- raw chicken
minetest.register_craftitem(":mobs:chicken_raw", {
description = "Raw Chicken",

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -38,8 +38,8 @@ local apply_weather = function(player, pos, weather_type)
for i=1,12 do
minetest.add_particle({
pos = {x=pos.x+math.random(-10,10), y=pos.y+math.random(12,17), z=pos.z+math.random(-10,10)},
velocity = {x=math.random(-5,5)/10, y=math.random(-4,-6), z=math.random(-5,5)/10},
acceleration = {x=math.random(-1,1)/10, y=math.random(-5,-10)/10, z=math.random(-1,1)/10},
velocity = {x=math.random(-5,5)/10, y=math.random(-6,-4), z=math.random(-5,5)/10},
acceleration = {x=math.random(-1,1)/10, y=math.random(-10,-5)/10, z=math.random(-1,1)/10},
expirationtime = 3,
size = math.random(3,5),
collisiondetection = true,
@ -62,7 +62,7 @@ local apply_weather = function(player, pos, weather_type)
for i=1,12 do
minetest.add_particle({
pos = {x=pos.x+math.random(-10,10), y=pos.y+math.random(12,17), z=pos.z+math.random(-10,10)},
velocity = {x=0, y=math.random(-15,-20), z=0},
velocity = {x=0, y=math.random(-20,-15), z=0},
acceleration = {x=0, y=-1, z=0},
expirationtime = 2,
size = math.random(3,5),
@ -80,7 +80,7 @@ local apply_weather = function(player, pos, weather_type)
for i=1,25 do
minetest.add_particle({
pos = {x=pos.x+math.random(-10,10), y=pos.y+math.random(12,17), z=pos.z+math.random(-10,10)},
velocity = {x=0, y=math.random(-25,-30), z=0},
velocity = {x=0, y=math.random(-30,-25), z=0},
acceleration = {x=0, y=-1, z=0},
expirationtime = 2,
size = math.random(3,5),

View File

@ -101,6 +101,7 @@ function xpanes.register_pane(name, def)
wield_image = def.wield_image,
paramtype2 = "facedir",
tiles = {def.textures[3], def.textures[3], def.textures[1]},
use_texture_alpha = true,
groups = flatgroups,
drop = "xpanes:" .. name .. "_flat",
sounds = def.sounds,