PrismarineJS/prismarine-viewer

Invisible world in 1.19.1 as well as latest #175

3top1a posted onGitHub

Screenshot_2021-03-27_21-35-04

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.

posted by 3top1a about 4 years ago

What is 1.19.1 ?

posted by rom1504 about 4 years ago

The viewer version

posted by 3top1a about 4 years ago

What code are you running? Any error in dev console?

posted by rom1504 about 4 years ago

I tried both the latest commit (fb7b9d3) and 1.19.1.

Both had an empty world

posted by 3top1a about 4 years ago

What code are you running? Any error in chrome dev console?

posted by rom1504 about 4 years ago

I get one error:

TypeError: can't convert undefined to object

posted by 3top1a about 4 years ago

What's the full error ? What code are you running?

posted by rom1504 about 4 years ago

1.19.1, image

posted by 3top1a about 4 years ago

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

posted by rom1504 about 4 years ago

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))
  })
}                                                                                                                                                      
posted by 3top1a about 4 years ago

image There's something wrong with the tints, I'll check

posted by 3top1a about 4 years ago

I just installed the latest updates and it worked

posted by 3top1a about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests