refactor: extract method placeBlock and move some code from PlayerController to BlocksController

This commit is contained in:
MihailRis
2024-07-15 15:41:25 +03:00
parent 7c6d620560
commit 4a0bc016ce
5 changed files with 60 additions and 49 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ LevelFrontend::LevelFrontend(LevelController* controller, Assets* assets)
BlocksPreview::build(contentCache.get(), assets, level->content),
"block-previews"
);
controller->getPlayerController()->listenBlockInteraction(
controller->getBlocksController()->listenBlockInteraction(
[=](Player*, glm::ivec3 pos, const Block* def, BlockInteraction type) {
auto material = level->content->findBlockMaterial(def->material);
if (material == nullptr) {