Invisible world in 1.19.1 as well as latest #175
3top1a posted onGitHub
The world is missing, but click to move still works, so the world is just not rendering.
I also tried this in not-so-extention-heavy Brave, but the same issue still persisted.
What is 1.19.1 ?
The viewer version
What code are you running? Any error in dev console?
What code are you running? Any error in chrome dev console?
I get one error:
TypeError: can't convert undefined to object
What's the full error ? What code are you running?
1.19.1,
1.19.1 is the version of prismarine-viewer it's not the code you ran. What code did you run? Until you give more information it's going to be hard to help you
The click to move example, modified a bit:
const mineflayer = require('mineflayer');
const mineflayerViewer = require('prismarine-viewer').mineflayer
const { pathfinder, Movements } = require('mineflayer-pathfinder')
const { GoalBlock } = require('mineflayer-pathfinder').goals
username = null;
password = null;
server_ip = null;
port = null;
bot = null;
exports.connect = function() {
console.log("teet");
bot = mineflayer.createBot({
host: server_ip,
port: port,
username: username,
password: password,
version: "1.12.2"
});
}
exports.viewer = function(){
bot.loadPlugin(pathfinder)
mineflayerViewer(bot, { port: 3001 })
bot.on('path_update', (r) => {
const nodesPerTick = (r.visitedNodes * 50 / r.time).toFixed(2)
console.log(`I can get there in ${r.path.length} moves. Computation took ${r.time.toFixed(2)} ms (${nodesPerTick} nodes/tick). ${r.status}`)
const path = [bot.entity.position.offset(0, 0.5, 0)]
for (const node of r.path) {
path.push({ x: node.x, y: node.y + 0.5, z: node.z })
}
bot.viewer.drawLine('path', path, 0xff00ff)
})
const mcData = require('minecraft-data')(bot.version)
const defaultMove = new Movements(bot, mcData)
bot.viewer.on('blockClicked', (block, face, button) => {
if (button !== 2) return // only right click
const p = block.position.offset(0, 1, 0)
bot.pathfinder.setMovements(defaultMove)
bot.pathfinder.setGoal(new GoalBlock(p.x, p.y, p.z))
})
}
There's something wrong with the tints, I'll check
I just installed the latest updates and it worked