Skip to content

Stairs not rendering #427

@mkmark

Description

@mkmark

minimal reproduction sample:

const standaloneViewer = require('prismarine-viewer').standalone;
const { Vec3 } = require('vec3');

(async () => {
  const version = "1.13";
  const World = require('prismarine-world')(version);
  const Chunk = require('prismarine-chunk')(version);

  const world = new World(() => new Chunk())
  const viewer = standaloneViewer({
    version,
    world,
    center: new Vec3(0,0,0),
    port: 3002,
  });
  await world.setBlockStateId(new Vec3(0, 0, 0), 1)
  await world.setBlockStateId(new Vec3(0, 0, 1), 4423)
  await world.setBlockStateId(new Vec3(0, 0, 2), 4424)
  // for (let i=0; i<6000; ++i){
  //   await world.setBlockStateId(new Vec3(Math.floor(i/100), 0, i%100), i);
  // }
  viewer.update();
})()

Only the stone (state id 1) is drawn when running the code. The stairs (4423, 4424) are invisible. This happens to all stairs. Happens to different versions (1.13, 1.19 tested)

4423 should be the state of stone_brick_stairs

Actually, there are more empty textures to be seen if you uncomment the for loop lines (not sure if the state id is continuous though, but they seems so for 1.13).


I am not entirely sure if this is the correct way of drawing stairs. My actual problem is that prismarine-viewer can not render schematics properly, where all stairs are not drawn. This is an attempt to trace the issue. Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions