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

Fix Ghost Block appearing when clicking on a cake #16

Merged
merged 3 commits into from
Mar 4, 2021

Conversation

serenibyss
Copy link

@serenibyss serenibyss commented Mar 3, 2021

In order to fix this issue, all I had to do was change the final return from false to true, to tell MC that we handled the onBlockActivated() call, ensuring that no block will be placed.

Closes #12

@ALongStringOfNumbers ALongStringOfNumbers added the bug Something isn't working label Mar 3, 2021
Copy link

@Exaxxion Exaxxion left a comment

Choose a reason for hiding this comment

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

Looks like the problem was what I guessed it might be. Thanks for looking into this.

I think it is still desirable for the function to return false at the end if things were otherwise not handled. It should suffice to move the return true; on line 154 outside of the inner if block, so it always returns true if it gets into the else if on line 148.

@serenibyss
Copy link
Author

I made this change and it appears to work just the same, so it is now implemented.

@Exaxxion Exaxxion merged commit aca6b9b into Nomifactory:master Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ghost Placing on blocks when click on cake
3 participants