跳到正文

moire

作者:Ghost

Kotlin DSL for polymer-virtual-entity

收藏

介绍

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

moire

moire is a Kotlin library providing extension functions and a DSL
for polymer-virtual-entity. With moire, you can easily create and manage
ElementHolder instance.

Note: The API is subject to change without backward compatibility until version 1.0.0. Please be aware of

potential changes.

Gradle Setup

Groovy

repositories {
    maven { url 'https://maven.nucleoid.xyz/' }
    maven { url 'https://api.modrinth.com/maven' }
}

dependencies {
    modImplementation 'eu.pb4:polymer-virtual-entity:POLYMER_VERSION'
    modImplementation 'maven.modrinth:moire:MOIRE_VERSION'
}

Kotlin DSL

repositories {
    maven("https://maven.nucleoid.xyz/")
    maven("https://api.modrinth.com/maven")
}

dependencies {
    modImplementation("eu.pb4:polymer-virtual-entity:POLYMER_VERSION")
    modImplementation("maven.modrinth:moire:MOIRE_VERSION")
}

Usage

Here is a simple example.

import jp.fishmans.moire.elements.*
import jp.fishmans.moire.matrices.rotateLocalYDegrees
import net.minecraft.item.Items

fun create() = elementHolder {
    itemDisplayElement {
        transformation {
            scaleLocal(0.5f)
        }

        onTick {
            transform {
                rotateLocalYDegrees(11.25f)
            }

            startInterpolationIfDirty(1)
        }

        item = Items.TNT.defaultStack
        teleportDuration = 1
    }
}

常见问题

moire 支持哪些 Minecraft 版本?

moire 支持 Minecraft Java 版 1.21.4,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

moire 怎么安装?

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

评论

登录后评论和评分

Ghost 的其他作品

查看全部 →