dinogamer1108_50472

pls make me a bedrock minecraft mod where if you go into a Glowing part of the void in the end you can go to a new end biome meaning i need a mcaddon

Kodari AI
KodariJul 31 at 4:20 am 29

I’ll create a Bedrock addon (.mcaddon) with glowing Void Rifts in the End void that teleport players to a custom “Luminous Depths” biome.

VoidRiftDepths
A Minecraft Bedrock addon (.mcaddon) that spawns glowing Void Rifts in the void beneath End islands. Stepping into a rift teleports players to the Luminous Depths, a custom End biome of procedurally generated floating islands built from new glowing blocks: Lumen Stone, Void Crystals, and Lumen Blooms. Features custom purple fog, particle effects, sound cues, a return rift that teleports players back to their exact entry point, and void-fall rescue. Ships as a behavior pack (Script API logic) plus a resource pack (fog, textures, names).

Done. Here’s how the addon works:

How it plays

  • While you’re in the End, glowing Void Rift blocks (light level 15, endrod particles) spawn floating in the void near you, below the islands.

  • Fall/jump into one and it collapses behind you, teleporting you to the Luminous Depths — a custom biome region far out in the End (x/z ≈ 100000) with 26 procedurally generated floating islands of end stone, glowing Lumen Stone, Void Crystal spires, and Lumen Blooms.

  • You arrive on a central platform with purple fog, night vision, and slow falling. A return rift on the platform teleports you back to your exact entry point.

  • Falling off the biome islands rescues you back to the platform instead of void death.

Install notes

  1. Zip behavior_pack and resource_pack together and rename the zip to .mcaddon (or import each folder as a pack).

  2. Enable the Holiday Creator Features experiment in world settings (required for custom blocks).

  3. The script uses only stable @minecraft/server@1.11.0 APIs — no Beta APIs toggle needed.

Textures reuse vanilla glowstone/end stone/amethyst/shroomlight so the pack works with zero binary assets; swap the paths in terrain_texture.json for custom PNGs later if you want a unique look.

Kodari can make mistakes. Review important code before using.
Files
behavior_pack
resource_pack
Code
11 462
behavior_pack/scripts/main.js
import { world, system } from "@minecraft/server";

const END_ID = "minecraft:the_end";
const RIFT_TYPE = "voidrift:void_rift";
const CENTER = { x: 100000, y: 80, z: 100000 };
const PLATFORM_Y = 70;
const REGION_RADIUS = 260;
const MAX_RIFTS = 24;
const RIFT_TRIGGER_DIST2 = 2.3 * 2.3;
const TRAVEL_COOLDOWN = 40;
const PROP_RIFTS = "voidrift:rifts";
const PROP_GENERATED = "voidrift:generated";
const RETURN_PREFIX = "voidrift:return:";
const FOG_ID = "voidrift:luminous_depths";
const FOG_TAG = "voidrift_depths";

let rifts = [];
let generating = false;
const fogged = new Set();
const travelCooldown = new Map();

system.runTimeout(loadState, 40);

function loadState() {
  try {
    const raw = world.getDynamicProperty(PROP_RIFTS);
    if (typeof raw === "string") rifts = JSON.parse(raw);
  } catch (e) {
    rifts = [];
  }
}

function saveRifts() {
  try {
    world.setDynamicProperty(PROP_RIFTS, JSON.stringify(rifts));
  } catch (e) {}
}

function getEnd() {
  return world.getDimension(END_ID);
}

function dist2(a, b) {
  const dx = a.x - b.x;
  const dy = a.y - b.y;
  const dz = a.z - b.z;
  return dx * dx + dy * dy + dz * dz;
}

function inBiomeRegion(loc) {
  const dx = loc.x - CENTER.x;
  const dz = loc.z - CENTER.z;
  return dx * dx + dz * dz <= REGION_RADIUS * REGION_RADIUS;
}

// Spawn glowing rifts in the void near End players
system.runInterval(() => {
  for (const player of world.getPlayers()) {
    if (player.dimension.id !== END_ID) continue;
    if (inBiomeRegion(player.location)) continue;
    if (Math.random() < 0.4) trySpawnRift(player);
  }
}, 160);

function trySpawnRift(player) {
  if (rifts.length >= MAX_RIFTS) return;
  const dim = getEnd();
  const angle = Math.random() * Math.PI * 2;
  const dist = 14 + Math.random() * 26;
  const x = Math.floor(player.location.x + Math.cos(angle) * dist);
  const z = Math.floor(player.location.z + Math.sin(angle) * dist);
  const y = 6 + Math.floor(Math.random() * 34);
  const block = dim.getBlock({ x, y, z });
  if (!block || !block.isAir) return;
  for (let i = 1; i <= 6; i++) {
    const below = dim.getBlock({ x, y: y - i, z });
    if (below && !below.isAir) return;
  }
  block.setType(RIFT_TYPE);
  rifts.push({ x, y, z });
  saveRifts();
}

// Prune rifts whose block was broken
system.runInterval(() => {
  const dim = getEnd();
  let changed = false;
  for (let i = rifts.length - 1; i >= 0; i--) {
    const block = dim.getBlock(rifts[i]);
    if (!block || block.typeId !== RIFT_TYPE) {
      rifts.splice(i, 1);
      changed = true;
    }
  }
  if (changed) saveRifts();
}, 200);

// Rift glow particles
system.runInterval(() => {
  const dim = getEnd();
  const players = world.getPlayers().filter((p) => p.dimension.id === END_ID);
  for (const rift of rifts) {
    const near = players.some((p) => dist2(p.location, rift) < 64 * 64);
    if (!near) continue;
    const center = { x: rift.x + 0.5, y: rift.y + 0.5, z: rift.z + 0.5 };
    try {
      dim.spawnParticle("minecraft:endrod", center);
      dim.spawnParticle("minecraft:sculk_charge_pop_particle", center);
    } catch (e) {}
  }
}, 15);

// Travel detection
system.runInterval(() => {
  const dim = getEnd();
  for (const player of world.getPlayers()) {
    if (player.dimension.id !== END_ID) continue;
    const last = travelCooldown.get(player.id) ?? -1000;
    if (system.currentTick - last < TRAVEL_COOLDOWN) continue;
    for (let i = 0; i < rifts.length; i++) {
      const rift = rifts[i];
      const center = { x: rift.x + 0.5, y: rift.y + 0.5, z: rift.z + 0.5 };
      if (dist2(player.location, center) > RIFT_TRIGGER_DIST2) continue;
      travelCooldown.set(player.id, system.currentTick);
      travel(player, dim, i);
      break;
    }
  }
}, 8);

function travel(player, dim, riftIndex) {
  const key = RETURN_PREFIX + player.id;
  if (inBiomeRegion(player.location)) {
    let target = null;
    try {
      const raw = world.getDynamicProperty(key);
      if (typeof raw === "string") target = JSON.parse(raw);
    } catch (e) {}
    world.setDynamicProperty(key, undefined);
    removeFog(player);
    if (target) {
      player.teleport({ x: target.x, y: target.y, z: target.z }, { dimension: dim });
    } else {
      player.teleport({ x: 100.5, y: 49, z: 0.5 }, { dimension: dim });
    }
    player.addEffect("minecraft:slow_falling", 100, { showParticles: false });
    player.sendMessage("§7The rift folds shut behind you, returning you to the outer End.");
    player.playSound("portal.travel");
  } else {
    ensureBiomeGenerated(dim);
    try {
      world.setDynamicProperty(key, JSON.stringify({
        x: player.location.x,
        y: player.location.y,
        z: player.location.z
      }));
    } catch (e) {}
    collapseRift(dim, riftIndex);
    player.teleport({ x: CENTER.x + 4.5, y: PLATFORM_Y + 1, z: CENTER.z + 0.5 }, { dimension: dim });
    applyFog(player);
    player.addEffect("minecraft:slow_falling", 200, { showParticles: false });
    player.addEffect("minecraft:night_vision", 600, { showParticles: false });
    player.sendMessage("§5§lThe glowing void swallows you... §d§oWelcome to the Luminous Depths.");
    player.playSound("block.end_portal.spawn");
  }
}

function collapseRift(dim, index) {
  const rift = rifts[index];
  if (!rift) return;
  const block = dim.getBlock(rift);
  if (block && block.typeId === RIFT_TYPE) block.setType("minecraft:air");
  rifts.splice(index, 1);
  saveRifts();
}

// Fog handling
function applyFog(player) {
  if (fogged.has(player.id)) return;
  try {
    player.runCommand(`fog @s push ${FOG_ID} ${FOG_TAG}`);
    fogged.add(player.id);
  } catch (e) {}
}

function removeFog(player) {
  if (!fogged.has(player.id)) return;
  try {
    player.runCommand(`fog @s pop ${FOG_TAG}`);
  } catch (e) {}
  fogged.delete(player.id);
}

system.runInterval(() => {
  for (const player of world.getPlayers()) {
    if (player.dimension.id !== END_ID) continue;
    if (inBiomeRegion(player.location)) applyFog(player);
    else removeFog(player);
  }
}, 40);