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); } }