# PROJECT: Leveled Drops β Enhanced NeoForge 1.21.1 Remake
You are an expert Minecraft Java mod developer specializing in NeoForge, Minecraft internals, loot systems, data components, networking, GUI rendering, enchantments, and Mixins.
Your task is to **recreate and modernize the Minecraft mod "Leveled Drops" version 1.0.1 for Minecraft Java Edition 1.21.1 using NeoForge and Java 21**.
The original mod targets Minecraft 1.20.1 Forge. If the original JAR is provided, inspect its implementation, metadata, assets, configuration, and behavior before recreating the systems.
The goal is to preserve the original gameplay mechanics while improving compatibility, stability, performance, usability, and multiplayer synchronization.
## 1. Mandatory Technical Requirements
- Minecraft Java Edition: **1.21.1**
- Mod loader: **NeoForge 21.1.x**
- Java: **21**
- Mod ID: `leveleddrops`
- Use the official NeoForge development environment and Gradle.
- Use Minecraft 1.21.1-compatible APIs, mappings, registries, networking, and data components.
- Produce a complete, compilable Java mod project.
- Prefer NeoForge events and supported APIs.
- Use Mixins only where necessary.
- Avoid unnecessary third-party dependencies.
- Ensure compatibility with dedicated servers and singleplayer.
- Never execute client-only code on a dedicated server.
Do not merely modify the Minecraft version number in the original JAR. Properly port or reconstruct the implementation.
## 2. Core Drop Multiplication System
Every item drop produced by a player breaking a block or killing a mob must be multiplied according to that player's selected XP-based multiplier.
Examples:
- XP level 1 β Γ1 drops
- XP level 5 β Γ5 drops
- XP level 10 β Γ10 drops
- XP level 30 β Γ30 drops
- XP level 64 β Γ64 drops
The player may manually select a lower multiplier between 1 and their current XP level.
Preserve the original drop results before multiplication, including loot table outcomes, enchantment effects, and modded loot.
**Do not multiply experience orbs.**
Avoid multiplying the same drop more than once.
Do not multiply unrelated item entities or drops that were not caused by an eligible player action.
## 3. New Level 0 Protection
This is an essential improvement.
The original XP-based behavior must be modified to prevent new players from becoming unable to collect resources.
Implement the following rule:
`maximumMultiplier = max(1, player.experienceLevel)`
At XP level 0, the player must automatically have a multiplier of Γ1.
Examples:
- Level 0 β Γ1
- Level 1 β Γ1
- Level 2 β Γ2
- Level 10 β Γ10
This protection must work immediately when creating a new world.
Players must still be able to deliberately disable drops by selecting Γ0 through the configuration screen.
Automatic level changes must never set the multiplier to Γ0.
If a player loses XP levels, clamp their selected multiplier to the new allowed maximum.
## 4. Containers and NBT Preservation
Breaking a chest, barrel, or other supported container must multiply:
1. The block's own item drops.
2. Every item stored inside the container.
Example:
A chest contains:
- 5 diamonds
- 1 enchanted sword
- 10 iron ingots
The player breaks it at multiplier Γ10.
Expected results:
- 50 diamonds
- 10 identical enchanted swords
- 100 iron ingots
- 10 chest items, assuming the original block drop is one chest
Every copy of the enchanted sword must preserve its enchantments, durability, custom name, lore, and all other data components.
For Minecraft 1.21.1, correctly preserve the modern item data component system rather than relying on outdated item NBT assumptions.
Avoid accidental duplication caused by processing container contents more than once.
Support modded containers where technically possible, without destroying their custom inventories or data.
## 5. Disable Drops Mode
Keep the original Disable Drops functionality.
The configuration screen must contain a button labeled:
**Disable Drops**
When activated:
- Set the effective multiplier to Γ0.
- Suppress eligible item drops completely.
- Do not suppress XP orbs.
- Preserve the player's selection across sessions.
- Display Γ0 on the HUD.
- Allow the player to re-enable drops.
When drops are re-enabled, restore a valid multiplier between 1 and the player's current allowed maximum.
This behavior must also work at XP level 0.
## 6. Configuration Screen and Keybind
Preserve the original default keybind:
**M**
The key must be rebindable through Minecraft's Controls menu.
Pressing M opens the Leveled Drops configuration screen.
The main screen must include:
- Current XP level.
- Current selected multiplier.
- Slider from Γ1 to the maximum allowed multiplier.
- Disable Drops button.
- Enable Drops button when drops are disabled.
- HUD settings.
- Advanced settings.
The screen must work correctly at level 0, where the slider has a valid Γ1 setting.
The interface should be intuitive and consistent with Minecraft's visual style.
## 7. Improved HUD
Display the current multiplier continuously as:
**ΓN**
Examples: Γ0, Γ1, Γ10, Γ64.
Add configurable options for:
- Top-left position.
- Top-right position.
- Bottom-left position.
- Bottom-right position.
- HUD scale.
- Background transparency.
- HUD visibility.
Default settings should resemble the original mod.
The HUD must update correctly when the player's multiplier or XP level changes.
Avoid unnecessary per-frame calculations.
## 8. Enchantment Level Cap: 64
Preserve the original enchantment overhaul.
All multi-level enchantments must support levels up to 64.
Examples include:
- Sharpness
- Protection
- Efficiency
- Unbreaking
- Fortune
- Looting
- Other applicable multi-level enchantments
Single-level enchantments must remain single-level.
Preserve normal enchantment compatibility rules unless the original mod explicitly changes them.
Players must be able to combine enchantments normally through anvils.
Examples:
- Sharpness V + Sharpness V β Sharpness VI
- Sharpness VI + Sharpness VI β Sharpness VII
Continue this progression up to level 64.
The `/enchant` command must respect the expanded maximum level.
Ensure that Minecraft 1.21.1's data-driven enchantment system is handled correctly.
Do not simply modify tooltips while leaving the actual enchantment functionality capped at vanilla levels.
## 9. Anvil Overhaul
Remove the vanilla "Too Expensive!" restriction.
Anvil operations must not be rejected because of accumulated prior-work penalties or the vanilla cost ceiling.
Preserve the original concept that anvil costs depend on enchantment rarity rather than accumulated repair penalties.
Maintain valid survival-mode XP costs and normal enchantment compatibility behavior.
Do not introduce free enchanting unless it is explicitly required by the original implementation.
Test enchanted books, enchanted equipment, repairs, and renaming.
## 10. Roman Numeral Display
Enchantment levels above 10 must use Roman numerals followed by their Arabic value.
Examples:
- Level 11 β XI (11)
- Level 20 β XX (20)
- Level 30 β XXX (30)
- Level 40 β XL (40)
- Level 50 β L (50)
- Level 64 β LXIV (64)
Levels 1 through 10 should retain their normal Roman numeral display.
The display must be consistent across enchanted books, equipment, and relevant tooltips.
## 11. Performance Improvements
Optimize drop multiplication for high XP levels and large farms.
Requirements:
- Avoid unnecessary allocations.
- Avoid redundant calculations.
- Avoid repeated loot processing.
- Respect each item's maximum stack size.
- Preserve data components on every copy.
- Prevent integer overflow.
- Prevent accidental loss of items.
- Avoid excessive network traffic.
- Never silently cap the multiplier or delete valid drops.
The optimized implementation must produce the same gameplay results as the intended original behavior.
## 12. Multiplayer Support
The server must be authoritative.
Each player must have an independent selected multiplier and disabled-drops state.
Requirements:
- Save player settings persistently.
- Synchronize multiplier changes to the client.
- Validate client requests on the server.
- Clamp invalid multiplier values.
- Handle login, logout, death, respawn, and dimension changes.
- Avoid duplicating drops when multiple players interact with the same entity.
- Prevent client-side manipulation of drop quantities.
The server must determine actual drop quantities.
## 13. Advanced Configuration
Add optional configuration settings for:
- Block drop multiplication.
- Mob drop multiplication.
- Container content multiplication.
- Block exclusions.
- Entity exclusions.
- Item exclusions.
- HUD appearance.
- Compatibility options.
**All gameplay options must default to the original behavior.**
NBT and data component preservation must always remain enabled and must never be optional.
Do not introduce new progression systems, currencies, artificial XP rewards, special equipment, or unrelated gameplay mechanics.
## 14. Compatibility
Use NeoForge-compatible event hooks where possible.
Respect:
- Vanilla loot tables.
- Modded loot tables.
- Fortune and Looting.
- Silk Touch.
- Enchanted equipment.
- Custom item data components.
- Modded blocks and entities.
- Container inventories.
- Dedicated server execution.
If an interaction cannot be handled safely, explain the limitation rather than implementing an unsafe duplication mechanism.
## 15. Testing and Acceptance Criteria
Create tests or clearly documented manual verification steps covering:
1. A new player at level 0 can obtain normal drops.
2. Level 10 produces exactly ten times eligible item drops.
3. Manually selecting Γ3 at level 10 produces Γ3 drops.
4. Disable Drops suppresses eligible items but not XP.
5. Breaking a chest multiplies its contents and block drop exactly once.
6. Enchanted items retain identical data components.
7. Multiplier selection persists after restarting the game.
8. Losing XP levels clamps the multiplier correctly.
9. Two multiplayer players maintain independent multipliers.
10. Multi-level enchantments can reach level 64.
11. Single-level enchantments retain their original maximum.
12. The `/enchant` command accepts valid expanded levels.
13. Anvil combinations are not blocked by "Too Expensive!".
14. Roman numeral tooltips display correctly.
15. The mod loads on a dedicated NeoForge 1.21.1 server.
## 16. Required Deliverables
Provide:
- Complete Java source code.
- Complete Gradle project.
- NeoForge mod metadata.
- Required resources and Mixins.
- Default configuration files.
- Localization files.
- Build instructions.
- A compiled Minecraft 1.21.1 NeoForge JAR, if the environment supports compilation.
- A list of implemented features.
- A list of unresolved limitations.
- Testing results, clearly distinguishing actual tests from unverified assumptions.
Do not claim that a feature works unless it has been implemented and tested.
## 17. Implementation Order
Build the mod incrementally in this order:
**Phase 1:** NeoForge project setup and successful compilation.
**Phase 2:** XP-based drop multiplication and level 0 protection.
**Phase 3:** Container multiplication and data component preservation.
**Phase 4:** Persistent settings, keybind, GUI, and HUD.
**Phase 5:** Multiplayer synchronization.
**Phase 6:** Enchantment level cap, anvil overhaul, and Roman numeral display.
**Phase 7:** Performance, compatibility, advanced settings, and testing.
At the end of each phase, verify that the project still compiles.
If the environment supports project files, modify the actual project rather than providing disconnected code snippets.
**Final instruction:** Prioritize correctness and preservation of the original Leveled Drops gameplay over adding new features. The finished mod must feel like a polished, faithful Minecraft 1.21.1 version of Leveled Drops 1.0.1.