local egg_founded = nil local world = require("world") local player = require("player") local creator = require("creator") local egg_positions = { [1] = { x = -15, y = 236, z = -92 }, [2] = { x = 49, y = 202, z = -162 }, [3] = { x = 56, y = 214, z = -25 }, [4] = { x = 128, y = 187, z = 57 }, [5] = { x = 150, y = 196, z = 190 }, [6] = { x = 61, y = 204, z = 181 }, [7] = { x = 91, y = 187, z = 131 }, [8] = { x = 77, y = 160, z = 162 }, [9] = { x = -10, y = 162, z = 109 }, [10] = { x = 1, y = 183, z = 25 }, [11] = { x = 0, y = 170, z = 0 }, [12] = { x = -94, y = 201, z = -30 }, [13] = { x = -91, y = 221, z = -53 }, [14] = { x = -64, y = 206, z = -63 }, } local function findEgg(centerX, centerY, centerZ) for dx = -5, 5 do local x = centerX + dx for dz = -5, 5 do local z = centerZ + dz for dy = -2, 2 do local y = centerY + dy local key = x .. "_" .. y .. "_" .. z local blockInfo = world.getBlock(x, y, z) if blockInfo and blockInfo.name == "block.minecraft.dragon_egg" then return { x = x, y = y, z = z } end end end end return nil end local tickCounter = 0 local searchCooldown = 6 registerClientTickPost(function() tickCounter = tickCounter + 1 if tickCounter >= searchCooldown then tickCounter = 0 egg_founded = nil if player.getLocation() == "DWARVEN_MINES" then for _, position in ipairs(egg_positions) do local founded = findEgg(position.x, position.y, position.z) if founded then egg_founded = founded break end end end end end) registerWorldRenderer(function(context) if egg_founded then context.renderFilled( creator.createBox(egg_founded.x, egg_founded.y, egg_founded.z, egg_founded.x + 1, egg_founded.y + 1, egg_founded.z + 1), 86, 44, 191, 140, true) context.renderLineFromCursor(egg_founded.x + 0.5, egg_founded.y + 0.5, egg_founded.z + 0.5, 86, 44, 191, 140, 3) context.renderText(egg_founded.x + 0.5, egg_founded.y + 1.5, egg_founded.z + 0.5, "Monolith", 86, 44, 191, 140, 3) end end)