KAI SO ELITE [2]

Ok kodari make a mod in which a dimension called x dimension should exist I which new mobs and new biome surrounding will exist and it can be accessed by diamond block portal for the minecraft beta version 26.60.21 mobile

Kodari AI
KodariOct 13 at 8:43 am 1
XDimensionPortal
A Minecraft Bedrock plugin adding a new explorable dimension called the X Dimension, accessible via a diamond block portal. Features custom mobs, unique biomes, and distinct terrain generation. Players construct a diamond block frame and ignite it to enter the X Dimension, where they encounter new hostile and passive creatures, exotic vegetation, and altered landscapes. Includes portal activation mechanics, dimension-specific mob spawning, biome registration, and custom block behaviors for the portal. Compatible with Minecraft Bedrock beta version 26.60.21 on mobile devices.
  • Add Bedrock behavior/resource packs targeting mobile Bedrock 26.60.21.

  • Define the X Dimension, its custom biome, and two hostile mobs.

  • Add a diamond-block frame portal activated with flint and steel.

Created the X Dimension behavior and resource packs. It adds the purple-and-deepslate biome, two hostile mobs, and a portal made from a 4×5 diamond-block frame: use flint and steel on the frame to enter, and use another frame in the dimension to return.

Enable both packs for the world. If your 26.60.21 beta offers custom-dimension or Beta API experiments, enable those too. The mobs reuse vanilla textures; I haven’t verified the packs in that specific mobile beta.

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

const FRAME_BLOCK = "minecraft:diamond_block";
const PORTAL_DIMENSION = "x_dimension:x_dimension";
const cooldowns = new Set();

world.afterEvents.playerInteractWithBlock.subscribe((event) => {
  if (event.block.typeId !== FRAME_BLOCK) return;
  if (event.itemStack?.typeId !== "minecraft:flint_and_steel") return;

  const frame = findPortalFrame(event.block);
  if (!frame) return;

  const player = event.player;
  if (cooldowns.has(player.id)) return;

  cooldowns.add(player.id);
  system.runTimeout(() => cooldowns.delete(player.id), 40);

  const entering = event.block.dimension.id !== PORTAL_DIMENSION;
  const destination = world.getDimension(entering ? PORTAL_DIMENSION : "minecraft:overworld");
  player.sendMessage(entering ? "Entering the X Dimension..." : "Returning to the Overworld...");
  system.run(() => {
    player.teleport({ x: 0.5, y: 100, z: 0.5 }, { dimension: destination });
  });
});

function findPortalFrame(block) {
  const origin = block.location;
  const dimension = block.dimension;

  for (const axis of [
    { x: 1, z: 0 },
    { x: 0, z: 1 }
  ]) {
    for (let left = -3; left <= 0; left++) {
      for (let bottom = -4; bottom <= 0; bottom++) {
        const x = origin.x + axis.x * left;
        const z = origin.z + axis.z * left;
        const y = origin.y + bottom;

        let valid = true;
        for (let width = 0; width < 4 && valid; width++) {
          for (let height = 0; height < 5; height++) {
            const edge = width === 0 || width === 3 || height === 0 || height === 4;
            const location = {
              x: x + axis.x * width,
              y: y + height,
              z: z + axis.z * width
            };
            const typeId = dimension.getBlock(location)?.typeId;

            if (edge ? typeId !== FRAME_BLOCK : typeId !== "minecraft:air" && typeId !== "minecraft:fire") {
              valid = false;
              break;
            }
          }
        }

        if (valid) return { x, y, z };
      }
    }
  }

  return undefined;
}