aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CIT.java
blob: ea75c04a1e048ac582354a1747cddf5cad0c71e6 (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
package shcm.shsupercm.fabric.citresewn.cit;

import net.minecraft.util.Identifier;

public class CIT {
    public final Identifier propertiesIdentifier;
    public final String packName;
    public final CITType type;
    public final CITCondition[] conditions;
    public final int weight;

    public CIT(Identifier propertiesIdentifier, String packName, CITType type, CITCondition[] conditions, int weight) {
        this.propertiesIdentifier = propertiesIdentifier;
        this.packName = packName;
        this.type = type;
        this.conditions = conditions;
        this.weight = weight;
    }

    public boolean test(CITContext context) {
        for (CITCondition condition : conditions)
            if (!condition.test(context))
                return false;

        return true;
    }
}