Skip to content

Conversation

@DerToaster98
Copy link
Contributor

Describe in detail what your pull request accomplishes

There is a infinite loop in TranslationTask.java in the validation for forbidden hover blocks. In short, the position moves out of worldspace and thus the returned block will always be air, resulting in a infinite loop.

Also fixed a probably missing return statement further down, if a block was found that can't be hovered over

Related issues:

  • dont know of one, but this bug is known on TTE and strangelands

Checklist

  • Unit tests
  • Proper internationalization
  • Tested

}
Material testType = test.toBukkit(world).getBlock().getType();
if (craft.getType().getMaterialSetProperty(CraftType.FORBIDDEN_HOVER_OVER_BLOCKS).contains(testType)) {
// Why is there no return here? Shouldnt there be one?
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for this comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a serious question i have there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, it seems i confused the lines when i wrote that comment, but anyway. Once the craft goes over a forbidden hover over block, it can't translate at all. Calling fail also pretty much implies that the result is final at that point, but yet the function would continue, so the return is necessary

@DerToaster98
Copy link
Contributor Author

Gradle build failed because of this branch having the paperdev configs from before the patch

@DerToaster98
Copy link
Contributor Author

@TylerS1066 : I merged the relevant changes so that it builds, can you please let the job run again and then merge it?

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.

3 participants