diff options
author | SHsuperCM <shsupercm@gmail.com> | 2022-02-13 07:52:10 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2022-02-13 07:52:10 +0200 |
commit | 49318a4452f629274e96001700006e0b4a1464a5 (patch) | |
tree | e887cce1cec886e17247b2a99029e79b0255b0e7 /src/main/java/shcm/shsupercm/fabric/citresewn/cit/builtin | |
parent | 8823e77b989ab1035fa8813120177dd3a95ce863 (diff) | |
download | CITResewn-49318a4452f629274e96001700006e0b4a1464a5.tar.gz CITResewn-49318a4452f629274e96001700006e0b4a1464a5.tar.bz2 CITResewn-49318a4452f629274e96001700006e0b4a1464a5.zip |
Moved some stuff around
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/cit/builtin')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/cit/builtin/WeightCondition.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/cit/builtin/WeightCondition.java b/src/main/java/shcm/shsupercm/fabric/citresewn/cit/builtin/WeightCondition.java new file mode 100644 index 0000000..ec0a5d7 --- /dev/null +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/cit/builtin/WeightCondition.java @@ -0,0 +1,27 @@ +package shcm.shsupercm.fabric.citresewn.cit.builtin; + +import io.shcm.shsupercm.fabric.fletchingtable.api.Entrypoint; +import shcm.shsupercm.fabric.citresewn.api.CITConditionContainer; +import shcm.shsupercm.fabric.citresewn.ex.CITParsingException; +import shcm.shsupercm.fabric.citresewn.cit.CITCondition; +import shcm.shsupercm.fabric.citresewn.cit.CITContext; +import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup; +import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue; + +public class WeightCondition extends CITCondition { + @Entrypoint(CITConditionContainer.ENTRYPOINT) + public static final CITConditionContainer<WeightCondition> CONTAINER = new CITConditionContainer<>(WeightCondition.class, WeightCondition::new, + "weight"); + + public int weight = 0; + + @Override + public void load(PropertyValue value, PropertyGroup properties) throws CITParsingException { + this.weight = parseInteger(value, properties); + } + + @Override + public boolean test(CITContext context) { + return true; + } +} |