Mod

Spawn Egg BYID Redirect

Quick rating

Spawn Egg BYID Redirect

No reviews yet

Needed for same Spawn Egg type compatibility

API/Library
Mod Loaders
Forge
Fabric
Quilt
Minecraft
1.21

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Required

About

Project Details

Type
Mod
License
All Rights Reserved
Latest Version
[Fabric 1.19.x - 1.21] SEBR v1.2
Authors
CurseForge
Modrinth

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

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. 

Mods which rely on this:

For Developers:

The following steps are irrelavent for Forge/NeoForge. Just use ForgeSpawnEggItem.

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.

Modpack Policy:

 You are free to include this mod in any Modpack hosted on CurseForge.

Server Hosting Discount

Follow the link below and use code "JACKBUSTERS" at checkout for 25% off server hosting.

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.

Rent a server discount


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.

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~3,000
Total Downloads
CurseForge
~1,000
Modrinth
~1,000
Last Updated
CurseForge
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.
Next pipeline sync