Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 1.12 and 1.13+ worlds in the same Chunky version #553

Closed
leMaik opened this issue Apr 10, 2020 · 10 comments · Fixed by #938
Closed

Support 1.12 and 1.13+ worlds in the same Chunky version #553

leMaik opened this issue Apr 10, 2020 · 10 comments · Fixed by #938
Labels
chunky 2.x Issues that only affect version 2.x of chunky (for Minecraft 1.13+) feature request
Milestone

Comments

@leMaik
Copy link
Member

leMaik commented Apr 10, 2020

A lot of things changed in the flattening and the new updated shiny version of Chunky doesn't support 1.12 and older worlds anymore. That leads to inconsistencies (1.12 Chunky doesn't have the new UI) and bug fixes not being applied to both versions.

By abstracting away from the world format and refactoring some things, it should be possible to open 1.12 and 1.13+ worlds in the same Chunky version one day.

@carterlasalle
Copy link

carterlasalle commented Nov 20, 2020

What changes so much that doesn't allow it to happen at the moment

@leMaik
Copy link
Member Author

leMaik commented Nov 27, 2020

@RocketNinja15 The blocks are stored differently and instead of having block states for everything, Chunky has to implement a lot of Minecraft's block connection logic (i.e. redstone wire behavior, door rotation, …) for pre-flattening (<1.13) worlds. Also since blocks can be waterlogged as of 1.13, there are two octrees in Chunky now.

I have a proof-of-concept branch that can load 1.12 worlds and converts the blocks to Chunky 2.x blocks while loading the chunks. Doesn't support most of the blocks yet, but it's a start. The good thing is thatold Minecraft doesn't get updated, so there won't be new blocks to add to this conversion process at some point and it will be done.

@leMaik
Copy link
Member Author

leMaik commented May 5, 2021

This is currently being worked on by @alexhliu and me. 🙃
https://github.com/leMaik/chunky/tree/legacy-block-finalization

Legacy block types that need to be finalized:

  • fire
  • stairs
  • chest
  • trapped chest
  • redstone_wire
  • door
  • fence
  • glass pane, stained glass pane
  • stone wall
  • iron bars
  • vine
  • fence_gate
  • tripwire
  • double plant
  • chorus_plant
  • large fern
  • melon stem
  • pumpkin stem

Blocks that were treated specially in Chunky 1.4.5 (https://github.com/chunky-dev/chunky/blob/chunky-1.x/chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java#L855):

  • vines
  • stationary_water (mapped to water)
  • water
  • fire
  • stationary lava (mapped to lava
  • lava
  • grass (might be snow covered)
  • mycelium (might be snow covered)
  • podzol (might be snow covered)
  • doors
  • bed (for pre-1.12 default color)

Some blocks used to have tile entities (we need to update the blocks in the octree):

  • 1.12 bed color
  • wall sign
  • sign
  • skull
  • standing banner
  • wall banner
  • 1.7+ flower pots

@leMaik leMaik added chunky 2.x Issues that only affect version 2.x of chunky (for Minecraft 1.13+) feature request and removed pipedream labels May 5, 2021
@leMaik
Copy link
Member Author

leMaik commented May 11, 2021

We should test against the scenes from #434 later.

@ShirleyNekoDev
Copy link
Member

ShirleyNekoDev commented May 15, 2021

Tested the PR with my old worlds and found the following problems:

  • cocoa beans orientation
    image
  • nether portal orientation
    image
  • vine orientation (connect top part to open trapdoor, corner has only 1 side)
    image
    image
  • enabling ESS reload breaks scene loading (noticed in a scene with redstone_wire which then does not get finalized anymore -> UnfinalizedLegacyBlock)

@leMaik
Copy link
Member Author

leMaik commented May 15, 2021

  • Trapdoor orientation is wrong
  • Trapdoor ignores half
  • Some leaves render as oak leaves
  • Fences and walls should not connect to glass blocks

@leMaik
Copy link
Member Author

leMaik commented May 15, 2021

@ShirleyNekoDev Fixed, please continue testing 😄 Can you check the vines bug again? Because I didn't even manage to get such an edge ingame (although it is possible for a vine to have up to 5 faces).

@ShirleyNekoDev
Copy link
Member

Trapdoor vines are fixed 👍
image

Corner vines not - World: vines_bug.zip

@leMaik
Copy link
Member Author

leMaik commented May 16, 2021

@ShirleyNekoDev Corner vines work fine if the block data is set correctly. In the world you sent, the block data of the vines is either 0 or 8. Even when I set that ingame in 1.12, the blocks don't show up as corner blocks. When I set corner block data, e.g. 9, it works (ingame and in Chunky). So I don't know how to fix this.

@leMaik
Copy link
Member Author

leMaik commented May 16, 2021

This is from the world you sent. The top block is correct, the ones below it somehow are not? 🤔

image

Edit: looks the same ingame (1.12)
2021-05-16_12 41 58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chunky 2.x Issues that only affect version 2.x of chunky (for Minecraft 1.13+) feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants