aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-02-22 00:30:05 +0100
committerLinnea Gräf <nea@nea.moe>2024-02-26 15:37:12 +0100
commit602112724d8236c1ec6671e1893128862c9f5815 (patch)
treefd0695839af0b2a8296e8d3009432644212638ce /src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java
parent2e571210c948d90a7d0ea8b07184102ceb401962 (diff)
downloadfirmament-602112724d8236c1ec6671e1893128862c9f5815.tar.gz
firmament-602112724d8236c1ec6671e1893128862c9f5815.tar.bz2
firmament-602112724d8236c1ec6671e1893128862c9f5815.zip
Add custom model predicates
Add regex support Add and and or predicates
Diffstat (limited to 'src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java')
-rw-r--r--src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java b/src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java
new file mode 100644
index 0000000..8a476db
--- /dev/null
+++ b/src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java
@@ -0,0 +1,33 @@
+/*
+ * SPDX-FileCopyrightText: 2024 Linnea Gräf <nea@nea.moe>
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+package moe.nea.firmament.mixins.custommodels;
+
+import moe.nea.firmament.features.texturepack.FirmamentModelPredicate;
+import moe.nea.firmament.features.texturepack.ModelOverrideData;
+import net.minecraft.client.render.model.json.ModelOverride;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Unique;
+
+@Mixin(ModelOverride.class)
+public class ModelOverrideDataHolder implements ModelOverrideData {
+
+ @Unique
+ private FirmamentModelPredicate[] overrides;
+
+ @Nullable
+ @Override
+ public FirmamentModelPredicate[] getFirmamentOverrides() {
+ return overrides;
+ }
+
+ @Override
+ public void setFirmamentOverrides(@NotNull FirmamentModelPredicate[] overrides) {
+ this.overrides = overrides;
+ }
+}