Fix Whool and block variations n slabs n stuff #13

Merged
Kolyah35 merged 2 commits from EpikIzCool/minecraft-pe-0.6.1:main into main 2026-03-24 16:31:59 +02:00
Showing only changes of commit a7c75d2ad2 - Show all commits

View File

@@ -91,7 +91,8 @@ void IngameBlockSelectionScreen::init()
//for (int i = 0; i < inventory->getContainerSize(); ++i)
//LOGI("> %d - %s\n", i, inventory->getItem(i)? inventory->getItem(i)->getDescriptionId().c_str() : "<-->\n");
InventorySize = inventory->getContainerSize();
// Grid indices are 0..N-1 for main inventory only; slots 0..MAX_SELECTION_SIZE-1 are hotbar links.
InventorySize = inventory->getContainerSize() - Inventory::MAX_SELECTION_SIZE;
InventoryRows = 1 + (InventorySize-1) / InventoryColumns;
//
@@ -265,7 +266,8 @@ void IngameBlockSelectionScreen::buttonClicked(Button* button) {
bool IngameBlockSelectionScreen::isAllowed( int slot )
{
if (slot < 0 || slot >= minecraft->player->inventory->getContainerSize())
const int gridCount = minecraft->player->inventory->getContainerSize() - Inventory::MAX_SELECTION_SIZE;
if (slot < 0 || slot >= gridCount)
return false;
#ifdef DEMO_MODE