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

Update Readme and enhance code to deal with imperfect map data #97

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

chrisl8
Copy link

@chrisl8 chrisl8 commented Dec 20, 2021

The current revision of the code will not build with .NET Core 3.0, but 3.1 works, and that is the current LTS anyway.

By catching and logging out errors here in the loop, I am able to log exactly which chunk failed, aiding in fixing maps or debugging code.
Either texture issues or map corruption often causes failures in getting textures.
Previously this would result in entire chunks being unrendered and it was difficult to figure out why.

By catching the failures here, it is easy to see exactly which block is causing issues.

It also allows the chunk to continue to render with one missing block, instead of the entire chunk being blank.
Often a missing texture is actually a bad block in a map.
This makes it easier to find those blocks and remove them.
Apparently, at least in my map, stone_slab_type 2 is labeled "wood".
I found two block in my world: invisibleBedrock and movingBlock that were failing to render and causing "black holes".

invisibleBedrock is something one can get via a command stick into the world. It is essentially what it says.

I'm not sure what movingBlocks are. Possibly the result of a bug in old versions.

I have marked both with a structure_void block that gives a red block around the spot, and also set them to transparent so you an see the terrain under them.
For whatever reason, my map was missing the required data fields on many blocks. I have updated the code to handle this missing data gracefully and render a "default" variety of the given block in each instance without crashing or complaining.
@chrisl8 chrisl8 changed the title Update required .NET Core version to align with current code requirements. Update Readme and enhance code to deal with imperfect map data Dec 22, 2021
@chrisl8
Copy link
Author

chrisl8 commented Dec 22, 2021

  1. I updated the Readme to point to the required .NET Core 3.1 to avoid people creating Issues when they cannot build it with the linked 3.0
  2. My map was left with a lot of blank chunks due to the way the code bailed on entire chunks instead of for each block. I changed that.
  3. I updated the code for every anomaly in my map that was causing it to fail. I don't know why my map behaves this way, but these updates should harden the code against the most difficult maps.

I've rendered a very large map with these changes and it works beautifully! Thank you so much for this amazing tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant