import { world, MoonPhase } from "@minecraft/server";

let lastAnnouncedDay = -1; // fuera, persiste

export function fm_rise() {
  const t = world.getTimeOfDay();

  if (world.getMoonPhase() !== MoonPhase.FullMoon) return;

  const day = world.getDay();
  if (day === lastAnnouncedDay) return; //bloquea repetidos ese día

    world.getDimension("overworld").runCommand("function fm_rise");
  lastAnnouncedDay = day;
}