
Spawn Egg BYID Redirect
Needed for same Spawn Egg type compatibility
About this Mod
For users:
Some mods may rely on things this mod does in the background to function properly. Just install it alongside any mod that requires it on both client and server.
Use Case: If a mod you have installed adds multiple spawn eggs for the same type of mob (i.e. for different variants), and one of the spawn eggs lost its color as a result, this mod may fix the color.
Follow the link below and use code "JACKBUSTERS" at checkout for 25% off server hosting.
For Developers:
This mod makes BY_ID#put() inside of the SpawnEggItem constructor call BY_ID#putIfAbsent() instead. While this change may seem minor, it makes a big difference when you want to have multiple spawn eggs with the same entity type (For instance, if you want spawn eggs which spawn variants).
A short tutorial on how to go about using this mod when adding something like a variant spawn egg:
1) Create a new class extending SpawnEggItem (Mojang Official Mappings, extend whatever this is converted to the mappings of your choice).
2) Create a public static ArrayList of type SpawnEggItem inside the class you created like so:
public static final ArrayList<SpawnEggItem> EGGS = new ArrayList<>();
3) In your constructor, add the current instance to the ArrayList you created like so:
super(entityType, i, j, properties);
[...]
EGGS.add(this);
4) Inside your ClientModInitializer, register the colors to your spawn eggs like so:
@Override
public void onInitializeClient() {
WolfVariantEgg.EGGS.forEach((egg) ->
ColorProviderRegistry.ITEM.register((stack, tintIndex)
-> egg.getColor(tintIndex), egg));
}
5) If you run the mod now you'll notice that your general spawn egg, not specified to a variant, will have lost its color. That's what this mod fixes without any extra work on your part so long as you didn't do anything to the BY_ID map.
Most other work will probably be done by overriding the useOn method of SpawnEggItem. I won't be walking you through that one since it doesn't really pertain to this mod, but let me know if you run into any issues and I may try to help.
Available Versions
How to Install Spawn Egg BYID Redirect on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21).
Install Mod
Open the mod browser in the dashboard and search for "Spawn Egg BYID Redirect". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.21, 1.20.6, 1.20.5 (+28 more)
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Spawn Egg BYID Redirect server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21). You can switch loaders with one click in the panel.
Is Spawn Egg BYID Redirect compatible with fabric and forge and quilt?
Spawn Egg BYID Redirect officially supports fabric, forge, quilt for Minecraft 1.21, 1.20.6, 1.20.5. Note: Forge and Fabric mods are NOT cross-compatible – pick one loader and stick with it. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Spawn Egg BYID Redirect – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Spawn Egg BYID Redirect consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install Spawn Egg BYID Redirect with just one click on your server.