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

Avoid/catch problems setting up a StructureBlockRegistry #592

Merged
merged 3 commits into from
Apr 13, 2024

Conversation

kirderf1
Copy link
Member

@kirderf1 kirderf1 commented Apr 5, 2024

Fixes a problem that @akisephila encountered. When an exception is thrown in ILandType.registerBlocks(), the error ended up not being logged, thus making it harder to find the actual problem. This PR fixes this issue in two ways:

  • Uses by TitleLandType.isAspectCompatible() have been replaced by terrain land type tags.
  • When the structure block registry is set up for LandGenSettings, any exceptions are now caught and logged.

@kirderf1 kirderf1 added the bug Something isn't working as it should label Apr 5, 2024
Copy link
Member

@Dweblenod Dweblenod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unsure how to really bug test this, but I can give my approval now for the general contents

@kirderf1
Copy link
Member Author

If one really want to test this, you could try out TitleLandType.isAspectCompatible() by predefining land types, and creating a land/loading a save file with a land to test the LandGenSettings part. One could try it as-is to see that everything works fine normally, and one could purposefully make a land throw an exception in landType.registerBlocks() and see that the exception is handled properly.

@Dweblenod
Copy link
Member

Using /sburbpredefine, it does correctly prevent a disallowed land type combo from being used, however it does not give a warning and automatically reassigns the offending land type

# Conflicts:
#	src/main/java/com/mraof/minestuck/data/tag/TerrainLandTypeTagsProvider.java
#	src/main/java/com/mraof/minestuck/util/MSTags.java
@Dweblenod Dweblenod merged commit 4527014 into upcoming-content Apr 13, 2024
1 check passed
@kirderf1 kirderf1 deleted the land-type-fixes branch April 13, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants