mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
improve drop visuals
This commit is contained in:
parent
4b084dffad
commit
e6c3775286
2 changed files with 20 additions and 5 deletions
|
|
@ -286,7 +286,7 @@ static int l_get_model(lua::State* L) {
|
|||
|
||||
static int l_get_hitbox(lua::State* L) {
|
||||
if (auto def = require_block(L)) {
|
||||
auto& hitbox = def->rt.hitboxes[0].at(lua::tointeger(L, 2));
|
||||
auto& hitbox = def->rt.hitboxes[lua::tointeger(L, 2)].at(0);
|
||||
lua::createtable(L, 2, 0);
|
||||
|
||||
lua::pushvec3_arr(L, hitbox.min());
|
||||
|
|
@ -299,6 +299,13 @@ static int l_get_hitbox(lua::State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_get_rotation_profile(lua::State* L) {
|
||||
if (auto def = require_block(L)) {
|
||||
return lua::pushstring(L, def->rotations.name);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const luaL_Reg blocklib [] = {
|
||||
{"index", lua::wrap<l_index>},
|
||||
{"name", lua::wrap<l_name>},
|
||||
|
|
@ -325,5 +332,6 @@ const luaL_Reg blocklib [] = {
|
|||
{"get_textures", lua::wrap<l_get_textures>},
|
||||
{"get_model", lua::wrap<l_get_model>},
|
||||
{"get_hitbox", lua::wrap<l_get_hitbox>},
|
||||
{"get_rotation_profile", lua::wrap<l_get_rotation_profile>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue