🧱Bedrock Academy
🎁 āĻšāĻžāϤ⧇-āĻ•āϞāĻŽā§‡ āĻĒā§āϰāĻœā§‡āĻ•ā§āϟ

🎁 āĻĒā§āϰāĻœā§‡āĻ•ā§āϟ: Magic Wand

āĻāĻ•āϟāĻž custom magic wand āĻŦāĻžāύāĻžāĻ“ — texture, recipe, cooldown āĻ“ āĻŦā§āϝāĻŦāĻšāĻžāϰ⧇ āĻļāĻŦā§āĻĻ āϏāĻšāĨ¤ āϏāĻŦ āφāϗ⧇āϰ āϞ⧇āϏāύ āĻāĻ•āϏāĻžāĻĨ⧇ āĻ•āĻžāĻœā§‡ āϞāĻžāĻ—āĻŦ⧇āĨ¤

⏱ ~25 āĻŽāĻŋāύāĻŋāϟ

āϧāĻžāĻĒ ā§§: Wand āφāχāĻŸā§‡āĻŽ (Behavior)

behavior_pack/items/magic_wand.json
1{
2 "format_version": "1.21.0",
3 "minecraft:item": {
4 "description": {
5 "identifier": "myaddon:magic_wand",
6 "menu_category": { "category": "equipment" }
7 },
8 "components": {
9 "minecraft:icon": "magic_wand",
10 "minecraft:display_name": { "value": "Magic Wand" },
11 "minecraft:max_stack_size": 1,
12 "minecraft:hand_equipped": true,
13 "minecraft:cooldown": {ⓘ
14 "category": "myaddon_wand",
15 "duration": 2.0
16 },
17 "minecraft:use_modifiers": {
18 "use_duration": 0.2ⓘ
19 }
20 }
21 }
22}
  • L13cooldown: āĻŦā§āϝāĻŦāĻšāĻžāϰ⧇āϰ āĻĒāϰ duration āϏ⧇āϕ⧇āĻ¨ā§āĻĄ āĻ…āĻĒ⧇āĻ•ā§āώāĻž — āĻ¸ā§āĻĒā§āϝāĻžāĻŽ āϠ⧇āĻ•āĻžāϝāĻŧāĨ¤
  • L18use_duration: āĻ•āϤ āϏāĻŽāϝāĻŧ āϧāϰ⧇ āϰāĻžāĻ–āϞ⧇ 'use' āĻ—āĻŖā§āϝ āĻšāĻŦ⧇āĨ¤

āϧāĻžāĻĒ ā§¨: Texture āϝ⧋āĻ— āĻ•āϰ⧋

  • āĻāĻ•āϟāĻž 16×16 magic_wand.png āĻŦāĻžāύāĻŋāϝāĻŧ⧇ āϰāĻžāĻ–ā§‹ resource_pack/textures/items/-āĻāĨ¤
  • item_texture.json-āĻ āĻāĻ•āϟāĻž key āϝ⧋āĻ— āĻ•āϰ⧋: "magic_wand": { "textures": "textures/items/magic_wand" }
  • .lang-āĻ āύāĻžāĻŽ āĻĻāĻžāĻ“: item.myaddon:magic_wand=Magic Wand

āϧāĻžāĻĒ ā§Š: Craft āĻ•āϰāĻžāϰ recipe

behavior_pack/recipes/magic_wand.json
1{
2 "format_version": "1.21.0",
3 "minecraft:recipe_shaped": {
4 "description": { "identifier": "myaddon:magic_wand" },
5 "tags": ["crafting_table"],
6 "pattern": [
7 " R",ⓘ
8 "S ",
9 "S "
10 ],
11 "key": {
12 "R": { "item": "myaddon:ruby" },
13 "S": { "item": "minecraft:stick" }
14 },
15 "result": { "item": "myaddon:magic_wand" }
16 }
17}
  • L7āωāĻĒāϰ⧇-āĻĄāĻžāύ⧇ āϰ⧁āĻŦāĻŋ (mana crystal), āύāĻŋāĻšā§‡ āĻĻ⧁āχ stick (handle)āĨ¤

āϧāĻžāĻĒ ā§Ē: āĻŦā§āϝāĻŦāĻšāĻžāϰ⧇ āĻļāĻŦā§āĻĻ (āϐāĻšā§āĻ›āĻŋāĻ•)

Module 2-āĻāϰ sound āϞ⧇āϏāύ⧇āϰ āĻŽāϤ⧋ āĻāĻ•āϟāĻž myaddon.wand.cast āĻļāĻŦā§āĻĻ āϝ⧋āĻ— āĻ•āϰāϤ⧇ āĻĒāĻžāϰ⧋āĨ¤ āφāĻĒāĻžāϤāϤ /playsound myaddon.wand.cast @s āĻĻāĻŋāϝāĻŧ⧇ āĻŸā§‡āĻ¸ā§āϟ āĻ•āϰ⧋ — āĻĒāϰ⧇ Script API āĻĻāĻŋāϝāĻŧ⧇ wand āĻŦā§āϝāĻŦāĻšāĻžāϰ⧇ āĻ…āĻŸā§‹ āĻŦāĻžāϜāĻžāĻŦ⧇āĨ¤

āϧāĻžāĻĒ ā§Ģ: āĻŸā§‡āĻ¸ā§āϟ āĻ•āϰ⧋

  1. 1RP + BP āĻĻ⧁āĻŸā§‹āχ world-āĻ activate āĻ•āϰ⧋āĨ¤
  2. 2/give @s myaddon:ruby 10 āĻĻāĻŋāϝāĻŧ⧇ āĻ•āĻŋāϛ⧁ āϰ⧁āĻŦāĻŋ āύāĻžāĻ“āĨ¤
  3. 3Crafting table-āĻ āĻĒā§āϝāĻžāϟāĻžāĻ°ā§āύ āĻŦāϏāĻŋāϝāĻŧ⧇ wand āĻŦāĻžāύāĻžāĻ“āĨ¤
  4. 4Wand āĻšāĻžāϤ⧇ āύāĻŋāϝāĻŧ⧇ use āĻ•āϰ⧋ — cooldown bar āĻĻ⧇āĻ–āĻž āϝāĻžāĻŦ⧇āĨ¤