DEVELOPMENT TASK: ADVANCED THROWING DISC ENCHANTMENT SYSTEM
https://throwing-discs-two.vercel.app/
Minecraft Bedrock Edition Addon
You are a senior Minecraft Bedrock Edition Addon Developer specializing in Script API, custom weapons, projectile physics, enchantment systems, multiplayer combat, and survival gameplay.
I already have a Throwing Disc Addon project with five weapon variants:
1. Copper Throwing Disc
2. Iron Throwing Disc
3. Gold Throwing Disc
4. Diamond Throwing Disc
5. Netherite Throwing Disc
Your task is to implement a complete, functional, balanced enchantment system specifically designed for these weapons.
IMPORTANT:
Do not create a separate addon. Integrate everything into my existing Throwing Disc Addon project. First inspect the existing source code and understand its architecture before making modifications.
1. COMPLETE ENCHANTMENT LIST
Implement all 20 enchantments.
CORE ENCHANTMENTS
Enchantment| Max Level| Effect
Sharpness| V| Increases damage by 0.5 per level.
Piercing| IV| Allows the disc to pass through additional enemies.
Ricochet| III| Increases the number of block bounces.
Returning| III| Increases projectile return speed.
Power| V| Increases throwing velocity and slightly improves impact damage.
Unbreaking| III| Reduces durability consumption.
Mending| I| Repairs the disc using collected XP.
Aerodynamic| III| Increases maximum flight distance.
COMBAT ENCHANTMENTS
Enchantment| Max Level| Effect
Fire Aspect| II| Sets enemies on fire.
Knockback| II| Increases knockback on impact.
Looting| III| Improves eligible mob drops when killed by the disc.
Multishot| I| Launches three discs in different directions.
Critical Strike| III| Provides a chance of bonus damage.
Crippling| II| Applies Slowness to enemies.
Lifesteal| II| Restores a small amount of owner health on successful hits.
Shieldbreaker| II| Briefly disables an opponent's shield when successfully striking a blocking player.
ADVANCED ENCHANTMENTS
Enchantment| Max Level| Effect
Tracking| II| Slightly guides the disc toward nearby enemies.
Wind Burst| II| Creates a wind knockback effect on impact.
Spectral| II| Makes hit enemies glow temporarily.
Combo| III| Consecutive hits on different enemies increase subsequent damage.
2. SIGNATURE FEATURE: COMBO THROW
This is the most important feature.
Create a complete multi-target throwing system.
Example:
A player throws a Netherite Disc toward five enemies.
- Enemy 1 gets hit.
- Disc continues through Enemy 2.
- Disc continues through Enemy 3.
- Disc hits a wall and ricochets.
- Disc hits Enemy 4.
- Disc hits Enemy 5.
- Disc automatically returns to the original thrower.
The disc must feel like a real returning weapon.
Combo Throw Rules
1. Maximum five unique enemy hits per throw.
2. Each enemy can only be damaged once per throw.
3. Piercing allows the disc to pass through targets.
4. Ricochet changes the disc's direction after hitting suitable surfaces.
5. Returning activates after the outbound journey or when the five-target limit is reached.
6. The disc must return to its original owner.
7. The owner must be immune to their own disc.
8. Prevent repeated-hit exploits.
9. Prevent item duplication.
10. Preserve all enchantments when the disc returns.
3. COMBO ENCHANTMENT
Implement Combo I, II and III.
Each successful hit on a new enemy increases the damage of the next hit.
Level| Damage bonus per consecutive hit
Combo I| +0.5
Combo II| +1.0
Combo III| +1.5
For Combo III, the maximum accumulated bonus is +6 damage.
Example:
Enemy| Additional damage
Enemy 1| +0
Enemy 2| +1.5
Enemy 3| +3
Enemy 4| +4.5
Enemy 5| +6
Rules:
- Combo only activates against unique targets.
- Repeated hits against the same entity cannot increase the bonus.
- Reset the combo after the throwing cycle finishes.
- Make the combo system work correctly in multiplayer.
4. PIERCING SYSTEM
Implement the following target progression:
Enchantment| Maximum unique targets
No Piercing| 1
Piercing I| 2
Piercing II| 3
Piercing III| 4
Piercing IV| 5
The absolute maximum must remain five targets per throw.
The piercing system must support mobs and players, subject to world settings.
5. RICOCHET SYSTEM
Create realistic projectile ricochet physics.
Enchantment| Maximum block bounces
No Ricochet| 0
Ricochet I| 1
Ricochet II| 2
Ricochet III| 3
Requirements:
- Detect suitable block collisions.
- Calculate the reflected projectile direction.
- Preserve reasonable projectile velocity.
- Avoid repeatedly bouncing against the same surface.
- Continue detecting entities after ricocheting.
- Spawn appropriate impact particles and sounds.
6. MULTISHOT SYSTEM
When Multishot I is applied:
- Launch three independent discs.
- One travels straight.
- One travels slightly left.
- One travels slightly right.
- All three projectiles have independent movement and collision detection.
- All projectiles return to the original owner.
- Use a shared five-target hit budget for the entire throwing action.
- Prevent three projectiles from bypassing the five-target maximum.
Preserve the original weapon's enchantments across all projectiles.
7. CRITICAL STRIKE
Implement Critical Strike I–III.
Suggested probabilities:
- Level I: 10%
- Level II: 20%
- Level III: 30%
Suggested bonus damage: 50% additional damage on a critical hit.
Add a distinctive critical hit particle and sound.
8. ENCHANTMENT COMPATIBILITY
Implement the following restrictions:
- Multishot + Piercing: Incompatible.
- Multishot + Tracking: Incompatible.
Other enchantments should work together unless a technical limitation or serious balance issue requires an additional restriction.
Allow these combinations:
- Sharpness + Power
- Piercing + Ricochet
- Ricochet + Returning
- Combo + Critical Strike
- Fire Aspect + Crippling
- Lifesteal + Looting
- Returning + Aerodynamic
9. ENCHANTMENT APPLICATION SYSTEM
Create a proper in-game enchantment application system.
Players should be able to:
- Obtain custom enchanted books.
- Apply enchantments to Throwing Discs.
- Combine compatible enchantments.
- Upgrade enchantment levels.
- See enchantment names and levels.
- Preserve enchantments after throwing and catching.
Support anvil-style interactions if technically possible.
If native Bedrock enchantment APIs cannot support these custom enchantments, implement a reliable script-managed alternative using item dynamic properties or another supported persistence mechanism.
Do not pretend custom native enchantments exist if the API does not support them.
10. ENCHANTMENT DISPLAY
The disc's item description should show its enchantments.
Example:
Netherite Throwing Disc
- Sharpness V
- Piercing IV
- Ricochet III
- Returning III
- Combo III
- Unbreaking III
Use clean Minecraft-style formatting.
11. PVP BALANCING
Make the weapon powerful but not game-breaking.
Requirements:
- Configurable damage values.
- Configurable cooldown.
- Configurable critical damage.
- Maximum five unique targets per throwing action.
- Combo damage cap.
- Respect PvP and friendly-fire settings.
- Prevent excessive knockback.
- Prevent infinite lifesteal.
- Prevent shield-breaking exploits.
- Ensure no enchantment bypasses the target limit.
All important values should be configurable in one central configuration file.
12. TECHNICAL IMPLEMENTATION
Before modifying anything:
1. Inspect the existing project.
2. Read all relevant JavaScript files.
3. Inspect item definitions and manifests.
4. Understand how the current projectile and return systems work.
5. Identify existing bugs and compatibility issues.
6. Plan the implementation without unnecessarily rewriting working systems.
Use supported Minecraft Bedrock Script API functions.
Requirements:
- Clean modular JavaScript architecture.
- Proper projectile ownership.
- Reliable entity hit tracking.
- Safe item inventory restoration.
- Persistent enchantment data.
- Multiplayer synchronization.
- Efficient tick handling.
- No memory leaks.
- No duplicate event subscriptions.
- No unsupported APIs.
- No placeholder functions.
13. TESTING
Test every enchantment individually.
Then test important combinations:
1. Sharpness + Piercing.
2. Piercing + Ricochet.
3. Piercing + Returning.
4. Piercing + Combo.
5. Ricochet + Combo.
6. Sharpness + Critical Strike.
7. Multishot + Returning.
8. Unbreaking + Mending.
9. Fire Aspect + Piercing.
10. Full Ultimate Combo Build.
Verify:
- Five-target maximum.
- Correct damage calculation.
- Correct combo progression.
- Correct ricochet count.
- Correct returning behavior.
- Enchantment persistence.
- Multiplayer ownership.
- No item duplication.
- No repeated damage exploits.
Do not claim that runtime testing passed unless it was actually performed.
14. FINAL DELIVERABLE
Modify the existing addon and provide:
1. Updated Behavior Pack.
2. Updated Resource Pack.
3. All 20 enchantments.
4. Custom enchanted books or an equivalent application system.
5. Enchantment application and upgrade mechanics.
6. Combo Throw system.
7. Multiplayer compatibility.
8. Updated configuration.
9. Updated documentation.
10. Complete source code.
11. A packaged and installable .mcaddon file.
Do not stop after writing an implementation plan.
Actually create and modify the project files, run available tests, fix errors, and package the completed addon.
If any requested feature is technically unsupported, explain the limitation and implement the closest reliable alternative.
FINAL GOAL:
Transform the Throwing Disc into a fully customizable Minecraft Bedrock PvP weapon with a deep enchantment system and the signature ability to pierce multiple enemies, ricochet, build combo damage, and automatically return to its owner.