dougbot/bridge/lib/prismarine-chunk/example.js
roberts 8f616598fd Fix chat, brain stability, MariaDB reconnect, suppress warnings
- Listen on raw 'text' packet for Bedrock chat (pattern-based chat event
  doesn't fire reliably on Bedrock)
- Brain: add safety reset for stuck pending_status flag
- MariaDB: add retry-on-disconnect for all query methods
- Suppress harmless punycode deprecation warning from Node.js
- Add mineflayer-bedrock lib packages (mineflayer, prismarine-chunk,
  prismarine-registry) for movement support
- Exclude minecraft-data from git (278MB, installed via npm)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 12:33:17 -05:00

14 lines
384 B
JavaScript

const Chunk = require('./')('1.8')
const Vec3 = require('vec3')
const chunk = new Chunk()
for (let x = 0; x < Chunk.w; x++) {
for (let z = 0; z < Chunk.l; z++) {
chunk.setBlockType(new Vec3(x, 50, z), 2)
for (let y = 0; y < Chunk.h; y++) {
chunk.setSkyLight(new Vec3(x, y, z), 15)
}
}
}
console.log(JSON.stringify(chunk.getBlock(new Vec3(3, 50, 3)), null, 2))