Spawn Egg BYID Redirect

⭐ — (2 endorsements) 📥 1,871 downloads 📌 v1.2 📅 3/12/2024
⚪ Last updated 2024

By Jackbusters · fabric

⬇ Download Mod Source: Modrinth ↗ 📅 Updated: 7/19/2024 📅 Created: 3/12/2024
⚠️ Install Order · 2 steps
1🛠️ Forge — Minecraft Forge (mod loader) Download ↗
2🛠️ Fabric — Fabric Loader Download ↗

Install in this order, then this mod last — most mods fail to load without their framework and dependencies in place.

🔍 Analysis

  • 👍 0.1% endorsement rate
  • 🏆 #373 of 874 fabric mods in this game by downloads

📋 About This Mod

**For users:** <p>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.</p> <br> <p>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.</p> **Follow the link below and use code "JACKBUSTERS" at checkout for 25% off server hosting.** (https://www.bisecthosting.com/partners/custom-banners/ba99da02-fd57-4ccc-89a5-9a5bba0922d2.webp)](https://bisecthosting.com/jackbusters?r=BYID+Redirect+Modrinth) <br> **For Developers:** <p>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).</p> <br> <p>A short tutorial on how to go about using this mod when adding something like a variant spawn egg:</p> <p>1) Create a new class extending SpawnEggItem (Mojang Official Mappings, extend whatever this is converted to the mappings of your choice).</p> <p>2) Create a public static ArrayList of type SpawnEggItem inside the class you created like so:</p> ``` public static final ArrayList<SpawnEggItem> EGGS = new ArrayList<>(); ``` <p>3) In your constructor, add the current instance to the ArrayList you created like so:</p> ``` super(entityType, i, j, properties); EGGS.add(this); ``` <p>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)); } ``` <br> <p>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.

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.

[!(https://www.bisecthosting.com/partners/custom-banners/ba99da02-fd57-4ccc-89a5-9a5bba0922d2.webp)](https://bisecthosting.com/jackbusters?r=BYID+Redirect+Modrinth)

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

🤖 AI-enhanced — based on mod data

📊 Mod Details

Game
Minecraft Mods
Author
Jackbusters
Version
1.2
Downloads
1,871
Endorsements
2
Category
fabric
Created
3/12/2024
Updated
7/19/2024
Game Versions
1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4
Tags
library, mobs

🔧 How to Install Minecraft Mods Mods

Download from Modrinth. Use Prism Launcher or drop into your mods folder.

📖 Full step-by-step install guide for Minecraft Mods →

Visit the official mod page for specific installation instructions for this mod.

🎮 Need cheat codes or console commands? Check ur gaming wiki for Minecraft Mods commands, item IDs, and more.

❓ Frequently Asked Questions

Which Minecraft Mods versions does Spawn Egg BYID Redirect support?

The author lists 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20. Other versions may work but are untested by the author.

What is the latest version of Spawn Egg BYID Redirect?

Version 1.2, published 2024-07-19 with 1,871 downloads recorded at the source.

Keep browsing — more Minecraft Mods mods await

📋 All Minecraft Mods Mods 🏆 Top 25 📂 More fabric 👤 More by Jackbusters 🔎 Similar Mods 🌐 Best fabric (All Games) 🔀 Check Compatibility ⚖️ Compare Mods 🆕 New Mods