Fabric 26.2 – Permanent Effect Roulette SMP Mod
Complete Technical Implementation Specification
Create a fully functional multiplayer Fabric mod for Minecraft 26.2 implementing the complete Permanent Effect Roulette system described below.
This must be a working mod, not a conceptual example or partial implementation.
Use proper Fabric API registration, server-side gameplay logic, persistent player data, networking, item registration, recipes, resource definitions, and client-side GUI rendering.
IMPORTANT ARCHITECTURAL REQUIREMENT:
The custom effects must function like permanent player attributes that provide the gameplay benefits of Minecraft potion effects, rather than relying exclusively on vanilla potion-effect amplifiers.
The system must support genuine fractional progression in increments of 0.2. Vanilla potion amplifiers are integer-based, so simply assigning potion effects with fractional levels is not acceptable.
Build a custom effect-calculation system that applies the appropriate gameplay modifications to each player. Use Minecraft's attribute system, custom gameplay calculations, or other appropriate Fabric-compatible mechanisms.
The effects should behave like permanent potion effects from the player's perspective, but their actual power must be controlled by the mod's custom numerical progression system.
---
1. Permanent Effect Assignment
Every player must receive exactly one randomly assigned permanent effect the first time they join the server.
Available effects:
- Haste
- Hero of the Village
- Strength
- Speed
- Luck
- Regeneration
- Saturation
- Fire Resistance
- Dolphin's Grace
- Health Boost
Requirements:
- Randomly select one effect when a player first joins.
- Save the assigned effect permanently.
- Never randomly reroll a player's effect on ordinary login, death, or respawn.
- Preserve the player's effect and progression across server restarts.
- Ensure every player has their own independent effect and progression.
- The server must be authoritative over effect assignment and progression.
2. Effect Progression System
Each effect has its own custom numerical level.
Regular effects:
Haste, Strength, Speed, Luck, Regeneration, Saturation, Fire Resistance, and Dolphin's Grace.
Their progression must follow these exact rules:
| Custom level | Effective vanilla-equivalent level | |---:|---:| | -5 | No effect | | -4 | 0.2 | | -3 | 0.4 | | -2 | 0.6 | | -1 | 0.8 | | 0 | I (1.0) | | +1 | 1.2 | | +2 | 1.4 | | +3 | 1.6 | | +4 | 1.8 | | +5 | II (2.0) |
Rules:
- Every kill increases the killer's custom level by exactly 1.
- Every death decreases the victim's custom level by exactly 1.
- Minimum: -5.
- Maximum: +5.
- One custom level represents a 0.2 change in vanilla-equivalent effect strength.
- At custom level -5, the effect provides absolutely no benefit.
- At custom level 0, the effect behaves like vanilla level I.
- At custom level +5, the effect behaves like vanilla level II.
CRITICAL FRACTIONAL IMPLEMENTATION:
Do not round fractional levels to integer potion amplifiers.
For example, Strength at custom level +2 must provide 1.4 times the level-I bonus, not vanilla Strength I or II.
Calculate each effect's actual gameplay contribution using its own appropriate scaling formula.
For effects that cannot naturally scale fractionally through vanilla Minecraft mechanics, implement equivalent custom attribute modifications or gameplay calculations.
The system should support fractional values accurately wherever the underlying mechanic permits it.
3. Special Effect: Hero of the Village
Hero of the Village uses a different progression system.
- Starting level: Custom 0 = Vanilla Hero I.
- Every kill increases the level by one full vanilla level.
- Every death decreases the level by one full vanilla level.
- Minimum: Custom 0 = Hero I.
- Maximum: Custom 7 = Hero VIII.
Hero must never become weaker than level I or stronger than level VIII.
Do not apply the regular 0.2 progression system to Hero.
4. Special Effect: Health Boost
Health Boost also has its own progression system.
Starting state:
- Custom level: 0.
- Maximum health: 12 hearts.
Progression:
- Every kill adds one custom level and one additional heart.
- Every death removes one custom level and one heart.
- Maximum: Custom +3 = 15 hearts.
- Minimum: Custom -4 = 8 hearts.
Use the formula:
Maximum hearts = 12 + custom level.
This means:
| Custom level | Maximum health | |---:|---:| | -4 | 8 hearts | | -3 | 9 hearts | | -2 | 10 hearts | | -1 | 11 hearts | | 0 | 12 hearts | | +1 | 13 hearts | | +2 | 14 hearts | | +3 | 15 hearts |
Implement actual maximum player health, not just visual heart changes.
Ensure odd heart counts display correctly and that current health is handled safely when maximum health changes.
Health Boost must not use vanilla Health Boost amplifiers as a substitute for the custom progression system.
5. Kill and Death Progression
When one player kills another player:
- Identify the killer.
- Identify the victim.
- Increase the killer's effect level by one, subject to their effect's maximum.
- Decrease the victim's effect level by one, subject to their effect's minimum.
- Save both updated levels.
- Synchronize both players' updated information with their clients.
- Privately message each affected player.
Example messages:
Killer: "You killed a player! Your Strength level increased to +2."
Victim: "You died! Your Speed level decreased to -1."
Messages must use the player's actual assigned effect and updated custom level.
Important:
- Environmental deaths must not grant kill progression.
- Killing non-player entities must not trigger player kill progression.
- A kill at maximum level must not increase progression beyond the cap.
- A death at minimum level must not decrease progression beyond the cap.
- Prevent duplicate progression from a single death event.
6. Permanent HUD GUI
Implement a custom client-side HUD element positioned directly above the player's hotbar.
This GUI must ALWAYS display:
- Assigned effect name.
- Current custom effect level.
Examples:
"Strength +2" "Speed -1" "Hero of the Village IV" "Health Boost +3"
Visual requirements:
- Use the effect's recognizable potion color.
- Use clean, readable text.
- Keep the GUI centered horizontally above the hotbar.
- Avoid overlapping hearts, armor, experience, or other important HUD elements.
- Update immediately whenever the effect or level changes.
- Remain visible after death, respawn, login, and server synchronization.
The GUI must be implemented using actual client-side HUD rendering code.
Do not use chat messages as a substitute for the HUD.
Do not assume that server-side code can directly render client GUI elements.
Ensure the server correctly synchronizes effect information to the client.
7. First-Join Roulette Animation
When a player joins for the first time:
- Display a roulette animation cycling through the names of all ten available effects.
- Make the animation visually resemble an actual roulette selection.
- Gradually slow the animation before it stops.
- End on the player's permanently assigned effect.
- Clearly announce the winning effect.
- Synchronize the final selection with the HUD.
The roulette animation must ONLY occur on a player's first-ever assignment.
It must not replay on ordinary login, death, or respawn.
The assigned effect must be determined and saved by the server, not independently randomized by the client.
8. Reroll Potion
Create a custom drinkable item called Reroll Potion.
Appearance:
- Preserve the original vanilla potion bottle texture.
- Apply rainbow styling through appropriate item tinting or visual rendering.
- Give it a custom display name.
Crafting recipe:
A nether star in the center surrounded by eight Ominous Trial Keys.
Requirements:
- The potion must be drinkable.
- Consuming it randomly assigns the player a DIFFERENT effect from their current effect.
- The new effect must never be identical to the player's existing effect.
- Broadcast the player's name and newly assigned effect to the entire server.
- Display the new effect name using its corresponding effect color.
- Update the HUD immediately.
- Save the new effect permanently.
Progression rules after reroll:
- If the new effect is Health Boost, reset its custom level to 0.
- If the new effect is Hero of the Village, reset its custom level to 0.
- For all other effects, preserve the player's existing custom level, clamped between -5 and +5.
Prevent item duplication or multiple activations from one consumption.
9. Potion Shard
Create a custom item called Potion Shard.
Appearance:
- Use the vanilla Amethyst Shard texture as the base.
- Apply rainbow styling without replacing the recognizable vanilla appearance.
- Give it a custom name.
- Maximum stack size: 64.
- It must not have a crafting recipe.
Acquisition:
When a player kills another player while already at the maximum level for their assigned effect, the victim drops one Potion Shard.
Important conditions:
- The killer must already be at their maximum effect level when the kill occurs.
- The victim must NOT have been at their minimum effect level immediately before dying.
- If the victim was already at minimum level before death, no shard drops.
- The victim's normal death progression still occurs.
- Never generate multiple shards from the same death.
Consumption:
- Right-clicking with a Potion Shard consumes exactly one shard.
- Increase the player's custom effect level by exactly one.
- Only allow consumption when the player is below their effect's maximum level.
- Do not consume the shard if the player is already at maximum level.
- Apply the same special progression rules and caps for Hero and Health Boost.
- Update the HUD and persist the new level.
10. Shard Withdrawal Command
Implement:
/withdraw shard <number>
Requirements:
- Available to all players, including non-operators.
- Validate that the requested amount is a positive integer.
- Reject insufficient balances with this exact message:
"You don't have enough shards for that!"
IMPORTANT: There is no separate shard balance in this specification.
Therefore, implement withdrawal as a controlled conversion of existing effect progression into physical Potion Shards.
Use this rule:
- One withdrawable shard represents one custom effect level above the player's starting level.
- Regular effects: one shard per positive custom level.
- Hero of the Village: one shard per level above Hero I.
- Health Boost: one shard per heart above its starting 12 hearts.
- Do not allow withdrawal to reduce a player below their starting level.
- Do not allow withdrawals to create shards from negative progression.
- Remove the corresponding progression levels when withdrawing.
- Recalculate the player's actual effect immediately.
- Ensure the player's inventory has enough space before processing the withdrawal.
- Never permit unlimited shard creation through repeated commands.
Example:
A player with Strength +3 can withdraw up to 3 shards.
After withdrawing 2 shards, their Strength becomes +1.
A player with Speed -2 cannot withdraw any shards.
The command must accurately report invalid amounts, insufficient withdrawable levels, and inventory-space problems.
11. Effect Essence
Create a custom item called Effect Essence.
Appearance:
- Use vanilla Gunpowder as the base texture.
- Apply rainbow styling.
- Give it a unique custom name.
Crafting recipe:
- Center: Enchanted Golden Apple.
- Four corners: Netherite Ingots.
- Remaining four slots: Diamond Blocks.
Consumption:
- Right-clicking consumes one Effect Essence.
- Increase the player's custom effect level by exactly one.
- This item can ONLY be used when the player's custom level is below 0.
- It must never increase the player's level above 0.
- It must not work when the player is already at 0 or higher.
- Apply the correct progression rules for the assigned effect.
- Update the HUD and save the new level.
For example:
Strength -3 becomes Strength -2.
Speed -1 becomes Speed 0.
Strength +1 cannot be increased using Effect Essence.
12. Persistence and Multiplayer Networking
All gameplay data must be server-authoritative.
Persist the following information for every player:
- UUID.
- Assigned permanent effect.
- Custom effect level.
- Any additional progression information required by the system.
Requirements:
- Survive server restarts.
- Survive player logouts and logins.
- Survive death and respawn.
- Synchronize updates to the correct client.
- Prevent clients from modifying their own assigned effects or progression.
- Ensure multiplayer players cannot overwrite one another's data.
- Handle disconnects and reconnects safely.
13. Technical and Compatibility Requirements
Target:
- Minecraft 26.2.
- Fabric Loader.
- Fabric API.
- Java version appropriate for Minecraft 26.2.
Implementation requirements:
- Proper mod metadata.
- Proper item and effect registration.
- Proper crafting recipe JSON.
- Proper item models and resource definitions.
- Correct client/server initialization separation.
- Correct networking implementation.
- Custom HUD rendering.
- Persistent server-side player data.
- Appropriate attribute and gameplay calculations.
- Correct multiplayer event handling.
The mod must work on a dedicated multiplayer server.
The server and clients must have compatible versions installed.
Do not rely on commands or command blocks to implement the gameplay systems.
Do not replace existing vanilla textures unnecessarily.
14. Final Implementation Rules
- Implement every feature described above.
- Do not silently omit difficult mechanics.
- Do not substitute integer potion amplifiers for fractional effect scaling.
- Do not use fake HUD elements or chat messages instead of actual rendering.
- Do not allow unauthorized client-side progression changes.
- Do not create exploitable shard duplication mechanics.
- Preserve all progression and assignments across restarts.
- Keep all gameplay systems compatible with one another.
- Provide clear explanations of any Minecraft engine limitations.
- If a mechanic cannot be implemented exactly, explain why and implement the closest faithful alternative.
Deliverable:
Provide the complete working Fabric 26.2 mod source code and all required resources, organized into a buildable project.
Include the Gradle configuration and all required dependencies.
Ensure the project can be compiled into a working .jar for the server and compatible clients.
Do not provide tests or test files. Focus exclusively on implementing the requested features.
I’ve created the Fabric 26.2 project and started implementing the roulette system, items, persistence, networking, and client HUD.
Set up the Fabric project and persistent server-side effect state.
Implement gameplay, death handling, items, recipes, and withdrawal.
Add client synchronization, HUD, roulette animation, and limitation notes.The server persistence lookup exposed a 26.2 constraint: custom saved data must supply a data-fixer type when loading. I’m using a vanilla saved-data type with isolated custom fields for the initial assignment store.Created the Fabric project scaffold and a persistent, random first-join assignment store.
The mod is not complete or playable yet. Effects, levels, death handling, items, recipes, commands, networking, HUD, roulette animation, and documentation are still missing. The build has not been verified.
The initial project scaffold compiles, but the mod isn’t playable yet. I’ve started the remaining gameplay, networking, items, and HUD implementation.
Implement persistent levels and server-side death progression.
Add fractional gameplay and effect handling.
Add items, recipes, and withdrawal.
Add client sync, HUD, and first-join roulette.
Document limitations and any remaining gaps.Added persistent custom levels, capped death progression, fractional attribute and regeneration calculations, and partial effect handling.
LIMITATIONS.mddocuments the binary mechanics and current approximations.
The mod is still incomplete: items, recipes, shard drops, rerolls, withdrawal, networking, HUD, and the first-join animation remain unimplemented. The changes have not been build-verified.
The latest changes compile, but major features are still missing. I’ve started another implementation pass focused on the items, withdrawal command, networking, HUD, and roulette animation.
…Implemented the items and recipes, shard drops, /withdraw shard, server-to-client state sync, HUD, and first-assignment roulette. The changes have not been build-verified.
Reroll Potion: craft with a nether star surrounded by eight ominous trial keys.
Effect Essence: craft with an enchanted golden apple in the center, netherite ingots in the corners, and diamond blocks on the edges.
Potion Shard: withdraw levels above zero, or obtain one from a qualifying PvP death.
Remaining limitations include the missing rainbow item tint, a single-color reroll announcement, and HUD placement that may overlap other overlays. LIMITATIONS.md also documents the binary and approximate effect mechanics.
The mod now compiles with the items, recipes, networking, HUD, and roulette added. I’ve started a final pass on the remaining visual gaps and gameplay correctness.
…ion; fix substantive defects. 2. Add rainbow item tint and effect-colored broadcasts. 3. Improve HUD placement and fractional swimming. 4. Update the limitations to match the implementation.The withdrawal balance check already prevents spending below zero; I found the inventory-space calculation should use the actual stack limit. The first-join packet is sent at Fabric’s packet-ready event, and respawn already resynchronizes state.- Added an animated rainbow potion tint and effect-colored reroll announcements.
Moved the HUD away from the vanilla health, armor, food, and XP bars.
Replaced binary Dolphin’s Grace with a synchronized fractional swimming benefit.
Audited persistence, join and respawn sync, death progression, and item use; tightened withdrawal’s inventory-capacity handling.
Updated LIMITATIONS.md. Swimming uses water-movement efficiency rather than vanilla Dolphin’s Grace, and the HUD may still overlap other overlays. The changes have not been build-verified.
The project compiles successfully. I’ve started one last fix to add the requested rainbow styling to the shard and essence items.
No files in this session