跳到正文

Kinecraft

作者:settingdust

Kotlin serialization for Minecraft classes

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Kinecraft

https://github.com/SettingDust/Kinecraft
It’s a lib for Kotlin in Minecraft world.
(De)Serializing minecraft tag(NBT), chat component, ByteBuf with any serializable objects.
And with

  • tag serializers you can describe tags with the correct type instead of string. So that it will encode/decode with the format you are using as “real” type of the tag.

Usage

repositories {
    exclusiveContent {
        forRepository {
            maven("https://api.modrinth.com/maven") {
                name = "Modrinth"
            }
        }
        filter {
            includeGroup("maven.modrinth")
        }
    }
}

dependencies {
    val kinecraftVersion = "1.6.7"
    
    compileOnly("maven.modrinth:kinecraft:$kinecraftVersion:common")
    // Fabric Loom
    runtimeOnly("maven.modrinth:kinecraft:$kinecraftVersion:fabric")
    include("maven.modrinth:kinecraft:$kinecraftVersion")
    // NeoGradle
    runtimeOnly("maven.modrinth:kinecraft:$kinecraftVersion:neoforge")
    jarInJar("maven.modrinth:kinecraft:$kinecraftVersion")
}

MinecraftTag is for serialization between data class and Minecraft tag classes.

常见问题

Kinecraft 支持哪些 Minecraft 版本?

Kinecraft 支持 Minecraft Java 版 1.16.5–1.21.5,共 20 个版本,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。

Kinecraft 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端 / 服务端。

评论

登录后评论和评分

settingdust 的其他作品

查看全部 →