aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/builtin/WeightCondition.java3
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java5
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/builtin/WeightCondition.java b/src/main/java/shcm/shsupercm/fabric/citresewn/builtin/WeightCondition.java
index f258df4..4161a55 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/builtin/WeightCondition.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/builtin/WeightCondition.java
@@ -10,7 +10,8 @@ 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 static final CITConditionContainer<WeightCondition> CONTAINER = new CITConditionContainer<>(WeightCondition.class, WeightCondition::new,
+ "weight");
public int weight = 0;
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java
index b5aa315..c16d96a 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cit/CITCondition.java
@@ -1,5 +1,6 @@
package shcm.shsupercm.fabric.citresewn.pack.cit;
+import shcm.shsupercm.fabric.citresewn.CITResewn;
import shcm.shsupercm.fabric.citresewn.ex.CITParsingException;
import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup;
import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue;
@@ -20,6 +21,10 @@ public abstract class CITCondition {
public abstract boolean test(CITContext context);
+ protected void warn(String message, PropertyValue value, PropertyGroup properties) {
+ CITResewn.logWarnLoading("Warning: " + CITParsingException.descriptionOf(message, properties, value.position()));
+ }
+
protected int parseInteger(PropertyValue value, PropertyGroup properties) throws CITParsingException {
try {
return Integer.parseInt(value.value());