ContentPackRuntime + refactor

This commit is contained in:
MihailRis
2024-02-08 20:53:12 +03:00
parent 54e6d49847
commit 241d15e349
22 changed files with 224 additions and 169 deletions
+4
View File
@@ -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),
+1
View File
@@ -25,6 +25,7 @@ public:
int getParts() const;
int getPart() const;
int getTickRate() const;
int getTickId() const;
};
class BlocksController {
+1 -1
View File
@@ -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;
}