From ad25606e2e22825f0cc3fb504df9e3bf5644a371 Mon Sep 17 00:00:00 2001 From: LatvianModder Date: Mon, 21 Aug 2023 14:39:02 +0300 Subject: [PATCH] UUID type wrapper fix --- .../dev/latvian/mods/rhino/mod/wrapper/UUIDWrapper.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/src/main/java/dev/latvian/mods/rhino/mod/wrapper/UUIDWrapper.java b/common/src/main/java/dev/latvian/mods/rhino/mod/wrapper/UUIDWrapper.java index adea13ed..6dfee550 100644 --- a/common/src/main/java/dev/latvian/mods/rhino/mod/wrapper/UUIDWrapper.java +++ b/common/src/main/java/dev/latvian/mods/rhino/mod/wrapper/UUIDWrapper.java @@ -32,6 +32,12 @@ static void digits(StringBuilder sb, long val, int digits) { @Nullable static UUID fromString(Object o) { + if (o instanceof UUID) { + return (UUID) o; + } else if (o == null) { + return null; + } + String s = String.valueOf(o); if (o == null || !(s.length() == 32 || s.length() == 36)) {