Skip to content

Commit c0a865c

Browse files
Make WorldConverter.convert() throws IOException in java
1 parent dca6f95 commit c0a865c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ Click the link above to see the future.
1212
- [#84] Mappings for Minecraft Java Edition 1.15 items and blocks
1313

1414
### Changed
15+
- `WorldConverter.convert()` now throws `IOException` in java **(breaking change)**
16+
- Updated [Region-Manipulator to `2.0.0`][Region 2.0.0] from `1.1.0` **(breaking change)**
1517
- [#84] The source world must be optimized by Minecraft 1.15.2 now
1618
- If the converter finds an unmapped block
1719
it will now be converted as 248:0 (minecraft:info_update) instead of 1:15 (stone with invalid data)
1820
- sweet_berries and shield are no longer replaced, they are obtainable in Nukkit 1.X now
19-
- Updated [Region-Manipulator to `2.0.0`][Region 2.0.0] from `1.1.0`.
2021
- Honey bottle and all banner patterns are no longer replaced, they aren't obtainable in Nukkit 1.X but
2122
the server won't break if you have these items in your inventory anymore.
2223

src/main/kotlin/br/com/gamemods/j2nwc/WorldConverter.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import br.com.gamemods.j2nwc.internal.PostWorldConversionHook
44
import br.com.gamemods.j2nwc.internal.convertLevelFile
55
import br.com.gamemods.j2nwc.internal.convertRegionFile
66
import java.io.File
7+
import java.io.IOException
78

89
/**
910
* A region position extracted from the region file name.
@@ -81,7 +82,10 @@ class WorldConverter(val from: File, val to: File) {
8182

8283
/**
8384
* Executes the conversion in the current thread. Will take a while to complete.
85+
*
86+
* @throws IOException If an error occurs while loading or writing the files
8487
*/
88+
@Throws(IOException::class)
8589
fun convert() {
8690
check(to.isDirectory || to.mkdirs()) {
8791
"Failed to create the folder $to"

0 commit comments

Comments
 (0)