Skip to content

Repository files navigation

REI Server Sync

A standalone Paper 1.21.4 plugin that pushes the server's complete vanilla recipe set to Roughly Enough Items (REI) 18.x Fabric clients over REI's own sync_displays protocol — permanently replacing REI's incomplete and unstable client-side "Local Recipes" guessing.

On 1.21.2+ servers, clients no longer receive full recipe data, so REI has to guess vanilla recipes locally. In practice this guessing is incomplete (iron tools/armor and hundreds of other recipes randomly missing) and degrades further behind Velocity/BungeeCord proxies. This plugin makes the server authoritative: every REI client gets the exact recipe list the server can craft. No client-side companion mod is required — any player with REI 18.x benefits automatically.

How it works

  • Advertises REI's cheat channels so clients flip into "trust server sync" mode (canUsePackets() = true) and stop double-filling displays from the vanilla recipe book.
  • Encodes every RecipeManager recipe (shaped, shapeless, smelting, smoking, blasting, campfire, stonecutting, smithing) as REI display packets on roughlyenoughitems:sync_displays, using architectury's split-packet framing.
  • Re-sends on join (delayed), periodically, and after datapack reloads — this heals clients whose REI reloaded client-side (client reloads wipe synced displays).

Config (config.yml)

Key Default Meaning
enabled true Master switch; when false the plugin registers nothing.
join-delay-ticks 200 Delay after join before the first sync (lets REI's first reload settle).
resend-interval-seconds 300 Periodic full re-send; 0 disables.
cheat-packets-enabled true Reserved for future REI cheat-mode support.

Commands & permissions

  • /reiss stats — cache statistics (display count, message count).
  • /reiss rebuild — rebuild the recipe cache and re-send to everyone.
  • /reiss resend — re-send the cached sync to all eligible players.
  • /reiss probe — diagnostic: sends three minimal test displays (see the client's [REI Server Display Sync] log line).
  • Permissions: reiserversync.admin (commands, default op), reiserversync.cheat (reserved, default op).

Compatibility

  • Tested with REI 18.0.815 on Fabric 1.21.4 against Paper 1.21.4.
  • Works behind Velocity/BungeeCord proxies (each backend re-syncs on transfer).
  • Coexists with SlimefunServerEssentials
    • the Slime Meta Item (SMI) client mod: Slimefun recipes appear in their own categories, vanilla recipes stay complete.
  • The wire protocol is REI-internal, so a major REI protocol change may require a plugin update. Per-display decode failures degrade gracefully (that recipe type just goes missing).

Known gaps

  • Recipe auto-fill (the + button) is not yet supported — that requires implementing REI's move_items_new container protocol server-side; planned for v0.2.
  • REI cheat mode (clicking items to give) is not serviced; the channels are advertised only to enable the sync trust path.
  • Smithing trim recipes are not synced (cosmetic preview only); special crafting recipes (dyeing, fireworks, map extension) are intentionally skipped, same as the vanilla recipe book.

Building

JDK 21 + Gradle (paperweight-userdev): ./gradlew buildbuild/libs/ReiServerSync-<version>.jar.

Credits & license

MIT. Wire-format constants were derived by reading REI's MIT-licensed sources (© shedaniel) — thank you for keeping them open.

About

Paper plugin: authoritative vanilla recipe sync for REI 18.x clients (replaces REI's client-side recipe guessing)

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages