SussyCraft/mods/player_api/init.lua

33 lines
934 B
Lua
Raw Normal View History

2023-01-10 10:18:30 +01:00
dofile(minetest.get_modpath("player_api") .. "/api.lua")
2023-01-10 10:18:30 +01:00
-- Default player appearance
2023-01-29 08:55:54 +01:00
player_api.register_model("amogus_entity.obj", {
2023-01-10 10:18:30 +01:00
animation_speed = 30,
2023-01-29 08:55:54 +01:00
textures = {"amogus_entity.png"},
2023-01-10 10:18:30 +01:00
animations = {
-- Standard animations.
stand = {x = 0, y = 79},
lay = {x = 162, y = 166, eye_height = 0.3, override_local = true,
collisionbox = {-0.6, 0.0, -0.6, 0.6, 0.3, 0.6}},
walk = {x = 168, y = 187},
mine = {x = 189, y = 198},
walk_mine = {x = 200, y = 219},
sit = {x = 81, y = 160, eye_height = 0.8, override_local = true,
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.0, 0.3}}
},
stepheight = 0.6,
eye_height = 1.47,
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
2023-01-29 08:55:54 +01:00
visual = "mesh",
2023-02-04 16:17:05 +01:00
visual_size = {x=15, y=15, z=15},
2023-01-29 08:55:54 +01:00
2023-01-10 10:18:30 +01:00
})
-- Update appearance when the player joins
minetest.register_on_joinplayer(function(player)
2023-01-29 08:55:54 +01:00
player_api.set_model(player, "amogus_entity.obj")
2023-01-10 10:18:30 +01:00
end)