diff options
author | SHsuperCM <shsupercm@gmail.com> | 2022-02-23 11:13:12 +0200 |
---|---|---|
committer | SHsuperCM <shsupercm@gmail.com> | 2022-02-23 11:13:12 +0200 |
commit | 70b04c19b5c6da9d63a095fb7a2e17fd722c9cb1 (patch) | |
tree | dba6999d8fc44b9f57f77aecfb70625d7bc1e05c /src | |
parent | 87baf18026aa53bba953888ac73ed656ceaf737c (diff) | |
download | CITResewn-70b04c19b5c6da9d63a095fb7a2e17fd722c9cb1.tar.gz CITResewn-70b04c19b5c6da9d63a095fb7a2e17fd722c9cb1.tar.bz2 CITResewn-70b04c19b5c6da9d63a095fb7a2e17fd722c9cb1.zip |
Ported more of the enchantment type
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyGroup.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyGroup.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyGroup.java index 5252330..75949db 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyGroup.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertyGroup.java @@ -49,6 +49,14 @@ public abstract class PropertyGroup { return value; } + public PropertyValue getLastWithoutMetadataOrDefault(String defaultValue, String namespace, String... pathAliases) { + PropertyValue property = getLastWithoutMetadata(namespace, pathAliases); + if (property == null) + property = new PropertyValue(null, defaultValue, "=", -1, this.identifier, this.packName); + + return property; + } + public String stripName() { return identifier.getPath().substring(identifier.getPath().lastIndexOf('/') + 1, identifier.getPath().length() - getExtension().length()); } |