mr_games564
📎 1 file 2,574 chars
📄
pasted-code-1780115536873.txt
txt 115 lines
▶
Create a complete Minecraft custom weapon system called "Skybreaker Mace" as a datapack/command system (Java Edition latest version).

-----------------------------------
WEAPON DETAILS:
- Name: Skybreaker Mace
- Base item: Mace
- Custom name: Aqua, bold
- Lore: "Forged through forbidden sky ritual"

-----------------------------------
ABILITIES:

1. Passive:
- While holding the mace:
  - Disable fall damage completely

2. Active (Manual Launch):
- When player presses SHIFT (sneak) + RIGHT CLICK:
  - Launch player high into the air
  - Apply slow falling after launch
  - Play wind burst sound

3. Smash:
- On landing:
  - Create AOE damage
  - Knockback enemies
  - Add particle effects

4. Cooldown:
- 60 seconds cooldown for active ability

-----------------------------------
RITUAL CRAFTING SYSTEM:

NO crafting table. Only ritual.

STRUCTURE:
- Center block: Crying Obsidian
- Around: Soul Fire / Soul Campfire
- Decoration: Candles, Blackstone, Deepslate

ITEM PATTERN (EXACT):

- Center: 1 Mace
- Cross: 4 Netherite Ingots (N,S,E,W)
- Corners: 4 Totems of Undying

-----------------------------------
RITUAL ACTIVATION:

- Player stands on center block
- Player presses SHIFT (sneak)
- If correct pattern is present → ritual starts

-----------------------------------
RITUAL PROCESS (NO CANCEL):

- Duration: 60 seconds
- Once started:
  - Ritual CANNOT be cancelled
  - Ignore player movement or damage
  - Lock the ritual to the player who started it

- During ritual:
  - Show particles (soul, portal, enchant)
  - Play ambient sounds
  - Darken sky / dramatic effect (optional)

-----------------------------------
SUCCESS RESULT:

After 60 seconds:
- Lightning strike at center
- Explosion effect (no block damage)
- Remove all ritual items

- Spawn Skybreaker Mace with:
  - Custom name
  - Custom abilities
  - OWNER TAG (IMPORTANT)

-----------------------------------
OWNER LOCK SYSTEM:

- When mace is created:
  - Store the UUID or name of the player who started ritual in item NBT

- Only that player can:
  - Pick up the mace
  - Use the mace abilities

- If other player tries to pick it:
  - Prevent pickup OR instantly drop it back
  - Show message: "This weapon rejects you."

-----------------------------------
TECHNICAL:

- Use scoreboards for:
  - Ritual timer
  - Cooldown system

- Use:
  - /execute
  - NBT tags
  - Custom functions (tick, load)

- Optimize performance

-----------------------------------
OPTIONAL:

- Add title: "Skybreaker Mace Forged"
- Add screen shake or sound blast
- Make it feel like end-game legendary weapon
Kodari AI
KodariMay 30 at 4:34 am 9
SkybreakerMace
A Minecraft Java Edition datapack adding the Skybreaker Mace, a legendary custom weapon. Features passive fall damage immunity, a SHIFT+right-click sky launch with slow falling, and an AOE smash on landing with knockback and particles. Crafted via a 60-second ritual on Crying Obsidian with Netherite Ingots and Totems. Includes owner-lock NBT so only the ritual creator can wield it, plus scoreboards for cooldown and ritual timers.

Here’s the complete datapack. I’ll plan the file structure first:

  • pack.mcmeta — datapack metadata

  • load.mcfunction — scoreboard setup

  • tick.mcfunction — main tick loop dispatcher

  • give_mace.mcfunction — gives the Skybreaker Mace to a player

  • ritual/check.mcfunction — checks ritual structure & starts ritual

  • ritual/tick.mcfunction — runs every tick during ritual

  • ritual/complete.mcfunction — fires on ritual success

  • ability/passive.mcfunction — fall damage immunity

  • ability/launch.mcfunction — sky launch active ability

  • ability/smash.mcfunction — AOE landing smash

  • ability/cooldown_tick.mcfunction — counts down cooldown

  • owner/pickup_check.mcfunction — enforces owner lock


Now the ritual system:

Now the abilities:

Now the owner lock system:

Now the advancement that triggers the launch (sneak + use item):

The ritual start advancement (sneak + interact on crying obsidian):

The on_ground predicate for

[Generation stopped]

Kodari can make mistakes. Review important code before using.
Files
data
pack.mcmeta
Code
27 438
data/skybreaker/functions/ritual/tick.mcfunction
# ── Ritual Tick (runs for each player with sb_ritual >= 1) ───────────────────

# Increment timer
scoreboard players add @s sb_ritual 1

# Particle effects every 5 ticks
execute if score @s sb_ritual matches 1..1200 at @s run function skybreaker:ritual/particles

# Ambient sound every 40 ticks
execute if score @s sb_ritual matches 1 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 40 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 80 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 120 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 160 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 200 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 240 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 280 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 320 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 360 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 400 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 440 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 480 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 520 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 560 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 600 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 640 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 680 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 720 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 760 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 800 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 840 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 880 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 920 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 960 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 1000 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 1040 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 1080 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 1120 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 1160 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2

# Countdown titles at key moments
execute if score @s sb_ritual matches 600 run title @s actionbar {"text":"30 seconds remaining...","color":"yellow"}
execute if score @s sb_ritual matches 900 run title @s actionbar {"text":"15 seconds remaining...","color":"gold"}
execute if score @s sb_ritual matches 1080 run title @s actionbar {"text":"10 seconds remaining!","color":"red","bold":true}
execute if score @s sb_ritual matches 1140 run title @s actionbar {"text":"5...","color":"red","bold":true}
execute if score @s sb_ritual matches 1160 run title @s actionbar {"text":"4...","color":"red","bold":true}
execute if score @s sb_ritual matches 1180 run title @s actionbar {"text":"3...","color":"red","bold":true}
execute if score @s sb_ritual matches 1190 run title @s actionbar {"text":"2...","color":"red","bold":true}
execute if score @s sb_ritual matches 1195 run title @s actionbar {"text":"1...","color":"red","bold":true}

# Completion at 1200 ticks (60 seconds)
execute if score @s sb_ritual matches 1200.. run function skybreaker:ritual/complete

# Apply blindness/darkness during ritual for dramatic effect
effect give @s darkness 2 1 true