From 20821e63057add096e314310ea8fa8e0c411e964 Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Fri, 14 Jun 2024 14:26:00 +0200 Subject: meta: Add 2024 Balloon Hat to the ItemResolutionQuery (#1212) --- .../moulberry/notenoughupdates/util/ItemResolutionQuery.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 b6be1171..9cefca1f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ItemResolutionQuery.java @@ -129,6 +129,9 @@ public class ItemResolutionQuery { case "POTION": resolvedName = resolvePotionName(); break; + case "BALLOON_HAT_2024": + resolvedName = resolveBalloonHatName(); + break; } } @@ -356,6 +359,11 @@ public class ItemResolutionQuery { } } + private String resolveBalloonHatName() { + String color = getExtraAttributes().getString("party_hat_color"); + return "BALLOON_HAT_2024_" + color.toUpperCase(Locale.ROOT); + } + private NBTTagCompound getExtraAttributes() { if (compound == null) return new NBTTagCompound(); return compound.getCompoundTag(EXTRA_ATTRIBUTES); -- cgit