fixed door inventory

This commit is contained in:
mmaheshwari2 2025-02-25 15:39:26 -08:00
parent 41939450b8
commit ff5882db30
3 changed files with 189555 additions and 189706 deletions

View file

@ -171,7 +171,7 @@ export class Blueprint {
const blockAtLocation = bot.blockAt(new Vec3(x, y, z));
const actualBlockName = blockAtLocation ? bot.registry.blocks[blockAtLocation.type].name : "air";
// Skip if both expected and actual block are "air"
// Skip if both expected and actual block are air
if (blockName === "air" && actualBlockName === "air") {
continue;
}

File diff suppressed because it is too large Load diff

View file

@ -28,7 +28,9 @@ function createInitialInventory(blueprint, agents) {
for (const row of level.placement) {
for (const block of row) {
if (block !== 'air') {
materialCounts[block] = (materialCounts[block] || 0) + 1;
// Check if material contains 'door' in the name, convert to oak_door
const materialKey = block.includes('door') ? 'oak_door' : block;
materialCounts[materialKey] = (materialCounts[materialKey] || 0) + 1;
}
}
}