Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NbtIO.writeNbtFile produces ClassCastException #1

Open
alexsocha opened this issue Nov 10, 2021 · 0 comments
Open

NbtIO.writeNbtFile produces ClassCastException #1

alexsocha opened this issue Nov 10, 2021 · 0 comments

Comments

@alexsocha
Copy link

Version: 3.1.0

Thanks for the really useful library, just noticed an issue when using this method:

NbtIO.writeNbtFile(File("test.mcstructure"), NbtFile("", NbtCompound()), compressed=false, littleEndian=true)

which produces:

Exception in thread "main" java.lang.ClassCastException: class java.io.BufferedOutputStream cannot be cast to class java.io.DataOutputStream (java.io.BufferedOutputStream and java.io.DataOutputStream are in module java.base of loader 'bootstrap')
        at br.com.gamemods.nbtmanipulator.LittleEndianDataOutputStream.<init>(LittleEndianDataOutputStream.kt:15)
        at br.com.gamemods.nbtmanipulator.NbtIO.writeNbtFile(NbtIO.kt:42)
        at br.com.gamemods.nbtmanipulator.NbtIO.writeNbtFile(NbtIO.kt:87)
        at br.com.gamemods.nbtmanipulator.NbtIO.writeNbtFile$default(NbtIO.kt:81)

a similar thing also happens with compressed=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant