Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_Vmp7XVi7.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
Spawn Egg BYID Redirect - 墨喵 Minecraft 资源
Spawn Egg BYID Redirect 图标

Spawn Egg BYID Redirect

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.2
本资源为搬运资源,原资源地址: https://modrinth.com/mod/spawn-egg-byid-redirect
资源信息

Minecraft 版本: 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.21

平台: fabric quilt

标签: library mobs

资源介绍

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)); } ```

下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
Spawner Blocker

价格:0 墨喵币
下载量:0

查看详情
PM Kingdoms

价格:0 墨喵币
下载量:0

查看详情
Old Golden Apple

价格:0 墨喵币
下载量:0

查看详情
Wynn Tiny Dernic Crops

价格:0 墨喵币
下载量:0

查看详情