aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io
diff options
context:
space:
mode:
authorNopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com>2022-10-31 10:23:06 +0000
committerGitHub <noreply@github.com>2022-10-31 11:23:06 +0100
commit20eafeea6e1f904e114f4cae6bf0e202469322fa (patch)
tree74a8154081317e4511bbbca821717310e7e0994b /src/main/java/io
parent4d7b03d86e24e24952f55da9f2f7ccfa7a624a6e (diff)
downloadNotEnoughUpdates-20eafeea6e1f904e114f4cae6bf0e202469322fa.tar.gz
NotEnoughUpdates-20eafeea6e1f904e114f4cae6bf0e202469322fa.tar.bz2
NotEnoughUpdates-20eafeea6e1f904e114f4cae6bf0e202469322fa.zip
Added the ability for abicases to work (#399)
* Added the ability for abicases to work * this was a bug i noticed once
Diffstat (limited to 'src/main/java/io')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java1
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
index 71aa10b6..5fe902fb 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java
@@ -1597,6 +1597,7 @@ public class NEUManager {
recipes.clear();
recipesMap.clear();
usagesMap.clear();
+ itemMap.clear();
File[] itemFiles = new File(repoLocation, "items").listFiles();
if (itemFiles != null) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java
index 3692602a..ea5e13ab 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java
@@ -116,6 +116,9 @@ public class ItemResolutionQuery {
case "PARTY_HAT_CRAB_ANIMATED":
resolvedName = resolveCrabHatName();
break;
+ case "ABICASE":
+ resolvedName = resolvePhoneCase();
+ break;
}
}
@@ -235,6 +238,11 @@ public class ItemResolutionQuery {
return "PARTY_HAT_CRAB_" + color.toUpperCase(Locale.ROOT) + (crabHatYear == 2022 ? "_ANIMATED" : "");
}
+ private String resolvePhoneCase() {
+ String model = getExtraAttributes().getString("model");
+ return "ABICASE_" + model.toUpperCase(Locale.ROOT);
+ }
+
private String resolveEnchantedBookNameFromNBT() {
NBTTagCompound enchantments = getExtraAttributes().getCompoundTag("enchantments");
String enchantName = IteratorUtils.getOnlyElement(enchantments.getKeySet(), null);