mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add gfx.blockwraps library & add on_player_tick world event
This commit is contained in:
parent
2ba90625ce
commit
61b1aa8e3d
13 changed files with 98 additions and 15 deletions
|
|
@ -79,8 +79,9 @@ void BlockWrapsRenderer::draw(const BlockWrapper& wrapper) {
|
|||
|
||||
void BlockWrapsRenderer::draw(const DrawContext& pctx, const Player& player) {
|
||||
auto ctx = pctx.sub();
|
||||
|
||||
|
||||
for (const auto& [_, wrapper] : wrappers) {
|
||||
draw(*wrapper);
|
||||
}
|
||||
batch->flush();
|
||||
}
|
||||
|
||||
|
|
@ -101,3 +102,7 @@ BlockWrapper* BlockWrapsRenderer::get(u64id_t id) const {
|
|||
}
|
||||
return found->second.get();
|
||||
}
|
||||
|
||||
void BlockWrapsRenderer::remove(u64id_t id) {
|
||||
wrappers.erase(id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue