Registry Helper Lib 图标

Registry Helper Lib

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.3+1.20.1
本资源为搬运资源,原资源地址: https://modrinth.com/mod/registry-helper-lib
资源信息

Minecraft 版本: 1.20.1 1.20.2 1.20.3 1.20.4

平台: fabric

标签: library management utility

资源介绍

RegistryHelperLib

Are you tired of writing a lot of code to register all the things of minecraft?
With this little library, you will be able to register in an easier way.

Installation

Add the Modrinth's Maven Repository in build.gradle:

    repositories {
        maven {
            name = 'Modrinth'
            url = 'https://api.modrinth.com/maven'
            content {
            includeGroup 'maven.modrinth'
        }
    }
    }

Then add the mod implementation, still in build.gradle:

    dependencies{
        //other dependencies
        modImplementation("maven.modrinth:registry-helper-lib:${project.registry_helper_version}")
    }

Then add the version variable in gradle.properties. Replace the version below by the version of the lib you want:

    registry_helper_version= <version>

How to use it?

Create an instance of the RegistryHelper class. This instance will allow you to register for a registry type.

    public class ModItems {
        private static final RegistryHelper<Item> registryHelper=new RegistryHelper<>(Registries.ITEM,ExampleMod.MOD_ID);
        public static final Item EXAMPLE_ITEM= registryHelper.register("name",new Item(new Item.Settings()));

        public static void init(){

        }
    }
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
FPS Boost:Optimized

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

查看详情
Craftable Nametags

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

查看详情
EnchantWithMob

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

查看详情
Days Tracker

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

查看详情