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

Weird logic in beastmaster.java #3

Open
PlNG opened this issue Jun 14, 2021 · 1 comment
Open

Weird logic in beastmaster.java #3

PlNG opened this issue Jun 14, 2021 · 1 comment

Comments

@PlNG
Copy link

PlNG commented Jun 14, 2021

if (attackingPlayer != null) {

} else if (attackingMob != null) {

If I understand the code correctly, the way the current code is set up, the first will always be false and the second will always be true because attackingplayer or attackingmob gets set, but the whole block is on the premise that attackingmob is set at 729. I think that the "ignore infighting" logic was supposed to be closed with brackets at line 737.

@totemo
Copy link
Member

totemo commented Jun 15, 2021

Good catch. I clearly got a bit lost last time I was working on that. I'll fix it up on the next maintenance. Soon.

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

No branches or pull requests

2 participants