feat: make Decorator listen to block interactions

This commit is contained in:
MihailRis
2024-11-05 03:46:41 +03:00
parent f5bc6fc136
commit 77ae35e364
5 changed files with 36 additions and 21 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ LevelFrontend::LevelFrontend(
"block-previews"
);
controller->getBlocksController()->listenBlockInteraction(
[=](Player* player, glm::ivec3 pos, const Block& def, BlockInteraction type) {
[=](auto player, const auto& pos, const auto& def, BlockInteraction type) {
auto material = level->content->findBlockMaterial(def.material);
if (material == nullptr) {
return;