From cc18066c17912b90336809721b9fe92d85dd4451 Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Mon, 20 Apr 2026 14:19:33 +0100 Subject: [PATCH] fix(lobby,easter-egg): update portal coordinates and egg-check ring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lobby portal zones and signs moved to the rebuilt portal area at ~(436..488, 65..74, -322..-281), including a second Lyla's-World "Super Kitties" portal. Signs now use per-portal facing_direction so they face the hub walkway correctly. Easter-egg placeAllEggs validation now samples the far-ring eggs (indices 45-49) before falling back to the near ring — avoids false "blocks missing" reports when only close-ring eggs have been picked up. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../easter_egg_child_BP/scripts/main.js | 8 +++++++- lobby-addon/lobby_transfer_BP/scripts/main.js | 16 +++++++++------- 2 files changed, 16 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 57aeb1c..7b0235c 100644 --- a/easter-egg-addon/easter_egg_child_BP/scripts/main.js +++ b/easter-egg-addon/easter_egg_child_BP/scripts/main.js @@ -240,8 +240,14 @@ function placeAllEggs(playerPos) { // Validate at least one stored egg block actually exists const stored = getEggPositions(); if (stored && stored.length > 0) { + // Check far-ring eggs (last 5) — they're hardest to reach and least likely + // to have been collected yet. Avoids false "blocks missing" detection when + // only the close-ring eggs (1-5) have been collected. let found = 0; - for (let i = 0; i < Math.min(5, stored.length); i++) { + const checkAt = [45, 46, 47, 48, 49].filter(i => i < stored.length); + const fallback = checkAt.length === 0; + const indices = fallback ? [0, 1, 2, 3, 4].filter(i => i < stored.length) : checkAt; + for (const i of indices) { try { const block = overworld.getBlock({ x: stored[i].x, y: stored[i].y, z: stored[i].z }); if (block && block.typeId.includes("glazed_terracotta")) found++; diff --git a/lobby-addon/lobby_transfer_BP/scripts/main.js b/lobby-addon/lobby_transfer_BP/scripts/main.js index 716f567..2cb196c 100644 --- a/lobby-addon/lobby_transfer_BP/scripts/main.js +++ b/lobby-addon/lobby_transfer_BP/scripts/main.js @@ -10,9 +10,10 @@ const PORTAL_BLOCKS = { // Coordinate-based portal zones (fallback detection) const PORTAL_ZONES = [ - { name: "Jamie's World", x: -15, y: 65, z: -24, host: "10.0.0.247", port: 19133, color: "§a" }, - { name: "Lyla's World", x: 0, y: 65, z: -24, host: "10.0.0.247", port: 19134, color: "§d" }, - { name: "Mya's World", x: 15, y: 65, z: -24, host: "10.0.0.247", port: 19135, color: "§b" }, + { name: "Jamie's World", x: 436, y: 66, z: -296, host: "10.0.0.247", port: 19133, color: "§a" }, + { name: "Lyla's World", x: 462, y: 65, z: -322, host: "10.0.0.247", port: 19134, color: "§d" }, + { name: "Lyla's World", x: 474, y: 65, z: -281, host: "10.0.0.247", port: 19134, color: "§d" }, // Super Kitties portal + { name: "Mya's World", x: 488, y: 66, z: -296, host: "10.0.0.247", port: 19135, color: "§b" }, ]; const PORTAL_RADIUS_X = 2.5; @@ -114,14 +115,15 @@ world.afterEvents.playerLeave.subscribe((event) => { function placePortalSigns() { const overworld = world.getDimension("overworld"); const signs = [ - { x: -15, y: 70, z: -23, name: "Jamie's", color: "§a" }, - { x: 0, y: 70, z: -23, name: "Lyla's", color: "§d" }, - { x: 15, y: 70, z: -23, name: "Mya's", color: "§b" }, + { x: 438, y: 71, z: -296, name: "Jamie's", color: "§a", facing: 5 }, // east-facing + { x: 462, y: 71, z: -320, name: "Lyla's", color: "§d", facing: 3 }, // south-facing + { x: 486, y: 71, z: -296, name: "Mya's", color: "§b", facing: 4 }, // west-facing + { x: 474, y: 74, z: -281, name: "Super Kitties\n§fLyla's", color: "§d", facing: 2 }, // north-facing (Super Kitties portal) ]; for (const sign of signs) { try { - overworld.runCommand(`setblock ${sign.x} ${sign.y} ${sign.z} oak_wall_sign ["facing_direction":3]`); + overworld.runCommand(`setblock ${sign.x} ${sign.y} ${sign.z} oak_wall_sign ["facing_direction":${sign.facing}]`); } catch (e) { // Non-fatal — chunks may not be loaded }