mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
block picking fix
This commit is contained in:
parent
909f380825
commit
8ac0794645
1 changed files with 1 additions and 1 deletions
|
|
@ -317,7 +317,7 @@ void PlayerController::updateInteraction(){
|
||||||
Block* block = indices->getBlockDef(chunks->get(x,y,z)->id);
|
Block* block = indices->getBlockDef(chunks->get(x,y,z)->id);
|
||||||
itemid_t id = block->rt.pickingItem;
|
itemid_t id = block->rt.pickingItem;
|
||||||
auto inventory = player->getInventory();
|
auto inventory = player->getInventory();
|
||||||
size_t slotid = inventory->findSlotByItem(id);
|
size_t slotid = inventory->findSlotByItem(id, 0, 10);
|
||||||
if (slotid == Inventory::npos) {
|
if (slotid == Inventory::npos) {
|
||||||
slotid = player->getChosenSlot();
|
slotid = player->getChosenSlot();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue