aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/texturepack/ModelOverrideData.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-17 19:41:18 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-17 19:41:18 +0100
commit86cbf9d4221e85dec14300c11393abb325bffcef (patch)
treedc86b43ae33e92a7f7ad553e6a03b6853d6b0ded /src/main/kotlin/features/texturepack/ModelOverrideData.kt
parent6045077025629cabc1831a281fec532faa7781dd (diff)
downloadFirmament-86cbf9d4221e85dec14300c11393abb325bffcef.tar.gz
Firmament-86cbf9d4221e85dec14300c11393abb325bffcef.tar.bz2
Firmament-86cbf9d4221e85dec14300c11393abb325bffcef.zip
fix: Item predicates not applying unless a vanilla predicate is present
Diffstat (limited to 'src/main/kotlin/features/texturepack/ModelOverrideData.kt')
-rw-r--r--src/main/kotlin/features/texturepack/ModelOverrideData.kt14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/main/kotlin/features/texturepack/ModelOverrideData.kt b/src/main/kotlin/features/texturepack/ModelOverrideData.kt
index 1585bd7..29d9192 100644
--- a/src/main/kotlin/features/texturepack/ModelOverrideData.kt
+++ b/src/main/kotlin/features/texturepack/ModelOverrideData.kt
@@ -1,7 +1,15 @@
-
package moe.nea.firmament.features.texturepack
+import net.minecraft.client.render.model.json.ModelOverride
+
interface ModelOverrideData {
- fun getFirmamentOverrides(): Array<FirmamentModelPredicate>?
- fun setFirmamentOverrides(overrides: Array<FirmamentModelPredicate>?)
+ companion object {
+
+ @JvmStatic
+ @Suppress("CAST_NEVER_SUCCEEDS")
+ fun cast(override: ModelOverride) = override as ModelOverrideData
+ }
+
+ fun getFirmamentOverrides(): Array<FirmamentModelPredicate>?
+ fun setFirmamentOverrides(overrides: Array<FirmamentModelPredicate>?)
}