block picking fix
This commit is contained in:
parent
909f380825
commit
8ac0794645
@ -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…
x
Reference in New Issue
Block a user