Spawn Egg BYID Redirect

Spawn Egg BYID Redirect

Needed for same Spawn Egg type compatibility

by
1.8K Downloads
fabricforgequiltlibrarymobs
Rent Server with this Mod

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

Spawn Egg BYID Redirect 1.2release
MC 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21fabric, quilt
July 19, 2024
Spawn Egg BYID Redirect 1.1release
MC 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6fabric, quilt
May 21, 2024
Spawn Egg BYID Redirect 1.1release
MC 1.15, 1.15.1, 1.15.2, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.17, 1.17.1, 1.18, 1.18.1, 1.18.2fabric, quilt
May 21, 2024
Spawn Egg BYID Redirect 1.0release
MC 1.20.6forge
May 12, 2024
Spawn Egg BYID Redirect 1.0release
MC 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 24w10a, 24w11a, 24w12a, 24w14potato, 1.20.5, 1.20.6fabric, quilt
March 11, 2024

How to Install Spawn Egg BYID Redirect on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21).

3

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

fabricforgequilt

Minecraft Versions

1.21, 1.20.6, 1.20.5 (+28 more)

Server-side

Required

Recommended 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.

Rent Modded Server

Install Spawn Egg BYID Redirect with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
LicenseRef-All-Rights-Reserved
Server-side
Required

Supported Versions

1.211.20.61.20.524w14potato24w12a24w11a24w10a1.20.41.20.31.20.2+21 more