Update pig model and saddle texture

master
Wuzzy 2017-11-03 18:25:27 +01:00
parent 76e797b6b2
commit 8c56c141ad
3 changed files with 15 additions and 13 deletions

Binary file not shown.

28
pig.lua
View File

@ -12,9 +12,11 @@ mobs:register_mob("mobs_mc:pig", {
collisionbox = {-0.45, -0.01, -0.45, 0.45, 0.865, 0.45}, collisionbox = {-0.45, -0.01, -0.45, 0.45, 0.865, 0.45},
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_pig.b3d", mesh = "mobs_mc_pig.b3d",
textures = { textures = {{
{"mobs_mc_pig.png"}, "blank.png", -- baby
}, "mobs_mc_pig.png", -- base
"blank.png", -- saddle
}},
visual_size = {x=2.5, y=2.5}, visual_size = {x=2.5, y=2.5},
makes_footstep_sound = true, makes_footstep_sound = true,
walk_velocity = 1, walk_velocity = 1,
@ -36,19 +38,15 @@ mobs:register_mob("mobs_mc:pig", {
distance = 16, distance = 16,
}, },
animation = { animation = {
speed_normal = 40, stand_speed = 40,
walk_speed = 40,
run_speed = 50,
stand_start = 0, stand_start = 0,
stand_end = 0, stand_end = 0,
walk_start = 0, walk_start = 0,
walk_end = 40, walk_end = 40,
hurt_start = 118, run_start = 0,
hurt_end = 154, run_end = 40,
death_start = 154,
death_end = 179,
eat_start = 49,
eat_end = 78,
look_start = 78,
look_end = 108,
}, },
follow = mobs_mc.follow.pig, follow = mobs_mc.follow.pig,
view_range = 5, view_range = 5,
@ -106,7 +104,11 @@ mobs:register_mob("mobs_mc:pig", {
-- Put saddle on pig -- Put saddle on pig
local item = clicker:get_wielded_item() local item = clicker:get_wielded_item()
if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then if item:get_name() == mobs_mc.items.saddle and self.saddle ~= "yes" then
self.base_texture = {"mobs_mc_pig.png^mobs_mc_pig_saddle.png"} self.base_texture = {
"blank.png", -- baby
"mobs_mc_pig.png", -- base
"mobs_mc_pig_saddle.png", -- saddle
}
self.object:set_properties({ self.object:set_properties({
textures = self.base_texture textures = self.base_texture
}) })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 215 B