prismarinejs / bedrock-provider Goto Github PK
View Code? Open in Web Editor NEWMinecraft bedrock level provider for disk and network with caching support
Minecraft bedrock level provider for disk and network with caching support
Tested on 1.19.1 through 1.19.70
I modified processSubChunk from example to output block at x0 y15 z0 (built a tower from stone on a sever at this location from y0 to hight limit).
Part of the code where changes were made:
if (entry.result === 'success') { foundSubChunks++ if (packet.cache_enabled) { await loadCached(cc, x, y, z, entry.blob_id, entry.payload) } else { await cc.networkDecodeSubChunkNoCache(y, entry.payload) let position = new Vec3(0, 15, 0) let block_at15 = bot.world.getColumnAt(position).getBlock(position) console.log(position) console.log(block_at15) } } else { lostSubChunks++ }
Nether chunks appear to have no block data:
Using the following code:
async function load(folder, dimension = 1) {
const db = new LevelDB(locDB, {
createIfMissing: false,
});
await db.open();
const world = new WorldProvider(db, { dimension });
return { db, world };
}
async function getChunk(world, xx, zz) {
const has = await world.hasChunk(xx, zz);
if (!has) {
console.warn(`WARNING: No chunk found at ${xx}, ${zz}`);
return undefined;
}
return world.load(xx, zz, true);
}
The world I'm using definitely has disk-written Nether chunks, I can load up the world and see changes etc. where I am trying to read them.
Any clues?
Edit: May have made a mistake elsewhere in my code - closing for now!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.