From 7f020e1c51961e46b65e16a1978c18b187bf0223 Mon Sep 17 00:00:00 2001 From: Valentin Fritz Date: Fri, 17 May 2024 00:42:51 +0200 Subject: [PATCH] Allow compound tag with empty name --- SharpNBT/TagWriter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SharpNBT/TagWriter.cs b/SharpNBT/TagWriter.cs index 5af5265..37a20ca 100644 --- a/SharpNBT/TagWriter.cs +++ b/SharpNBT/TagWriter.cs @@ -306,7 +306,7 @@ public class TagWriter : TagIO [MethodImpl(MethodImplOptions.AggressiveInlining)] private void WriteTypeAndName(Tag tag) { - if (tag.Parent is ListTag || string.IsNullOrEmpty(tag.Name)) + if (tag.Parent is ListTag) return; BaseStream.WriteByte((byte) tag.Type); @@ -384,4 +384,4 @@ public class TagWriter : TagIO else BaseStream.Write(GetBytes(count), 0, sizeof(int)); } -} \ No newline at end of file +}