Слава Бестаєв

Create a Minecraft Bedrock addon called Power Spheres.

The addon adds 15 different power spheres. Each sphere is a special item that can be placed in the player's offhand. While the sphere is held in the offhand, its passive bonuses and negative effects are active.

Only one sphere can be active at a time.

Rarities

There are six rarities:

  • Common
  • Uncommon
  • Rare
  • Epic
  • Legendary
  • Mythic

The sphere's name should display its rarity.

Spheres

COMMON

  1. Stone Sphere
  • +1 Defense
  • -10% Movement Speed
  1. Rabbit Sphere
  • +15% Movement Speed
  • -1 Attack Damage
  1. Life Sphere
  • +2 Health
  • -1 Attack Damage

UNCOMMON

  1. Archer Sphere
  • +2 Ranged Attack Damage
  • +10% Movement Speed
  • -1 Defense
  1. Wolf Sphere
  • +2 Attack Damage
  • +15% Movement Speed
  1. Armor Sphere
  • +2 Defense
  • -20% Movement Speed

RARE

  1. Lightning Sphere
  • +2 Attack Damage
  • +30% Movement Speed
  • -2 Defense
  • Attacks have a small chance to trigger an additional lightning effect
  1. Nature Sphere
  • +2 Health
  • Slow regeneration
  • -10% Movement Speed

EPIC

  1. Cursed Sphere
  • +4 Attack Damage
  • -2 Health
  1. Flame Sphere
  • +3 Attack Damage
  • Fire Resistance
  • Attacks set enemies on fire
  • -2 Defense
  1. Ice Sphere
  • +3 Defense
  • +2 Health
  • Attacks slow enemies
  • -25% Movement Speed

LEGENDARY

  1. Tank Sphere
  • +4 Defense
  • +4 Health
  • -50% Movement Speed
  1. Vampire Sphere
  • +3 Attack Damage
  • Heals the player for 15% of damage dealt
  • -2 Health

MYTHIC

  1. Ninja Sphere
  • +75% Movement Speed
  • +5 Attack Damage
  • -3 Defense
  1. Berserker Sphere
  • +8 Attack Damage
  • +30% Movement Speed
  • -6 Defense
  • When the player's health is low, the sphere gives an additional Strength bonus

Important technical requirements

The addon must be made specifically for Minecraft Bedrock Edition, not Java Edition.

The spheres must be actual custom items.

They must work in the offhand slot.

The passive effects must remain active while the sphere is in the offhand and disappear when it is removed.

Use the Minecraft Bedrock Script API where necessary to implement custom attack damage, defense, health, movement speed, lifesteal, attack effects and other mechanics that cannot be represented by normal potion effects.

The addon must export as a working .mcaddon file.

Use the standard Minecraft diamond item texture for all spheres. Do not require custom PNG textures.

Include all required Behavior Pack and Resource Pack files inside the final .mcaddon.

Make the addon compatible with current Minecraft Bedrock Edition.

Kodari AI
KodariSep 7 at 7:06 pm 1
PowerSpheres
Adds 15 unique power spheres as custom items for Minecraft Bedrock Edition. Each sphere is placed in the offhand slot to activate passive bonuses and negative effects based on six rarities (Common to Mythic). Implements custom attack damage, defense, health, movement speed, lifesteal, fire, lightning, and slow effects via Script API. Uses standard diamond texture, exports as a working .mcaddon with complete Behavior and Resource Packs.
  1. Create the Bedrock behavior pack with custom offhand sphere items and Script API mechanics.

  2. Create the matching resource pack using the vanilla diamond texture and rarity-based names.

  3. Add manifests and packaging metadata for current Bedrock activation.

Created the Bedrock Power Spheres addon structure with:

  • 15 custom offhand sphere items

  • Behavior Pack and Resource Pack manifests

  • Script API mechanics for passive effects, attacks, lightning, fire, slowing, lifesteal, and low-health Berserker strength

  • Rarity-based item names

  • Vanilla diamond texture mappings for every sphere

Use /give @s kodari:<sphere_name> to obtain spheres, then place one in the offhand.

Слава Бестаєв

Create a Minecraft Bedrock Edition addon called Power Spheres.

The addon must add 15 custom power spheres. Each sphere is a custom item that can be placed in the player's offhand. While a sphere is in the offhand, its passive bonuses and negative effects are active. When the sphere is removed, its bonuses disappear.

Only one sphere can be active at a time.

Use the standard Minecraft diamond item texture for every sphere. Do not require custom PNG textures.

The addon must work on Minecraft Bedrock Edition and export as a working ".mcaddon".

Rarities

There are six rarities:

  • Common
  • Uncommon
  • Rare
  • Epic
  • Legendary
  • Mythic

Display the rarity in the sphere's name.

Common Spheres

Stone Sphere

Crafting recipe:

  • 4 Stone
  • 4 Coal
  • 1 Diamond

Effects:

  • +1 Defense
  • -10% Movement Speed

Rabbit Sphere

Crafting recipe:

  • 4 Rabbit Foot
  • 4 Feather
  • 1 Diamond

Effects:

  • +15% Movement Speed
  • -1 Attack Damage

Life Sphere

Crafting recipe:

  • 4 Apples
  • 4 Gold Nuggets
  • 1 Diamond

Effects:

  • +2 Health
  • -1 Attack Damage

Uncommon Spheres

Archer Sphere

Crafting recipe:

  • 4 Bows
  • 4 Arrows
  • 2 Diamonds

Effects:

  • +2 Ranged Attack Damage
  • +10% Movement Speed
  • -1 Defense

Wolf Sphere

Crafting recipe:

  • 4 Bones
  • 4 Leather
  • 2 Diamonds

Effects:

  • +2 Attack Damage
  • +15% Movement Speed

Armor Sphere

Crafting recipe:

  • 4 Iron Ingots
  • 4 Shields
  • 2 Diamonds

Effects:

  • +2 Defense
  • -20% Movement Speed

Rare Spheres

Lightning Sphere

Crafting recipe:

  • 4 Lightning Rods
  • 4 Copper Blocks
  • 4 Diamonds

Effects:

  • +2 Attack Damage
  • +30% Movement Speed
  • -2 Defense
  • Attacks have a small chance to summon lightning on the target

Nature Sphere

Crafting recipe:

  • 4 Emeralds
  • 4 Leaves
  • 2 Golden Apples

Effects:

  • +2 Health
  • Slow Regeneration
  • -10% Movement Speed

Epic Spheres

Cursed Sphere

Crafting recipe:

  • 4 Echo Shards
  • 4 Obsidian
  • 2 Diamonds
  • 1 Nether Star

Effects:

  • +4 Attack Damage
  • -2 Health

Flame Sphere

Crafting recipe:

  • 4 Blaze Rods
  • 4 Magma Cream
  • 2 Diamonds
  • 1 Nether Star

Effects:

  • +3 Attack Damage
  • Fire Resistance
  • Attacks set enemies on fire
  • -2 Defense

Ice Sphere

Crafting recipe:

  • 4 Blue Ice
  • 4 Packed Ice
  • 2 Diamonds
  • 1 Nether Star

Effects:

  • +3 Defense
  • +2 Health
  • Attacks slow enemies
  • -25% Movement Speed

Legendary Spheres

Tank Sphere

Crafting recipe:

  • 8 Netherite Ingots
  • 4 Diamonds
  • 1 Nether Star

Effects:

  • +4 Defense
  • +4 Health
  • -50% Movement Speed

Vampire Sphere

Crafting recipe:

  • 4 Netherite Ingots
  • 4 Golden Apples
  • 2 Echo Shards
  • 1 Nether Star

Effects:

  • +3 Attack Damage
  • Heals the player for 15% of damage dealt
  • -2 Health

Mythic Spheres

Ninja Sphere

Crafting recipe:

  • 8 Netherite Ingots
  • 4 Ender Pearls
  • 4 Diamonds
  • 2 Nether Stars

Effects:

  • +75% Movement Speed
  • +5 Attack Damage
  • -3 Defense

Berserker Sphere

Crafting recipe:

  • 8 Netherite Ingots
  • 4 Netherite Blocks
  • 2 Nether Stars
  • 1 Dragon Egg

Effects:

  • +8 Attack Damage
  • +30% Movement Speed
  • -6 Defense
  • When the player's health is low, grant an additional Strength bonus

Technical Requirements

The spheres must be actual custom Bedrock items.

They must be usable in the player's offhand.

The addon must detect which sphere is currently in the offhand.

All positive and negative modifiers must be active only while the sphere is equipped.

Remove the modifiers when the sphere is removed.

Use the Bedrock Script API when necessary for custom damage, defense, health, movement speed, lifesteal, attack effects, and other mechanics.

Do not replace the custom mechanics with simple potion effects if that would change the intended values.

Include all required Behavior Pack, Resource Pack, item definitions, recipes, scripts, manifests and other files.

The final result must be a valid, importable ".mcaddon" file for Minecraft Bedrock Edition.

Kodari AI
KodariSep 7 at 7:21 pm 4
  1. Inspect the existing addon structure and current pack files.

  2. Implement or correct sphere items, recipes, manifests, textures, and Script API behavior.

  3. Package and validate the final .mcaddon archive.

  • The existing packs already contain the 15 custom offhand items and diamond texture mappings.

  • I’m adding the missing 15 crafting recipes, replacing broad potion cleanup with sphere-scoped state tracking, and implementing scripted attack/defense/lifesteal adjustments.

  • Because Bedrock crafting recipes have only nine input slots and no per-slot quantity field, recipes whose requested totals exceed nine inputs use the closest valid 3×3 representation while remaining importable.

The pack now has all 15 recipes and the script tracks only effects applied by the currently equipped sphere, so removing or swapping spheres does not wipe unrelated player effects. I’m doing the final archive and JSON/package validation now.

The export script needs one packaging correction: each .mcpack must contain manifest.json at its archive root rather than inside a nested power_spheres/ folder.

Created Power_Spheres.mcaddon with:

  • 15 custom Bedrock items

  • Offhand-only activation

  • Common through Mythic rarity names

  • Vanilla diamond texture for every sphere

  • 15 crafting recipes

  • Behavior Pack and Resource Pack

  • Script API support for:

    • Attack bonuses and penalties

    • Ranged attack bonuses

    • Defense adjustments

    • Health bonuses and penalties

    • Movement speed changes

    • Regeneration

    • Fire resistance

    • Lightning attack effects

    • Fire attacks

    • Slowing attacks

    • Vampire lifesteal

    • Berserker low-health bonus

  • Automatic removal of sphere effects when unequipped

  • Validated .mcaddon archive containing both .mcpack files

The final file is:

Power_Spheres.mcaddon

Import it into Minecraft Bedrock Edition, activate both included packs in a world, and use the crafting recipes or commands such as:

Plain Text
/give @s kodari:stone_sphere

Place a sphere in the offhand slot to activate it.

Слава Бестаєв
  1. Cursed Sphere

Rarity: Epic Crafting recipe: 4 Obsidian 4 Echo Shards 1 Nether Star Effects while held in offhand: +4 Attack Damage -2 Health

  1. Tank Sphere

Rarity: Legendary Crafting recipe: 4 Netherite Ingots 4 Diamonds 1 Nether Star Effects: +4 Defense +4 Health -50% Movement Speed

  1. Ninja Sphere

Rarity: Mythic Crafting recipe: 4 Netherite Ingots 4 Ender Pearls 1 Nether Star Effects: +75% Movement Speed +5 Attack Damage -3 Defense

  1. Vampire Sphere

Rarity: Legendary Crafting recipe: 4 Netherite Ingots 4 Golden Apples 1 Echo Shard Effects: +3 Attack Damage Heals the player for 15% of damage dealt to enemies -2 Health

  1. Flame Sphere

Rarity: Epic Crafting recipe: 4 Blaze Rods 4 Magma Cream 1 Diamond Effects: +3 Attack Damage Fire Resistance Attacks set enemies on fire -2 Defense

  1. Ice Sphere

Rarity: Epic Crafting recipe: 4 Blue Ice 4 Packed Ice 1 Diamond Effects: +3 Defense +2 Health Attacks slow enemies -25% Movement Speed

  1. Lightning Sphere

Rarity: Rare Crafting recipe: 4 Copper Blocks 4 Diamonds 1 Lightning Rod Effects: +2 Attack Damage +30% Movement Speed -2 Defense Small chance to summon lightning when attacking an enemy

  1. Nature Sphere

Rarity: Rare Crafting recipe: 4 Emeralds 4 Leaves 1 Golden Apple Effects: +2 Health Slow regeneration -10% Movement Speed

  1. Berserker Sphere

Rarity: Mythic Crafting recipe: 4 Netherite Ingots 4 Netherite Blocks 1 Dragon Egg Effects: +8 Attack Damage +30% Movement Speed -6 Defense When the player's health is low, grant additional Strength

Kodari AI
KodariSep 7 at 7:28 pm 1
  1. Update the nine sphere recipes to match the new ingredient counts.

  2. Verify and adjust each sphere’s rarity and active effects.

  3. Preserve the existing offhand-only Script API behavior and rebuild the .mcaddon.

Updated the nine requested spheres:

  • Corrected crafting ingredients and removed obsolete ingredients.

  • Preserved rarities:

    • Epic: Cursed, Flame, Ice

    • Legendary: Tank, Vampire

    • Rare: Lightning, Nature

    • Mythic: Ninja, Berserker

  • Preserved all requested offhand effects and attack mechanics.

  • Validated all JSON files and rebuilt the addon archive.

The updated addon is:

Power_Spheres.mcaddon

Kodari can make mistakes. Review important code before using.
Files
behavior_packs
resource_packs
build_mcaddon.sh
Code
37 781
behavior_packs/power_spheres/scripts/main.js
import { EquipmentSlot, system, world } from "@minecraft/server";
import { getSphere } from "./spheres.js";

const EFFECT_DURATION = 40;
const activeSpheres = new Map();
const appliedEffects = new Map();
const appliedHealthPenalties = new Map();
const damageGuards = new Set();

function getOffhand(entity) {
  try {
    return entity.getComponent("minecraft:equippable")?.getEquipment(EquipmentSlot.Offhand);
  } catch {
    return undefined;
  }
}

function getPlayerDamager(entity) {
  if (!entity) return undefined;
  if (entity.typeId === "minecraft:player") return entity;
  try {
    return entity.getComponent("minecraft:projectile")?.owner?.typeId === "minecraft:player"
      ? entity.getComponent("minecraft:projectile").owner
      : undefined;
  } catch {
    return undefined;
  }
}

function applyEffect(entity, effect) {
  try {
    entity.addEffect(effect.id, EFFECT_DURATION, {
      amplifier: effect.amplifier,
      showParticles: false
    });
  } catch {
  }
}

function removeSphereEffects(player) {
  const effectIds = appliedEffects.get(player.id) ?? [];
  for (const effectId of effectIds) {
    try {
      player.removeEffect(effectId);
    } catch {
    }
  }
  appliedEffects.delete(player.id);

  const healthPenalty = appliedHealthPenalties.get(player.id) ?? 0;
  if (healthPenalty > 0) {
    try {
      const health = player.getComponent("minecraft:health");
      if (health) health.setCurrentValue(Math.min(health.effectiveMax, health.currentValue + healthPenalty));
    } catch {
    }
  }
  appliedHealthPenalties.delete(player.id);
}

function refreshSphere(player, sphere) {
  const health = player.getComponent("minecraft:health");
  const isLowHealth = health !== undefined && health.currentValue <= health.effectiveMax * 0.35;
  const effects = [...(sphere.effects ?? [])];
  if (sphere.healthBonus !== undefined) {
    effects.push({id: "health_boost", amplifier: Math.max(0, Math.ceil(sphere.healthBonus / 2) - 1)});
  }
  const effectIds = [...new Set(effects.map((effect) => effect.id))];
  for (const oldEffectId of appliedEffects.get(player.id) ?? []) {
    if (!effectIds.includes(oldEffectId)) {
      try {
        player.removeEffect(oldEffectId);
      } catch {
      }
    }
  }
  for (const effect of effects) applyEffect(player, effect);
  appliedEffects.set(player.id, effectIds);

  if (health && sphere.healthPenalty !== undefined) {
    const allowedHealth = Math.max(1, health.effectiveMax - sphere.healthPenalty);
    if (!appliedHealthPenalties.has(player.id)) {
      const amount = Math.min(sphere.healthPenalty, Math.max(0, health.currentValue - allowedHealth));
      appliedHealthPenalties.set(player.id, amount);
      if (amount > 0) health.setCurrentValue(health.currentValue - amount);
    }
  }
}

function syncPlayer(player) {
  const item = getOffhand(player);
  const typeId = item?.typeId;
  const sphere = typeId ? getSphere(typeId) : undefined;
  const previousTypeId = activeSpheres.get(player.id);

  if (typeId !== previousTypeId) {
    removeSphereEffects(player);
    if (sphere) {
      activeSpheres.set(player.id, typeId);
    } else {
      activeSpheres.delete(player.id);
    }
  }

  if (sphere) {
    refreshSphere(player, sphere);
  }
}

function sphereForPlayer(player) {
  const item = getOffhand(player);
  return item ? getSphere(item.typeId) : undefined;
}

system.runInterval(() => {
  for (const player of world.getAllPlayers()) {
    syncPlayer(player);
  }
}, 10);

world.afterEvents.entityHitEntity.subscribe((event) => {
  const attacker = getPlayerDamager(event.damagingEntity);
  if (!attacker) {
    return;
  }

  const sphere = sphereForPlayer(attacker);
  if (!sphere) {
    return;
  }

  if (sphere.lightningChance !== undefined && Math.random() < sphere.lightningChance) {
    try {
      attacker.dimension.spawnEntity("minecraft:lightning_bolt", event.hitEntity.location);
    } catch {
    }
  }

  if (sphere.fireSeconds !== undefined) {
    try {
      event.hitEntity.setOnFire(sphere.fireSeconds);
    } catch {
    }
  }

  if (sphere.slowSeconds !== undefined) {
    try {
      event.hitEntity.addEffect("slowness", sphere.slowSeconds * 20, {amplifier: 1, showParticles: true});
    } catch {
    }
  }
});

world.afterEvents.entityHurt.subscribe((event) => {
  const hurtEntity = event.hurtEntity;
  const attacker = getPlayerDamager(event.damageSource?.damagingEntity);
  const attackerSphere = attacker ? sphereForPlayer(attacker) : undefined;
  const hurtSphere = hurtEntity?.typeId === "minecraft:player" ? sphereForPlayer(hurtEntity) : undefined;
  const guardKey = `${attacker?.id ?? "none"}:${hurtEntity?.id ?? "none"}`;

  if (damageGuards.has(guardKey)) return;
  damageGuards.add(guardKey);
  try {
    if (attackerSphere && hurtEntity) {
      const isProjectile = event.damageSource?.cause === "projectile";
      let attackBonus = isProjectile ? attackerSphere.rangedAttackBonus ?? 0 : attackerSphere.attackBonus ?? 0;
      const attackerHealth = attacker.getComponent("minecraft:health");
      if (attackerSphere.lowHealthAttackBonus !== undefined && attackerHealth && attackerHealth.currentValue <= attackerHealth.effectiveMax * 0.35) {
        attackBonus += attackerSphere.lowHealthAttackBonus;
      }

      if (attackBonus > 0) {
        hurtEntity.applyDamage(attackBonus);
      } else if (attackBonus < 0) {
        const health = hurtEntity.getComponent("minecraft:health");
        if (health && health.currentValue > 0) health.setCurrentValue(Math.min(health.effectiveMax, health.currentValue - attackBonus));
      }

      if (attackerSphere.lifesteal !== undefined) {
        const health = attacker.getComponent("minecraft:health");
        if (health) health.setCurrentValue(Math.min(health.effectiveMax, health.currentValue + (event.damage + Math.max(0, attackBonus)) * attackerSphere.lifesteal));
      }
    }

    if (hurtSphere?.defense && hurtEntity) {
      const defenseAdjustment = event.damage * hurtSphere.defense * 0.04;
      const health = hurtEntity.getComponent("minecraft:health");
      if (health && defenseAdjustment > 0 && health.currentValue > 0) {
        health.setCurrentValue(Math.min(health.effectiveMax, health.currentValue + defenseAdjustment));
      } else if (defenseAdjustment < 0) {
        hurtEntity.applyDamage(-defenseAdjustment);
      }
    }
  } catch {
  } finally {
    damageGuards.delete(guardKey);
  }
});

world.afterEvents.playerLeave.subscribe((event) => {