TMCMR icon indicating copy to clipboard operation
TMCMR copied to clipboard

Update for minecraft 1.13

Open jonatkins opened this issue 6 years ago • 7 comments

After upgrading my server to 1.13, TMCMR now gives the following error

Error reading chunk from /home/jon/minecraft/world/region/r.-1.0.mca at 31,25 java.io.IOException: Invalid tag type: 12. at org.jnbt.NBTInputStream.readTagPayload(NBTInputStream.java:180) at org.jnbt.NBTInputStream.readTag(NBTInputStream.java:103) at org.jnbt.NBTInputStream.readTagPayload(NBTInputStream.java:161) at org.jnbt.NBTInputStream.readTag(NBTInputStream.java:103) at org.jnbt.NBTInputStream.readTagPayload(NBTInputStream.java:161) at org.jnbt.NBTInputStream.readTag(NBTInputStream.java:103) at org.jnbt.NBTInputStream.readTagPayload(NBTInputStream.java:161) at org.jnbt.NBTInputStream.readTag(NBTInputStream.java:103) at org.jnbt.NBTInputStream.readTag(NBTInputStream.java:81) at togos.minecraft.maprend.RegionRenderer.preRender(RegionRenderer.java:291) at togos.minecraft.maprend.RegionRenderer.render(RegionRenderer.java:370) at togos.minecraft.maprend.RegionRenderer.renderRegion(RegionRenderer.java:455) at togos.minecraft.maprend.RegionRenderer$RenderThread.run(RegionRenderer.java:66)

jonatkins avatar Jul 23 '18 10:07 jonatkins

This is to be expected. The NBT format got extended by some tag types and it will take some time for the libraries to adjust and the changes to trickle down to the releases. Furthermore, the Chunk Format has been changed so that the existing rendering code will have to be adjusted.

piegamesde avatar Jul 29 '18 20:07 piegamesde

Will this be fixed? What needs to be changed? Is it coding or just manual checkup of tags and input in to some file?

Cyoor avatar Aug 12 '18 10:08 Cyoor

What needs to be changed?

First of all, the NBT specification has changed (LongArrayTag added) and all NBT libraries need to be updated. Then, the Chunk Format has changed radically. This is how Minecraft encodes the data of a Chunk into NBT. This is because of the removal of block meta data in the game. This means that the color generation/mapping has to be updated too.

Will this be fixed?

Most NBT libraries have not incorporated the changes yet, even if there are open pull requests. Maybe I'll fix the chunk loading and someone will have to rewrite color generation too.

So yes, a lot of coding is needed and don't expect it to happen in the near future :(

piegamesde avatar Aug 13 '18 10:08 piegamesde

I would be willing to help if it's needed. However I have never done anything related to minecraft or nbt before, so I would probably need some help on where to start. I have used Java some a while ago, so that wouldn't be any problem at least I think.

Cyoor avatar Aug 13 '18 16:08 Cyoor

I'm currently working on some refactorings that will allow 1.13 support (abstracting out different Chunks of different Minecraft versions etc.) this will take a while though. In the meantime, you may have a look at https://wiki.vg/NBT and https://minecraft.gamepedia.com/Chunk_format .

If you're really bored/impatient, you can have a look at BlockMap and how to generate block colors without block IDs (since they were removed).

piegamesde avatar Aug 13 '18 22:08 piegamesde

So, I've done a lot of changes, messed around a lot with the code, rewrote most of the code and broke everything. But at least, we can (somewhat) render 1.13 worlds now: https://github.com/piegamesde/TMCMR

To try it out yourself, copy your world into ./src/test/resources and adjust the path in RegionRendererTest which you can then run. The map will land in ./output.

piegamesde avatar Aug 20 '18 12:08 piegamesde

@jonatkins @Cyoor I've forked from TMCMR since I had to rewrite almost the entire renderer: https://github.com/Minecraft-Technik-Wiki/BlockMap It is far from being as good as TMCMR, but at least it works with 1.13 worlds

piegamesde avatar Aug 26 '18 15:08 piegamesde