aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/firmament/mixins/custommodels/ModelOverrideDataHolder.java
blob: 8a476db65aa8af369e29d4eae2f17d1dabd1a3d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;
    }
}