From 616395de88d1edd86445418d88d7c0b8714dafd4 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Sun, 5 Apr 2026 03:02:13 +0100 Subject: [PATCH] =?UTF-8?q?revert(easter-egg):=20single-block=20eggs=20?= =?UTF-8?q?=E2=80=94=202-block=20block-state=20syntax=20broke=20placement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Block state syntax ["facing_direction":N] in setblock silently failed, so no egg blocks were placed and nothing could be collected. Revert to plain single block setblock with no states. Co-Authored-By: Claude Sonnet 4.6 --- easter-egg-addon/easter_egg_child_BP/scripts/main.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/easter-egg-addon/easter_egg_child_BP/scripts/main.js b/easter-egg-addon/easter_egg_child_BP/scripts/main.js index 0dd35ec..57aeb1c 100644 --- a/easter-egg-addon/easter_egg_child_BP/scripts/main.js +++ b/easter-egg-addon/easter_egg_child_BP/scripts/main.js @@ -222,9 +222,7 @@ function buildScene(dim, sceneIndex, x, surfY, z) { break; } - // 2-block tall egg: opposing facing directions create an oval silhouette - cmds.push(`setblock ${x} ${eggY} ${z} ${EGG_BLOCK} ["facing_direction":2]`); - cmds.push(`setblock ${x} ${eggY + 1} ${z} ${EGG_BLOCK} ["facing_direction":3]`); + cmds.push(`setblock ${x} ${eggY} ${z} ${EGG_BLOCK}`); for (const cmd of cmds) { try { dim.runCommand(cmd); } catch (e) {} @@ -313,9 +311,7 @@ function collectEgg(player, egg, tagId) { else if (PREFIX === "l") updateBasket(player, counts.j, count, counts.m); else if (PREFIX === "m") updateBasket(player, counts.j, counts.l, count); - // Remove both blocks of the 2-block tall egg - player.dimension.runCommand(`setblock ${egg.x} ${egg.y} ${egg.z} air`); - player.dimension.runCommand(`setblock ${egg.x} ${egg.y + 1} ${egg.z} air`); + player.dimension.runCommand(`setblock ${egg.x} ${egg.y} ${egg.z} air`); player.dimension.runCommand(`particle minecraft:egg_destroy_emitter ${egg.x} ${egg.y} ${egg.z}`); player.runCommand(`playsound random.orb @s`); player.runCommand(`playsound random.levelup @s`); @@ -334,7 +330,6 @@ function collectEgg(player, egg, tagId) { } // ─── Detection Loop ────────────────────────────────────────────── -// dy <= 3.0 covers both blocks of a 2-block tall egg (bottom at eggY, top at eggY+1). system.runInterval(() => { const positions = getEggPositions(); @@ -352,7 +347,7 @@ system.runInterval(() => { const dy = Math.abs(pos.y - egg.y); const dz = Math.abs(pos.z - egg.z); - if (dx <= 2.5 && dy <= 3.0 && dz <= 2.5) { + if (dx <= 2.5 && dy <= 2.0 && dz <= 2.5) { collectEgg(player, egg, tagId); } }