From 13444f1de34bb9a079986f2afa10658ccbc2a96d Mon Sep 17 00:00:00 2001 From: Electroblob <35599699+Electroblob77@users.noreply.github.com> Date: Mon, 26 Feb 2018 18:37:09 +0000 Subject: [PATCH] Additional method for 76f6d43 --- .../java/electroblob/wizardry/util/WizardryUtilities.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/electroblob/wizardry/util/WizardryUtilities.java b/src/main/java/electroblob/wizardry/util/WizardryUtilities.java index 097f2814..fd129af5 100644 --- a/src/main/java/electroblob/wizardry/util/WizardryUtilities.java +++ b/src/main/java/electroblob/wizardry/util/WizardryUtilities.java @@ -887,6 +887,13 @@ public final class WizardryUtilities { return list; } + + /** Removes the UUID with the given key from the given NBT tag, if any. Why this doesn't exist in vanilla I have + * no idea. */ + public static void removeUniqueId(NBTTagCompound tag, String key){ + tag.removeTag(key + "Most"); + tag.removeTag(key + "Least"); + } // TODO: Backport: It has recently become apparent that storing UUIDs as strings is not good practice, so backport // these two