ModsJava
TrimReroller
Configurable armor trim rerolls with a crafting recipe, polished GUI, and cinematic animation.
⬇ Download on SpigotTrimReroller
TrimReroller adds a craftable, single-use item that rolls one vanilla armor trim smithing template. Rolls can use the inventory menu, the world animation, or both. Each mode has its own sounds and reveal effects.
Requirements
TrimReroller compiles against the Paper 1.21.1 API so it does not depend on newer 1.21-only additions. It supports Paper and compatible Paper forks such as Purpur and Pufferfish. Spigot and Folia are not supported because the plugin uses Paper APIs and has not been tested under Folia's scheduler model.
Installation
Do not leave older TrimReroller JARs in the `plugins` directory when replacing a build.
Default Recipe
Players with `trimreroller.craft` can craft the item normally or with shift-click. Right-clicking it from either hand starts the roll. Exactly one reroller is consumed after all start checks pass; no armor trim input is required or consumed. The selected trim is delivered at the reveal. If the inventory is full, the exact reward is dropped at the player's location and owned by that player.
The item name, lore, menu titles, menu labels, icons, animation text, effects, recipe, odds, and sounds can all be changed in `config.yml`. Anvils cannot permanently replace the configured name on a legitimate reroller; its configured appearance is restored when the plugin refreshes it.
Interrupted rolls are stored in player persistent data. Quitting, dying, or a clean plugin shutdown leaves the selected reward owed to the player; it is delivered after the player rejoins or respawns.
Commands
Permissions
Configuration
`config.yml` controls the reroller material, name, lore, glint, recipe, discovery, rarity chances, GUI behavior, GUI labels and icons, trim-guide appearance, animation placement and text, colors, particle density/counts, and every sound cue. MiniMessage formatting is supported for configured text. The menu and world animation can be switched on or off separately. Rolls are instant only when both are off. Menu sounds use the `sounds.gui-*` entries; the world animation uses the main sound entries.
The only player-visible author credit is on the Nether Star in the `/trims` guide. Plugin metadata and the startup log retain normal author information.
The four rarity chances must be non-negative and add up to 100. Bad recipe, color, or number settings use the built-in defaults. Invalid YAML is rejected without replacing the last working settings.
`messages.yml` contains the prefix and chat messages.
Trim Groups and Odds
The four groups describe how difficult each template is to obtain in vanilla 1.21 loot data:
The fixed default output table is:
| Group | Combined chance | Trims in group | Chance per trim |
| -------- | --------------: | -------------: | --------------: |
| Common | 60% | 6 | 10% |
| Uncommon | 27% | 7 | 3.86% |
| Rare | 11% | 4 | 2.75% |
| Mythic | 2% | 1 | 2% |
No input trim changes these chances. The result is selected once before the animation starts, so visual candidates cannot change it.
Build
The finished plugin is written to `build/libs/TrimReroller-1.6.0.jar`.
Manual Test Checklist
Made by crown7367 on Discord.
In-game previews
Reroll Inventory GUI
Optional inventory-based reroll presentation with a scrolling carousel and selected-trim reveal.
Trim Rarity Guide
The /trims guide showing all supported templates and configurable rarity groups.
Default Crafting Recipe
The built-in reroller recipe. Shape and ingredients can be changed in config.yml.
Trim Reroller Item
The protected single-use reroller item with configurable name, lore, material, and glint.
World Reroll Animation
The configurable in-world trim reroll animation with particles, display entities, boss bar, and title reveal.

TrimReroller adds a craftable, single-use item that rolls one vanilla armor trim smithing template. Rolls can use the inventory menu, the world animation, or both. Each mode has its own sounds and reveal effects.
Requirements
- Paper 1.21 through 1.21.11
- Java 21
TrimReroller compiles against the Paper 1.21.1 API so it does not depend on newer 1.21-only additions. It supports Paper and compatible Paper forks such as Purpur and Pufferfish. Spigot and Folia are not supported because the plugin uses Paper APIs and has not been tested under Folia's scheduler model.
Installation
- Stop the Paper server.
- Copy `build/libs/TrimReroller-1.6.0.jar` into the server's `plugins` directory.
- Start the server and confirm that TrimReroller reports its discovered template count without errors.
- Adjust `plugins/TrimReroller/config.yml` and `messages.yml` if needed.
- Run `/trimreroller reload` after editing the files.
Do not leave older TrimReroller JARs in the `plugins` directory when replacing a build.
Default Recipe
Code (Text):
D A N
G E G
D P N
D = Diamond
A = Amethyst Shard
G = Gold Ingot
E = Echo Shard
P = Ender Pearl
N = Netherite Ingot
G E G
D P N
D = Diamond
A = Amethyst Shard
G = Gold Ingot
E = Echo Shard
P = Ender Pearl
N = Netherite Ingot
The item name, lore, menu titles, menu labels, icons, animation text, effects, recipe, odds, and sounds can all be changed in `config.yml`. Anvils cannot permanently replace the configured name on a legitimate reroller; its configured appearance is restored when the plugin refreshes it.
Interrupted rolls are stored in player persistent data. Quitting, dying, or a clean plugin shutdown leaves the selected reward owed to the player; it is delivered after the player rejoins or respawns.
Commands
- `/trims` opens the trim rarity and chance guide.
- `/trimreroller rarity` opens the same guide. `/trimreroller chances` is also accepted.
- `/trimreroller reload` reloads and validates both configuration files.
- `/trimreroller gui` toggles the reroll inventory GUI globally.
- `/trimreroller animation` toggles the following world animation globally.
- `/trimreroller give <player> [amount]` gives 1 to 640 legitimate rerollers.
- `/trr` is the command alias.
Permissions
- `trimreroller.use` — use a reroller; default `true`
- `trimreroller.craft` — craft and discover the recipe; default `true`
- `trimreroller.rarity` — open the trim rarity and chance guide; default `true`
- `trimreroller.give` — use the give command; default `op`
- `trimreroller.reload` — reload configuration; default `op`
- `trimreroller.toggle.gui` — toggle the reroll inventory GUI; default `op`
- `trimreroller.toggle.animation` — toggle the following world animation; default `op`
- `trimreroller.admin` — includes all command permissions; default `op`
Configuration
`config.yml` controls the reroller material, name, lore, glint, recipe, discovery, rarity chances, GUI behavior, GUI labels and icons, trim-guide appearance, animation placement and text, colors, particle density/counts, and every sound cue. MiniMessage formatting is supported for configured text. The menu and world animation can be switched on or off separately. Rolls are instant only when both are off. Menu sounds use the `sounds.gui-*` entries; the world animation uses the main sound entries.
The only player-visible author credit is on the Nether Star in the `/trims` guide. Plugin metadata and the startup log retain normal author information.
The four rarity chances must be non-negative and add up to 100. Bad recipe, color, or number settings use the built-in defaults. Invalid YAML is rejected without replacing the last working settings.
`messages.yml` contains the prefix and chat messages.
Trim Groups and Odds
The four groups describe how difficult each template is to obtain in vanilla 1.21 loot data:
- Common: Vex, Wild, Sentry, Flow, Tide, Coast
- Uncommon: Dune, Eye, Snout, Wayfinder, Raiser, Shaper, Host
- Rare: Rib, Spire, Bolt, Ward
- Mythic: Silence
The fixed default output table is:
| Group | Combined chance | Trims in group | Chance per trim |
| -------- | --------------: | -------------: | --------------: |
| Common | 60% | 6 | 10% |
| Uncommon | 27% | 7 | 3.86% |
| Rare | 11% | 4 | 2.75% |
| Mythic | 2% | 1 | 2% |
No input trim changes these chances. The result is selected once before the animation starts, so visual candidates cannot change it.
Build
Code (Text):
./gradlew clean test build
Manual Test Checklist
- Craft normally and with shift-click, then confirm the result retains its custom metadata.
- Change `item.name`, then try to rename a legitimate reroller in an anvil; confirm the configured title is restored.
- Confirm a renamed Echo Shard does nothing and a legitimate reroller still works after an anvil rename.
- Activate stacks of one and several from both hands against air, a block, and an entity with the opposite hand empty.
- Hold an unrelated item or armor trim in the opposite hand; confirm it is never required, changed, or consumed.
- Confirm the reroll menu opens, cycles cleanly, blocks clicks and drags, and reopens if it is closed early.
- Confirm the menu closes before the title appears and the selected template matches the delivered reward.
- Rapid-click and confirm exactly one reroller is consumed and one trim is owed.
- Test denied use and crafting permissions, the concurrent-roll cap, and animation-disabled mode.
- Test GUI-only and world-animation-only rolls, then disable both and confirm only that state is instant.
- Fill every inventory slot and confirm the owned reward drop appears without overwriting inventory.
- Quit, die, respawn, and restart the plugin before reveal; confirm the pending reward is recovered once.
- Change worlds and look straight up and down during the animation; confirm displays follow and clean up.
- Run `/trimreroller give`, reload valid settings, and reload malformed settings.
- Open `/trims`; confirm all group shares and per-template percentages match the configured fixed table.
- Open `/trimreroller rarity` and `/trimreroller chances`; confirm all 18 templates appear and all inventory clicks and drags are blocked.
- Inspect `/plugins` and the console for duplicate JARs, errors, lingering display entities, or boss bars.
Made by crown7367 on Discord.
In-game previews
Reroll Inventory GUI
Optional inventory-based reroll presentation with a scrolling carousel and selected-trim reveal.
Trim Rarity Guide
The /trims guide showing all supported templates and configurable rarity groups.
Default Crafting Recipe
The built-in reroller recipe. Shape and ingredients can be changed in config.yml.
Trim Reroller Item
The protected single-use reroller item with configurable name, lore, material, and glint.
World Reroll Animation
The configurable in-world trim reroll animation with particles, display entities, boss bar, and title reveal.
TrimReroller is a free Minecraft Java mod. Compatible with Minecraft 1.21. Downloaded 3 times (via Spigot). Download it and open it directly in the game.