aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric/citresewn/pack
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/pack')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java
index fd4e4ba..d04a5c7 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/CITParser.java
@@ -56,7 +56,7 @@ public class CITParser { private CITParser() {}
citPack.cits.add(parseCIT(citPack, citIdentifier, citProperties));
} catch (Exception e) {
- CITResewn.LOG.error(e.getMessage()); //todo be more descriptive
+ CITResewn.LOG.error(e.getMessage());
}
}
cits.addAll(citPack.cits);
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java
index b4960f2..218f28b 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java
@@ -36,6 +36,8 @@ public abstract class CIT {
public final Predicate<NbtCompound> nbt;
+ private final int weight;
+
public CIT(CITPack pack, Identifier identifier, Properties properties) throws CITParseException {
try {
for (String itemId : (properties.getProperty("items", properties.getProperty("matchItems", " "))).split(" "))
@@ -214,8 +216,9 @@ public abstract class CIT {
return true;
};
+ this.weight = Integer.parseInt(properties.getProperty("weight", "0"));
} catch (Exception e) {
- throw new CITParseException(pack.resourcePack, identifier, e.getMessage());
+ throw new CITParseException(pack.resourcePack, identifier, (e.getClass() == Exception.class ? "" : e.getClass().getSimpleName() + ": ") + e.getMessage());
}
}