question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Editing chunk data in PE

See original GitHub issue

I’m trying to edit chunk data from within a filter. Specifically trying to set a chunk’s biome.

Looking through levelDB with a level editor (Universal Minecraft Editor) I figured out that the last 256 bytes of Level -> Data2D inside a chunk contains the biome info. I was able to manually edit that data and confirm the biome changed in-game.

Obviously I can’t access it like I would for a Java map since it’s not NBT data.

chunk = level.getChunk(x,z)
chunk.root_tag["Level"]["Biomes"])

I assume I have to use pymclevel, probably leveldb.py but I just can’t figure it out.

Can someone point me in the right direction?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
LaChalcommented, Aug 4, 2017

Right. For PE worlds, there’s no root_tag['Level']['Biomes'] object for the chunk or level ones.

Just use chunk.Biomes one 😄

(Thanks to @gentlegiantJGC to point the commit, because something is (really) wrong there. I did not see this despite my tests and code review before pushing 😕)

0reactions
LaChalcommented, Aug 14, 2017

No problem 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorials/Updating old terrain - Minecraft Wiki - Fandom
Open your world in MCA Selector; Click on "Tools" -> "Filter chunks"; Replace the line xPos <= 100 AND xPos >= -100 AND...
Read more >
Amulet Editor
Amulet Map Editor is a Minecraft map editor made by the Amulet Team, ... The construction format is a file to store Minecraft...
Read more >
Chunk Editor · Querz/mcaselector Wiki - GitHub
To edit the editor and save the modified chunk data to disk, press Apply . Array editor. When editing a field containing a...
Read more >
How to Reset or Reload Chunks in Minecraft (2022)
Minecraft Bedrock (including Pocket Edition) · Installing the software · Finding coordinates of chunks to be reset · Finding the game world folder....
Read more >
Chunks.dat File Format - Survivalcraft - WordPress.com
File format used by versions 1.4 to 1.28 The Chunks.dat file stores binary terrain blocks data. It does not contain entities data (where...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found