mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-13 18:55:34 +02:00
fixed door inventory
This commit is contained in:
parent
41939450b8
commit
ff5882db30
3 changed files with 189555 additions and 189706 deletions
|
@ -171,7 +171,7 @@ export class Blueprint {
|
||||||
const blockAtLocation = bot.blockAt(new Vec3(x, y, z));
|
const blockAtLocation = bot.blockAt(new Vec3(x, y, z));
|
||||||
const actualBlockName = blockAtLocation ? bot.registry.blocks[blockAtLocation.type].name : "air";
|
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") {
|
if (blockName === "air" && actualBlockName === "air") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -28,7 +28,9 @@ function createInitialInventory(blueprint, agents) {
|
||||||
for (const row of level.placement) {
|
for (const row of level.placement) {
|
||||||
for (const block of row) {
|
for (const block of row) {
|
||||||
if (block !== 'air') {
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue