init.lua 857 B

1234567891011121314151617181920212223242526
  1. dofile(minetest.get_modpath("player_api") .. "/api.lua")
  2. -- Default player appearance
  3. player_api.register_model("character.b3d", {
  4. animation_speed = 30,
  5. textures = {"character.png"},
  6. animations = {
  7. -- Standard animations.
  8. stand = {x = 0, y = 79},
  9. lay = {x = 162, y = 166, eye_height = 0.3, override_local = true,
  10. collisionbox = {-0.6, 0.0, -0.6, 0.6, 0.3, 0.6}},
  11. walk = {x = 168, y = 187},
  12. mine = {x = 189, y = 198},
  13. walk_mine = {x = 200, y = 219},
  14. sit = {x = 81, y = 160, eye_height = 0.8, override_local = true,
  15. collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.0, 0.3}}
  16. },
  17. collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
  18. stepheight = 0.6,
  19. eye_height = 1.47,
  20. })
  21. -- Update appearance when the player joins
  22. minetest.register_on_joinplayer(function(player)
  23. player_api.set_model(player, "character.b3d")
  24. end)