aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2021-08-28 13:23:52 +0300
committerSHsuperCM <shsupercm@gmail.com>2021-08-28 13:23:52 +0300
commitd5228ab2f1d1ecc36cae0fa056c575c4d85d3b56 (patch)
treef2d40583480f7c848d730593ed00921f62d540ef /src/main/java
parentd2dddabbb2536d0434972c421cac6e89f030118f (diff)
downloadCITResewn-d5228ab2f1d1ecc36cae0fa056c575c4d85d3b56.tar.gz
CITResewn-d5228ab2f1d1ecc36cae0fa056c575c4d85d3b56.tar.bz2
CITResewn-d5228ab2f1d1ecc36cae0fa056c575c4d85d3b56.zip
Moved empty items check from cit to cit item
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CIT.java2
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java3
2 files changed, 3 insertions, 2 deletions
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 6545035..adcaa35 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
@@ -56,8 +56,6 @@ public abstract class CIT {
throw new Exception("Unknown item " + itemId);
this.items.add(Registry.ITEM.get(itemIdentifier));
}
- if (this.items.size() == 0 && !properties.getProperty("type", "item").equals("enchantment"))
- throw new Exception("CIT must target at least one item type");
String damage = properties.getProperty("damage");
if (damageAny = damage == null) {
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java
index f436cf9..bcd719c 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/cits/CITItem.java
@@ -39,6 +39,9 @@ public class CITItem extends CIT {
public CITItem(CITPack pack, Identifier identifier, Properties properties) throws CITParseException {
super(pack, identifier, properties);
try {
+ if (this.items.size() == 0)
+ throw new Exception("CIT must target at least one item type");
+
Identifier assetIdentifier = resolvePath(identifier, properties.getProperty("model"), ".json", pack.resourcePack);
if (assetIdentifier != null)
assetIdentifiers.put(null, assetIdentifier);