diff --git a/src/java-block-ids.js b/src/java-block-ids.js index dc2af92..339b928 100644 --- a/src/java-block-ids.js +++ b/src/java-block-ids.js @@ -130,6 +130,12 @@ export const JAVA_TO_BEDROCK = new Map([ ['raw_gold_block', { bedrock: 'raw_gold_block', data: 0, name: 'Raw Gold Block' }], ['raw_copper_block', { bedrock: 'raw_copper_block', data: 0, name: 'Raw Copper Block' }], ['amethyst_block', { bedrock: 'amethyst_block', data: 0, name: 'Amethyst Block' }], + ['budding_amethyst', { bedrock: 'budding_amethyst', data: 0, name: 'Budding Amethyst' }], + + // ── Froglights ── + ['ochre_froglight', { bedrock: 'ochre_froglight', data: 0, name: 'Ochre Froglight' }], + ['pearlescent_froglight', { bedrock: 'pearlescent_froglight', data: 0, name: 'Pearlescent Froglight' }], + ['verdant_froglight', { bedrock: 'verdant_froglight', data: 0, name: 'Verdant Froglight' }], // ── Sandstone ── ['sandstone', { bedrock: 'sandstone', data: 0, name: 'Sandstone' }], diff --git a/src/schematics-browser.js b/src/schematics-browser.js index 6cf1fe2..c48380c 100644 --- a/src/schematics-browser.js +++ b/src/schematics-browser.js @@ -203,13 +203,6 @@ export async function downloadSchematic(projectUrl, timeoutMs = 60000) { // 3a: Look for Schemagic.load({ schematic: "https://...resource_media/schematic/..." }) const html = await page.content(); - // Debug: Log page title and HTML snippet to diagnose extraction failures - const pageTitle = await page.title(); - log(TAG, `Download page title: "${pageTitle}", HTML length: ${html.length}`); - log(TAG, `HTML snippet (first 500): ${html.slice(0, 500).replace(/\n/g, ' ')}`); - // Check for any download-related links - const allHrefs = html.match(/href="[^"]*download[^"]*"/gi) || []; - log(TAG, `Download-related hrefs found: ${allHrefs.length} — ${allHrefs.slice(0, 5).join(', ')}`); const schemagicMatch = html.match(/Schemagic\.load\s*\(\s*\{[^}]*schematic:\s*"([^"]+)"/); if (schemagicMatch) { schematicUrl = schemagicMatch[1]; @@ -246,9 +239,6 @@ export async function downloadSchematic(projectUrl, timeoutMs = 60000) { await page.waitForTimeout(3000); const schematicHtml = await page.content(); - const schPageTitle = await page.title(); - log(TAG, `Schematic page title: "${schPageTitle}", HTML length: ${schematicHtml.length}`); - log(TAG, `Schematic page HTML snippet (first 500): ${schematicHtml.slice(0, 500).replace(/\n/g, ' ')}`); const schematicPageMatch = schematicHtml.match(/Schemagic\.load\s*\(\s*\{[^}]*schematic:\s*"([^"]+)"/); if (schematicPageMatch) { schematicUrl = schematicPageMatch[1]; diff --git a/src/schematics.js b/src/schematics.js index a529da9..24d42f8 100644 --- a/src/schematics.js +++ b/src/schematics.js @@ -123,19 +123,6 @@ export async function fetchSchematic(url) { throw new Error(`Failed to fetch project page: ${err.message}`); } - // Debug: log project page info - const projTitle = html.match(/([^<]*)<\/title>/i); - log(TAG, `Project page title: "${projTitle?.[1] || 'NONE'}", HTML length: ${html.length}`); - log(TAG, `Project page snippet (500-1500): ${html.slice(500, 1500).replace(/\n/g, ' ')}`); - const dlLinks = html.match(/href="[^"]*download[^"]*"/gi) || []; - log(TAG, `Project page download links: ${dlLinks.length} — ${dlLinks.slice(0, 10).join(', ')}`); - // Also check for any schematic/schem references - const schemRefs = html.match(/\.(schematic|schem|litematic|nbt)/gi) || []; - log(TAG, `Schematic file references: ${schemRefs.length} — ${[...new Set(schemRefs)].join(', ')}`); - // Check for share type / download section - const shareMatch = html.match(/download\/([^/"]+)/g) || []; - log(TAG, `Download path types: ${[...new Set(shareMatch)].join(', ')}`); - // Extract metadata const titleMatch = html.match(/<title>([^<]+)<\/title>/i); const name = titleMatch