yunfalib 图标

yunfalib

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.1.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/yunfalib
资源信息

Minecraft 版本: 1.20.1

平台: fabric

标签: library

资源介绍

yunfaLib

A library for Minecraft using the Fabric API that adds config, math, events, modules, and more.

Setup

build.gradle
repositories {
    maven { url "https://jitpack.io" }
}

dependencies {
    modImplementation "com.github.yunfachi:yunfaLib:${project.yunfalib_version}"
}
gradle.properties
yunfalib_version=0.1.0

Features

Config

Example Java: The values are stored in the inner class ```java import moe.yunfachi.yunfalib.config.Config; import java.io.File; public class Example { private static class ConfigKeys { String truth = "this value is immediately saved to a file"; } public Example() { final Config config = new Config( new File("./modid/config.yml"), new ConfigKeys() ); config.get().truth = "this value will be written after config.save()"; config.save(); } } ``` Example Java: The values are stored in the nested class ```java import moe.yunfachi.yunfalib.config.Config; import java.io.File; public class Example { public Example() { final Config config = new Config( new File("./modid/config.yml"), new ConfigKeys() ); config.get().truth = "this value will be written after config.save()"; config.save(); } } class ConfigKeys { String truth = "this value is immediately saved to a file"; } ```


Example Kotlin: The values are stored in the inner class ```kotlin import moe.yunfachi.yunfalib.config.Config import java.io.File class Example { init { class ConfigKeys { var truth = "this value is immediately saved to a file" } val config = Config( File("./modid/config.yml"), ConfigKeys() ) config.get().truth = "this value will be written after config.save()" config.save() } } ``` Example Kotlin: The values are stored in an anonymous object ```kotlin import moe.yunfachi.yunfalib.config.Config import java.io.File class Example { init { val config = Config( File("./modid/config.yml"), object { var truth: String = "this value is immediately saved to a file" } ) config.get().truth = "this value will be written after config.save()" config.save() } } ```

Thanks

Project Author Description
Annotaml WiIIiam278 library for generating YAML files

Stats

Alt

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

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
VisualizeGate

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

查看详情
Minecart+

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

查看详情
macOS Metal

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

查看详情
Gilded Netherite

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

查看详情