Finish implementing deleting unloaded tiles feature, add VanillaFallbackOnModDeletion examples #4325
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.
When a user decides to disable a mod, that mod will leave unloaded tiles in the world. If the user wishes to permanently remove a mod, then the tiles are a nuisance. The code exists to do this, replacing those tiles with
VanillaFallbackOnModDeletion
, but the code currently will not run because it is not hooked up to any UI for the user to click.This PR also will add proper
VanillaFallbackOnModDeletion
usage and also update the documentation to warn about how to correctly useVanillaFallbackOnModDeletion
.TODO:
Example
In this example several tiles are replaced with suitable alternatives via
VanillaFallbackOnModDeletion
usage. ExampleTorch (bottom middle, near the player) shows the default behavior of turning back to dirt. ExampleWallAdvanced shows the default wall behavior, turning to air. ExampleChair, Chest, Block, Sign, Platform, Ore, Bar all revert to a vanilla tile in this example. On the left is TileObjectDataShowcase, which uses different FrameX and FrameY values from a normal 2x2 tile. This shows how a modded might make a mistake if they useVanillaFallbackOnModDeletion
on atileframeimportant
tile that does not exactly match the layout of the vanilla tile they intend to fallback to.Before:
Unloaded:
Deleted and replaced: