SussyCraft/mods/player_api/init.lua

24 lines
498 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-05-02 18:44:15 +02:00
player_api.register_model("susman.obj", {
2023-01-10 10:18:30 +01:00
animation_speed = 30,
2023-05-02 18:44:15 +02:00
textures = {"susman.png"},
2023-05-02 17:12:25 +02:00
animations = {},
2023-01-10 10:18:30 +01:00
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-05-02 18:44:15 +02:00
visual_size = {x=10, y=10, z=10},
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-05-02 18:44:15 +02:00
player_api.set_model(player, "susman.obj")
2023-01-10 10:18:30 +01:00
end)