Skip to content

Commit ef1bab7

Browse files
committed
Bump version
1 parent 3b40259 commit ef1bab7

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ repositories {
9090
}
9191
9292
dependencies {
93-
implementation 'com.saicone.nbt:nbt:1.0.0'
93+
implementation 'com.saicone.nbt:nbt:1.0.1'
9494
}
9595
```
9696

@@ -105,7 +105,7 @@ repositories {
105105
}
106106

107107
dependencies {
108-
implementation("com.saicone.nbt:nbt:1.0.0")
108+
implementation("com.saicone.nbt:nbt:1.0.1")
109109
}
110110
```
111111

@@ -126,7 +126,7 @@ dependencies {
126126
<dependency>
127127
<groupId>com.saicone.nbt</groupId>
128128
<artifactId>nbt</artifactId>
129-
<version>1.0.0</version>
129+
<version>1.0.1</version>
130130
<scope>compile</scope>
131131
</dependency>
132132
</dependencies>
@@ -201,6 +201,9 @@ InputStream in = Files.newInputStream(Path.of("myfile.nbt"));
201201
// Read from file
202202
Map<String, Object> map;
203203
try (TagInput<Object> input = TagInput.of(new DataInputStream(in))) {
204+
// Input must not be limited while reading a file
205+
input.unlimited();
206+
204207
map = input.readUnnamed();
205208
}
206209
```
@@ -262,6 +265,9 @@ InputStream in = Files.newInputStream(Path.of("myfile.nbt"));
262265
// Read from file
263266
Map<String, Object> map;
264267
try (TagInput<Object> input = TagInput.of(new ReverseDataInputStream(in))) {
268+
// Input must not be limited while reading a file
269+
input.unlimited();
270+
265271
map = input.readBedrockFile();
266272
}
267273
```
@@ -319,7 +325,7 @@ Integer level = ZipFormat.zlib().getCompressionLevel(data);
319325
320326
### Other
321327

322-
If you have a `DataOuput` instance, you can also create a delegated class with fallback writing for malformed Strings.
328+
If you have a `DataOuput` instance, you can also create a delegated class with fallback writing for malformatted Strings.
323329
```java
324330
DataOutput output = ...;
325331

@@ -336,9 +342,9 @@ That's because Minecraft have changed across the time (it's a 15th year-old game
336342
* any, mean a tag, introduced for Java on Minecraft 1.20.2.
337343
* bedrock file, mean a tag written in a bedrock file with its [header](https://wiki.bedrock.dev/nbt/nbt-in-depth.html#bedrock-nbt-file-header).
338344

339-
Following Minecraft format, there's no limit to write with a tag output, but tag input is limited by default with a maximum of 2MB size for tag (due network limitations) and 512 stack depth for nested values (since MC 1.20.2).
345+
Following Minecraft format, there's no limit to write with a tag output, but tag input is limited by default with a maximum of 2MB size for tag (due network limitations) and 512 stack depth for nested values (since MC 1.20.2) to avoid a stack overflow error.
340346

341-
To change that limits you can also modify the recently created TagInput instance, for example:
347+
To change those limits you can also modify the recently created TagInput instance, for example:
342348
```java
343349
TagInput<Object> input = ...;
344350

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
group=com.saicone.nbt
2-
version=1.0.0
2+
version=1.0.1

0 commit comments

Comments
 (0)