Add Structure to Model (replaces Structure Importer)#899
Open
MesterMan03 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Structure to Model (STM) is a plugin that improves on and replaces the previous Structure Importer plugin. Functionally it does the same thing; takes a structure file and converts it into a model. However, STM handles bigger structures much better, includes tinted texture support (grass, leaves etc. won't show up as their default grey texture) and generally improves on the old plugin, making that obsolete.
The plugin's source code can be found under https://github.com/MesterMan03/structure-to-model. It's written in TypeScript and gets bundled into a single minified JavaScript file (when needed, the plugin can be built with a sourcemap included to help debugging). For NBT reading, the plugin includes
nbtifybundled into the final output instead of a custom in-house implementation.Why
I used Structure Importer a lot for my project. It was fine for a while, however once I started importing bigger structures, I noticed that the plugin is simply unable to handle them. Blocks would not be loaded properly and the final model looked nothing like the structure. After some debugging, I've found out that the original plugin had major flaws that caused its internal palette to be out of sync with what's stored in the structure, causing the subsequent blocks to be completely off - which led to air being replaced with waterlogged kelp, slabs turning into stairs etc. Instead of fighting the plugin for days, I've decided to create my own plugin that actually does its job.
Fixes & Improvements compared to Structure Importer
What about Structure Importer
This plugin effectively replaces Structure Importer and makes it obsolete. I obviously don't want to decide what should happen with it, I'll let the maintainers have the decision.