Commit Graph

75 Commits

Author SHA1 Message Date
Ling ca2d7f49e1 增强输入处理和文件保存功能
在 `Scanner.cs` 中添加了对 `System.Diagnostics` 的引用,并优化了 `MoveNext` 方法以简化空白字符处理和错误处理逻辑。

在 `StringNbt.cs` 中引入了 `System.IO` 和 `System.Numerics`,并修改了解析逻辑以增强输入处理和错误检查。新增了 `IsLineEnd` 方法,并简化了 `MoveNext` 的调用。添加了 `SaveToFile` 和 `SaveToStream` 方法,以支持将 `CompoundTag` 保存为 SNBT 格式。
2025-06-22 21:16:35 +08:00
ForeverZer0 760c75cadc
Create dotnet-9.yml 2024-12-22 15:18:33 -05:00
ForeverZer0 bd80810e2c
Merge pull request #33 from vfrz/master
Fixed bug where top-level compound tags without a name would be skipped by the TagWriter.
2024-05-17 15:21:44 -04:00
vfrz ad4dcf63f3 Allow empty name only for root compound tag 2024-05-17 19:05:02 +02:00
Valentin Fritz 7f020e1c51
Allow compound tag with empty name 2024-05-17 00:42:51 +02:00
ForeverZer0 d6e0075b74
Merge pull request #29 from Sitterr/master
Wrapping deflated streams in BufferedStream when reading
2024-03-14 20:55:53 -04:00
Sitterr 964821d1fc Wrapped GZipStream and ZlibStream in BufferedStream when reading 2024-03-15 00:33:06 +02:00
ForeverZer0 190b694668
Removed console debug message from TagBuilder 2024-02-08 06:57:32 -05:00
Eric Freed 82399f243b fixed bug with Stringify giving ToString output 2023-09-01 01:54:21 -04:00
Eric Freed f22ae236b6 Updated README and the CODE_OF_CONDUCT 2023-08-27 16:38:03 -04:00
Eric Freed bcd41b37f0 Compound and List tags now assign/unassign parent on insertion/deletion 2023-08-27 16:37:14 -04:00
Eric Freed 11f3c4d70c Removed SerializableAttribute and ISerializable interface from tags. Improved JSON output. 2023-08-27 15:27:44 -04:00
Eric Freed 5d974eeeb4 Renamed EndianExtensions to NumberExtensions, included SNBT-related methods.
The Tag class no longer used Regex to identify if a name needs quoted or not.
2023-08-27 15:25:50 -04:00
Eric Freed 95af348ddc Removed unneeded classes, reimplemented ListTag 2023-08-27 04:37:49 -04:00
Eric Freed a4ecca89a8 Reimplemented CompoundTag as a Dictionary 2023-08-27 04:03:33 -04:00
Eric Freed b50d5ebbd6 refactoring and optimization 2023-08-27 03:13:05 -04:00
Eric Freed 05126cee2a Standardized positioning of scanner after reading each data element 2023-08-27 01:33:28 -04:00
Eric Freed f46d240767 Implemented a new SNBT parser that does not use regex 2023-08-26 23:33:08 -04:00
Eric Freed 7f99b388d7 Updated workflow to .NET 7.0 2023-08-26 20:11:09 -04:00
Eric Freed 37723a5282 Fixed nullability 2023-08-26 20:08:20 -04:00
Eric Freed 6c26878ad7 Added int overloads, add bool functionality to ByteTag 2023-08-26 20:07:35 -04:00
Eric Freed 70a5dd2c62 Updated target version to .NET 7 with latest major language version 2023-08-26 20:06:36 -04:00
Eric Freed d73bc2fbcf Changed target to .NET 7 with latest language version
Changed to use latest language/runtime, as well as adopt modern style/syntax.
2023-08-26 19:13:50 -04:00
ForeverZer0 44e723fb11
Merge pull request #4 from Arcus92/master
Fixes incomplete stream reads with .NET 6
2022-06-20 14:23:12 -04:00
David Schulte a091788fa4 Fixed an issue with .NET 6 where `TagReader` only partially reads the stream because the returned value of `Read` was ignored. 2022-06-15 15:45:01 +02:00
ForeverZer0 f27bebf6c9 - Fixed SNBT bug that would not parse boolean values
- Implemented BoolTag type for convenience
- Implemented compiled regular expressions
2021-09-18 18:46:43 -04:00
ForeverZer0 7a1d6c0471 Updated README with new features 2021-08-31 23:09:34 -04:00
ForeverZer0 c1ecfb75ee Updated NuGet package to 1.1 2021-08-31 23:03:11 -04:00
ForeverZer0 4d208e0506 Implemented parsing SNBT from stream
Added documentation
2021-08-31 22:59:26 -04:00
ForeverZer0 79c97696f4 Changed string formatting of floating point numbers to always include decimal point 2021-08-31 22:18:48 -04:00
ForeverZer0 92112ac887 Implemented SNBT parser 2021-08-31 22:16:27 -04:00
ForeverZer0 31aac628b6 Fixed formatting with ByteArray and LongArray 2021-08-31 19:33:57 -04:00
ForeverZer0 16369b68e3 Implemented generating SNBT from tags 2021-08-31 01:32:36 -04:00
ForeverZer0 5b6fcd2d4c Added badges 2021-08-26 03:11:12 -04:00
ForeverZer0 ef6c5e1ed0 Added missing XML documentation for publicly visible members 2021-08-25 19:38:41 -04:00
ForeverZer0 1aee10f0ad Added forgotten Strings.Designer.cs file 2021-08-25 19:25:06 -04:00
ForeverZer0 51d10d27e9 Added "please star" section to README 2021-08-25 19:06:37 -04:00
ForeverZer0 e0d1fe9438 Moved string literals for messages into new Strings.resx file 2021-08-25 19:01:59 -04:00
ForeverZer0 1431a301d2 Fixed grammar, added wiki link 2021-08-25 18:03:08 -04:00
ForeverZer0 bb54ab6aa6 Added generic Read methods to NbtFile for any TagContainer type instead of only CompoundTag 2021-08-25 17:42:37 -04:00
ForeverZer0 6ddd8c8322 Added comments and annotations 2021-08-25 05:21:56 -04:00
ForeverZer0 8b3bc44710 Added annotations 2021-08-25 05:15:10 -04:00
ForeverZer0 59b38baa3d Implemented ICloneable interface for tags 2021-08-25 05:11:57 -04:00
ForeverZer0 51efe12e54 Moved BaseStream field to TagIO 2021-08-25 04:52:05 -04:00
ForeverZer0 c10deb3900 Added TagBuilder tests 2021-08-25 04:31:39 -04:00
ForeverZer0 39fdbfba13 Added Context class in TagBuilders 2021-08-25 04:31:28 -04:00
ForeverZer0 7e30b7f898 Implemented BufferedTagWriter class 2021-08-25 03:12:32 -04:00
ForeverZer0 2e15b58792 Spelling/grammar fixes 2021-08-25 01:00:47 -04:00
ForeverZer0 caddb41496 Updated README.md 2021-08-25 00:55:53 -04:00
ForeverZer0 a3e5ce5f5a Added callbacks to TagReader class to permit user-handled parsing 2021-08-25 00:55:43 -04:00