ContentPackRuntime + refactor
This commit is contained in:
@@ -46,6 +46,10 @@ int Clock::getTickRate() const {
|
||||
return tickRate;
|
||||
}
|
||||
|
||||
int Clock::getTickId() const {
|
||||
return tickId;
|
||||
}
|
||||
|
||||
BlocksController::BlocksController(Level* level, uint padding)
|
||||
: level(level),
|
||||
chunks(level->chunks),
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
int getParts() const;
|
||||
int getPart() const;
|
||||
int getTickRate() const;
|
||||
int getTickId() const;
|
||||
};
|
||||
|
||||
class BlocksController {
|
||||
|
||||
@@ -245,7 +245,7 @@ static int l_blocks_count(lua_State* L) {
|
||||
|
||||
static int l_block_index(lua_State* L) {
|
||||
auto name = lua_tostring(L, 1);
|
||||
lua_pushinteger(L, scripting::content->requireBlock(name)->rt.id);
|
||||
lua_pushinteger(L, scripting::content->requireBlock(name).rt.id);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user