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

Viewer not working #331

Closed
ChaCha20Poly1305 opened this issue Dec 18, 2022 · 5 comments
Closed

Viewer not working #331

ChaCha20Poly1305 opened this issue Dec 18, 2022 · 5 comments

Comments

@ChaCha20Poly1305
Copy link

ChaCha20Poly1305 commented Dec 18, 2022

I installed mineflayer and mineflayerViewer with npm but the render is just completly broken. Node version 19.3.0
The Code:

const mineflayer = require('mineflayer')
const mineflayerViewer = require('prismarine-viewer').mineflayer

if (process.argv.length < 4 || process.argv.length > 6) {
console.log('Usage : node viewer.js [] []')
process.exit(1)
}

const bot = mineflayer.createBot({
host: process.argv[2],
port: parseInt(process.argv[3]),
username: process.argv[4] ? process.argv[4] : 'viewer',
// password: process.argv[5]
})

bot.once('spawn', () => {
mineflayerViewer(bot, { port: 3007, firstPerson: false })
bot.chat("/register lollollol lollollol");
bot.chat("/login lollollol");
})

This is the error:

PartialReadError: Read error for undefined : undefined
at new ExtendableError (/home/davpenguin/node_modules/protodef/src/utils.js:63:13)
at new PartialReadError (/home/davpenguin/node_modules/protodef/src/utils.js:70:5)
at Object.readBool [as bool] (/home/davpenguin/node_modules/protodef/src/datatypes/utils.js:133:41)
at Object.slot (eval at compile (/home/davpenguin/node_modules/protodef/src/compiler.js:258:12), :53:61)
at eval (eval at compile (/home/davpenguin/node_modules/protodef/src/compiler.js:258:12), :114:59)
at Object.particleData (eval at compile (/home/davpenguin/node_modules/protodef/src/compiler.js:258:12), :116:11)
at Object.packet_world_particles (eval at compile (/home/davpenguin/node_modules/protodef/src/compiler.js:258:12), :1152:63)
at eval (eval at compile (/home/davpenguin/node_modules/protodef/src/compiler.js:258:12), :2338:70)
at packet (eval at compile (/home/davpenguin/node_modules/protodef/src/compiler.js:258:12), :2412:9)
at CompiledProtodef.read (/home/davpenguin/node_modules/protodef/src/compiler.js:70:12)

2022-12-18-062859_1920x1080_scrot_002

@ChaCha20Poly1305
Copy link
Author

This is same as #306

@ChaCha20Poly1305
Copy link
Author

The solve is to set the version to the server version

@ChaCha20Poly1305
Copy link
Author

It is one of the known bugs. The textures not loading because of the old version.

@Vinlow
Copy link

Vinlow commented Dec 27, 2022

I choose v1.18.2 and it worked.
1.19.x is not yet added to the package

@AirplanegoBrr
Copy link

Fix (people aren't giving the full fix)

const bot = mineflayer.createBot({
  username: 'Bot',
  host: "",
  version: "1.18.2" // Or a valid version ( 1.19.+ isn't supported yet, use ViaVersion/ViaPlugins to fix )
})

Fixed issues: #330 #321(?)
image
( Yes that's my world, its in the sky, Also skins are bugged as I believe its bc my server is offline mode)

@rom1504 rom1504 closed this as completed Dec 17, 2023
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

4 participants