diff options
author | SHsuperCM <shsupercm@gmail.com> | 2022-03-05 18:44:04 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2022-03-06 05:22:00 +0200 |
commit | bb9dcef4b53d201cf4bcac3bf88d2042a1ce226c (patch) | |
tree | da5b4cd93e1514dea69495826b2a187cb7c0b946 /src/main/java/shcm/shsupercm/fabric/citresewn/cit/CIT.java | |
parent | 09792f49ee89c6b4ff37464acec4b94b3f9f370b (diff) | |
download | CITResewn-bb9dcef4b53d201cf4bcac3bf88d2042a1ce226c.tar.gz CITResewn-bb9dcef4b53d201cf4bcac3bf88d2042a1ce226c.tar.bz2 CITResewn-bb9dcef4b53d201cf4bcac3bf88d2042a1ce226c.zip |
Documentation (29/44, 0/35)
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/cit/CIT.java')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/cit/CIT.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CIT.java b/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CIT.java index 3bc708f..7c7ba5b 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CIT.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CIT.java @@ -2,11 +2,34 @@ package shcm.shsupercm.fabric.citresewn.cit; import net.minecraft.util.Identifier; +/** + * Runtime representation of a CIT, holding its type and conditions as well as additional metadata. + */ public class CIT<T extends CITType> { + /** + * The full location of this CIT in its resourcepack. + */ public final Identifier propertiesIdentifier; + + /** + * Name of the resourcepack that contains this CIT. + */ public final String packName; + + /** + * The CIT's type. + * @see CITType + */ public final T type; + + /** + * Conditions that must be met for this CIT to work. + */ public final CITCondition[] conditions; + + /** + * The weight of this CIT to be used when resolving multiple CIT matching conflicts. + */ public final int weight; public CIT(Identifier propertiesIdentifier, String packName, T type, CITCondition[] conditions, int weight) { @@ -17,6 +40,13 @@ public class CIT<T extends CITType> { this.weight = weight; } + /** + * Tests the given context against all of this CIT's conditions. + * + * @see #conditions + * @param context context to check + * @return true if none of this CIT's {@link #conditions} tested false + */ public boolean test(CITContext context) { try { for (CITCondition condition : conditions) |