Перейти к содержимому
Mineforgian

moire

Kotlin DSL for polymer-virtual-entity

Загрузки
2K
Подписчики
1
Обновлён
10 февраля 2025 г.
Лицензия
Apache-2.0

Опубликован 10 января 2025 г.

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
    }
}

Ченджлог

0.4.6Релиз1.21.4 · 10 февраля 2025 г.
0.4.5Релиз1.21.4 · 10 февраля 2025 г.
0.4.4Релиз1.21.4 · 10 февраля 2025 г.
0.4.3Релиз1.21.4 · 5 февраля 2025 г.
0.4.2Релиз1.21.4 · 28 января 2025 г.
0.4.1Релиз1.21.4 · 25 января 2025 г.
0.4.0Релиз1.21.4 · 24 января 2025 г.
0.3.10Релиз1.21.4 · 24 января 2025 г.

Комментарии

Загружаем…